C#

    [Unity2D] Collision, Trigger 충돌 조건 확인 & 총알 발사하기

    hero.cs using System.Collections; using System.Collections.Generic; using System.Reflection; using UnityEngine; // 이동간 절대기준 사용위한 Tweening 라이브러리 사용 using DG.Tweening; using UnityEditorInternal; using JetBrains.Annotations; using System; public class hero : MonoBehaviour { bool _token = false; bool _DontMoveDown = false; bool _DontMoveUp = false; bool _DontMoveLeft = false; bool _DontMoveRight = f..

    [Unity2D] Tweening을 사용한 캐릭터 움직이기

    using System.Collections; using System.Collections.Generic; using System.Reflection; using UnityEngine; // 이동간 절대기준 사용위한 Tweening 라이브러리 사용 using DG.Tweening; public class hero : MonoBehaviour { bool _token = false; // Update is called once per frame void Update() { if(!_token) { // 왼쪽 if (Input.GetKey(KeyCode.LeftArrow)) { _token = true; float EndPositionX = transform.position.x; EndPositionX -=..