예제 #1
0
 public override void EnterMovement(AvatarController avatar)
 {
     acceleration = Vector2.zero;
 }
예제 #2
0
        public override void UpdateMovement(AvatarController avatar)
        {
            var targetVelocity = new Vector2(avatar.velocity.x, avatar.velocity.y - downDragOverY.Evaluate(avatar.transform.position.y));

            avatar.velocity = Vector2.SmoothDamp(avatar.velocity, targetVelocity, ref acceleration, duration);
        }
예제 #3
0
 public abstract void UpdateMovement(AvatarController avatar);
예제 #4
0
 public override void UpdateMovement(AvatarController avatar)
 {
 }
예제 #5
0
 public abstract void EnterMovement(AvatarController avatar);
예제 #6
0
 public override void EnterMovement(AvatarController avatar)
 {
     avatar.velocity += Physics2D.gravity * Time.deltaTime * multiplier;
 }
예제 #7
0
 void Awake()
 {
     OnValidate();
     isAlive  = true;
     instance = this;
 }
예제 #8
0
 public override void UpdateMovement(AvatarController avatar)
 {
     avatar.velocity = Vector2.SmoothDamp(avatar.velocity, new Vector2(avatar.facingMultiplier * targetVelocity.x, targetVelocity.y), ref acceleration, duration);
 }
예제 #9
0
 void Start()
 {
     attachedAvatar = FindObjectOfType <AvatarController>();
 }