Exemplo n.º 1
0
 internal void Notify(MoveResolved e)
 {
     Body.Path.Dequeue();
     Body.ShouldContinue = true;
     if (!Body.Path.Any() && !e.Character.State.IsDeceased)
     {
         EventQueue.Instance.Add(new MovementFinished());
     }
 }
Exemplo n.º 2
0
        public void OnMoved(MoveResolved e)
        {
            if (e.Character.Team == Team.Enemy)
            {
                GameWorld.FriendliesWhere(x => e.Character.State.CanPercieve(x.CurrentTile.Position))
                .ForEach(x => Data.SeenEnemies[x] = x.CurrentTile.Position);
            }
            else
            {
                _characterData.Where(x => x.Key.State.CanPercieve(e.Character.CurrentTile.Position))
                .ForEach(x => x.Value.SeenEnemies[e.Character] = e.Character.CurrentTile.Position);
            }

            if (CurrentMood == Mood.Stealth && _characterData.Where(x => !x.Key.State.IsDeceased).Any(x => x.Value.SeenEnemies.Any()))
            {
                CurrentMood = Mood.Battle;
                EventQueue.Instance.Add(new MoodChange {
                    NewMood = CurrentMood
                });
            }
        }
Exemplo n.º 3
0
 private void ContinueMoving(MoveResolved e) => e.Character.Notify(e);