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