Esempio n. 1
0
 protected override IMonsterMotion GetMethodForDeterminingDirection(MonsterMobility mobility)
 {
     if (mobility != MonsterMobility.Stationary)
     {
         throw new ArgumentOutOfRangeException();
     }
     return(null);
 }
Esempio n. 2
0
 protected override Func<Monster, World, Direction> GetMethodForDeterminingDirection(MonsterMobility mobility)
 {
     switch (mobility)
         {
         case MonsterMobility.Cautious:
             return MonsterMovement.DetermineDirectionCautious;
         default:
             throw new ArgumentOutOfRangeException();
         }
 }
Esempio n. 3
0
        protected override IMonsterMotion GetMethodForDeterminingDirection(MonsterMobility mobility)
        {
            switch (mobility)
            {
            case MonsterMobility.Aggressive:
                return(GlobalServices.MonsterMovementFactory.SemiAggressive(this));

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Esempio n. 4
0
 protected override Func<Monster, World, Direction> GetMethodForDeterminingDirection(MonsterMobility mobility)
 {
     switch (mobility)
         {
         case MonsterMobility.Placid:
             return MonsterMovement.RandomDirection;
         case MonsterMobility.Aggressive:
             return MonsterMovement.DetermineDirectionSemiAggressive;
         default:
             throw new ArgumentOutOfRangeException();
         }
 }
Esempio n. 5
0
 protected override Func<Monster, World, Direction> GetMethodForDeterminingDirection(MonsterMobility mobility)
 {
     switch (mobility)
         {
         case MonsterMobility.Placid:
             return MonsterMovement.DetermineDirectionRolling;
         case MonsterMobility.Patrolling:
             return MonsterMovement.DetermineDirectionStandardPatrolling;
         case MonsterMobility.Aggressive:
             Func<Monster, World, Direction> result = (m, w) => DetermineDirectionAggressive(this, w, ShouldMakeAnAggressiveMove);
             return result;
         default:
             throw new ArgumentOutOfRangeException();
         }
 }
Esempio n. 6
0
        protected override IMonsterMotion GetMethodForDeterminingDirection(MonsterMobility mobility)
        {
            switch (mobility)
            {
            case MonsterMobility.Patrolling:
            {
                var result = GlobalServices.MonsterMovementFactory.PatrolPerimeter(this, this.InitialDirection);
                GlobalServices.Game.Services.RemoveService(typeof(PatrolPerimeter));
                GlobalServices.Game.Services.AddService(typeof(PatrolPerimeter), result);
                return(result);
            }

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Esempio n. 7
0
        protected override IMonsterMotion GetMethodForDeterminingDirection(MonsterMobility mobility)
        {
            switch (mobility)
            {
            case MonsterMobility.Patrolling:
                return(GlobalServices.MonsterMovementFactory.StandardPatrolling(this, this.InitialDirection));

            case MonsterMobility.Placid:
                return(GlobalServices.MonsterMovementFactory.StandardRolling(this, this.InitialDirection));

            case MonsterMobility.Aggressive:
                return(GlobalServices.MonsterMovementFactory.KillerCubeRedMovement(this));

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Esempio n. 8
0
 protected abstract Func<Monster, World, Direction> GetMethodForDeterminingDirection(MonsterMobility mobility);
Esempio n. 9
0
 protected override Func<Monster, World, Direction> GetMethodForDeterminingDirection(MonsterMobility mobility)
 {
     if (mobility != MonsterMobility.Static)
         throw new ArgumentOutOfRangeException();
     return null;
 }
Esempio n. 10
0
 public MobilityAfterInjury(Monster monster, MonsterMobility mobilityToChangeTo) : base(monster)
 {
     this._mobilityToChangeTo = mobilityToChangeTo;
 }