Ejemplo n.º 1
0
 public override void HandleMovementInput(Vector2 PlayerInput)
 {
     if (Mathf.Abs(PlayerInput.x) > .8f)
     {
         OwnerStateMachine.ChangeState(EStateType.Run);
     }
     else if (Mathf.Abs(PlayerInput.x) > 0f)
     {
         OwnerStateMachine.ChangeState(EStateType.Walk);
     }
 }
Ejemplo n.º 2
0
        public override void HandleNotification(Notification notif)
        {
            base.HandleNotification(notif);

            if (notif is AttackNotification)
            {
                AttackNotification n = notif as AttackNotification;
                if (n.Target == Object)
                {
                    OwnerStateMachine.ChangeState("Run");
                }
            }
        }
Ejemplo n.º 3
0
        public override void HandleNotification(Notification notif)
        {
            base.HandleNotification(notif);

            if (notif is AttackNotification)
            {
                AttackNotification n = notif as AttackNotification;
                if (n.Enemy == Object)
                {
                    OwnerStateMachine.ChangeState("Walk");
                    Object.LifeTime = 0;
                }
            }
        }