코딩을 한단계씩 부셔보자.

코딩을 한단계씩 부셔보자.

  • 분류 전체보기 (319)
    • 코딩배움일지 (157)
      • JAVA (79)
      • DataBase (29)
      • Web 구현 (34)
      • 인터페이스 구현 (15)
    • 개인적인 공부 (142)
      • 자바 (6)
      • 백준 (47)
      • Java의 정석 (0)
      • 그냥정리 (2)
      • Database 복습 (5)
      • 테스트 페이지 (1)
      • 프론트엔드 (7)
      • Unity (29)
      • Python (45)
    • TeamProjectHappy (12)
      • front (9)
      • database (3)
    • 개발일지 (2)
      • Journey to West (2)
  • 홈
  • 배움기록
  • 태그
  • 방명록
RSS 피드
로그인
로그아웃 글쓰기 관리

코딩을 한단계씩 부셔보자.

컨텐츠 검색

태그

javascript CSS 백준 SQL 왕초보 html 자바 자바기초 Web 유니티 javabasic 배열 java database 2D 파이썬 Python java기초 c# unity

최근글

댓글

공지사항

아카이브

c#(11)

  • Shooting Animation

    Sprite 의 그림을 animation 한 후 animator 의 parameter 에 넣고 처음에는 SetBool 로 Shooting 을 true, false로 전환하려고 했는데 원하는대로 되지 않았다. void OnFire(InputValue value) { if (!isAlive) { return; } Instantiate(bullet, gun.position, transform.rotation); if(value.isPressed) { myAnimator.SetBool("isShooting",true); } else { myAnimator.SetBool("isShooting",false); } } //////// if(value.isPressed) { myAnimator.SetBool("isSh..

    2023.05.22
  • Boost & Bump

    특정한 조건에서 속도 올리기 및 속도 줄이기 public class Driver : MonoBehaviour { [SerializeField]float steerSpeed = 70f; [SerializeField]float moveSpeed = 15f; [SerializeField]float slowSpeed = 15f; [SerializeField]float boostSpeed = 20f; void Update() //프레임마다 호출된다. { float steerAmount = Input.GetAxis("Horizontal") * steerSpeed * Time.deltaTime; float moveAmount = Input.GetAxis("Vertical") * moveSpeed * Time.delt..

    2023.03.08
  • Get Component

    Get Component 게임 오브젝트의 컴포넌트를 가져오는 함수이다. type 은 가져올 컴포넌트의 타입이다. public class Delivery : MonoBehaviour { // 어떠한 것과 부딪히면 무엇에 부딪혔는가에 대한 정보를 얻는다. [SerializeField] Color32 hasPackageColor = new Color32(1,1,1,1); [SerializeField] Color32 noPackageColor = new Color32(1,1,1,1); [SerializeField] float destroyDelay = 0.5f; bool hasPackage; SpriteRenderer spriteRenderer; void Start() { spriteRenderer = GetC..

    2023.03.08
  • 객체삭제? Destroy()

    Destroy() == Delete Game Object from the scene () 괄호안데 조건 두가지를 작성 해야 한다. // 지나가는 목표만 딜레이 후 삭제 하기 Destroy ( example, 1.0f); 이런식 으로 작성 하나, delay 를 [SerializeField] flaot destroyDelay = 0.5f; // 수정을 하기 위해서 Destroy (example , destoryDelay) ; 로 작성한다. public class Delivery : MonoBehaviour { // 어떠한 것과 부딪히면 무엇에 부딪혔는가에 대한 정보를 얻는다. [SerializeField] float destroyDelay = 0.5f; bool hasPackage; private void ..

    2023.03.08
  • if 구문

    void OnTriggerEnter2D(Collider2D other) { if (other.tag == "Package") { Debug.Log("Package picked up"); } } tag Package 를 지나가면 Debug.Log("Package picked up"); 콘솔에 Debug 확인

    2023.03.07
  • OnCollisionEnter2D()

    어딘가 부딫혔을때 코드가 작동하기 기존 스크립트에 집어 넣어도 되지만, 코드의 길이가 길어지게 되므로 새로운 함수를 적용할때에는 새로운 스크립트를 생성하는 것이 좋다. using System.Collections; using System.Collections.Generic; using UnityEngine; public class Collision : MonoBehaviour { // 어떠한 것과 부딪히면 무엇에 부딪혔는가에 대한 정보를 얻는다. void OnCollisionEnter2D(Collision2D other) { Debug.Log("빼-앰~!!"); } } Debug 구문은 Console 에서 출력하는 것이좋다. 정확히는 충돌 액션을 할때

    2023.01.16
이전
1 2
다음
티스토리
© 2018 TISTORY. All rights reserved.

티스토리툴바