예제 #1
0
 public void AnimationChange(Vector2 velocity, Direction direction)
 {
     if (isItStart)
     {
         endPoint.AnimationChange(rb2D.velocity, direction);
     }
     if (direction == Direction.x)
     {
         transform.rotation = transform.rotation * Quaternion.Euler(new Vector3(0, 0, Time.deltaTime * velocity.x * 100));
     }
     else
     {
         transform.rotation = transform.rotation * Quaternion.Euler(new Vector3(0, 0, Time.deltaTime * velocity.y * 100));
     }
 }