/// <summary> /// Handle the behaviour of the enemy when it is waking up. /// </summary> /// <param name="context">Context of the enemy.</param> public void Handle(EnemyContext context) { if (((AnimatedModel)context.Enemy.DModel).Animation.Done == true) { context.ChangeState(Inactive.Instance); } }
/// <summary> /// Handle the behaviour of the attacked enemy. When the attacked /// animation finish, change the behaviour of the last behaviour. /// </summary> /// <param name="context"></param> public void Handle(EnemyContext context) { if (((AnimatedModel)context.Enemy.DModel).Animation.Done == true) { ((AnimatedModel)context.Enemy.DModel).Damaged = false; context.ChangeState(context.LastState); } }