Exemple #1
0
 public override void EnterMovement(AvatarController avatar)
 {
     acceleration = Vector2.zero;
 }
Exemple #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);
        }
Exemple #3
0
 public abstract void UpdateMovement(AvatarController avatar);
Exemple #4
0
 public override void UpdateMovement(AvatarController avatar)
 {
 }
Exemple #5
0
 public abstract void EnterMovement(AvatarController avatar);
Exemple #6
0
 public override void EnterMovement(AvatarController avatar)
 {
     avatar.velocity += Physics2D.gravity * Time.deltaTime * multiplier;
 }
Exemple #7
0
 void Awake()
 {
     OnValidate();
     isAlive  = true;
     instance = this;
 }
Exemple #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);
 }
Exemple #9
0
 void Start()
 {
     attachedAvatar = FindObjectOfType <AvatarController>();
 }