Beispiel #1
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");
                }
            }
        }
Beispiel #2
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;
                }
            }
        }