示例#1
0
 public static void CheckCreepState(TowerType type, Creep creep)
 {
     if (creep.Type == CreepType.Cloth)
     {
         ClothCreepStateChanger.ChangeStatesIfClothCreep(type, creep);
     }
     else if (creep.Type == CreepType.Sand)
     {
         SandCreepStateChanger.ChangeStatesIfSandCreep(type, creep);
     }
     else if (creep.Type == CreepType.Glass)
     {
         GlassCreepStateChanger.ChangeStatesIfGlassCreep(type, creep);
     }
     else if (creep.Type == CreepType.Wood)
     {
         WoodCreepStateChanger.ChangeStatesIfWoodCreep(type, creep);
     }
     else if (creep.Type == CreepType.Plastic)
     {
         PlasticCreepStateChanger.ChangeStatesIfPlasticCreep(type, creep);
     }
     else if (creep.Type == CreepType.Iron)
     {
         IronCreepStateChanger.ChangeStatesIfIronCreep(type, creep);
     }
     else if (creep.Type == CreepType.Paper)
     {
         PaperCreepStateChanger.ChangeStatesIfPaperCreep(type, creep);
     }
 }
 public void CheckFireThenIceEffect()
 {
     WoodCreepStateChanger.ChangeStatesIfWoodCreep(TowerType.Fire, creep);
     Assert.IsTrue(creep.State.Burst);
     WoodCreepStateChanger.ChangeStatesIfWoodCreep(TowerType.Ice, creep);
     Assert.IsFalse(creep.State.Burst);
 }
 public void CheckWaterThenFireEffect()
 {
     WoodCreepStateChanger.ChangeStatesIfWoodCreep(TowerType.Water, creep);
     Assert.IsTrue(creep.State.Wet);
     WoodCreepStateChanger.ChangeStatesIfWoodCreep(TowerType.Fire, creep);
     Assert.IsFalse(creep.State.Wet);
 }
 public void CheckWaterThenIceThenImpactEffect()
 {
     WoodCreepStateChanger.ChangeStatesIfWoodCreep(TowerType.Water, creep);
     Assert.IsTrue(creep.State.Wet);
     WoodCreepStateChanger.ChangeStatesIfWoodCreep(TowerType.Ice, creep);
     Assert.IsTrue(creep.State.Frozen);
     WoodCreepStateChanger.ChangeStatesIfWoodCreep(TowerType.Impact, creep);
 }
 public void CheckForWaterTowerEffect()
 {
     WoodCreepStateChanger.ChangeStatesIfWoodCreep(TowerType.Water, creep);
     Assert.IsTrue(creep.State.Healing);
 }
 public void CheckForFireTowerEffect()
 {
     WoodCreepStateChanger.ChangeStatesIfWoodCreep(TowerType.Fire, creep);
     Assert.IsTrue(creep.State.Fast);
     Assert.IsTrue(creep.State.Burst);
 }