[Unity2D] Tweening을 사용한 캐릭터 움직이기
C#/Unity2020. 7. 6. 17:24[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 -=..

image