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); } }
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"); } } }
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; } } }