예제 #1
0
 public override string Action(ref MapGame mapGame, string textAction)
 {
     mapGame.hero.Damage += ADD_DAMAGE;
     mapGame.hero.attacksTechniques.Add(new HeavyAttack());
     mapGame.ClearMapsCell();
     Move(ref mapGame, textAction);
     return(mapGame.CenterViewMap());
 }
 /// <summary>
 /// Обработка перемещения
 /// </summary>
 /// <param name="textAction">комманда от клиента</param>
 protected void Move(ref MapGame mapGame, string textAction)
 {
     if (textAction == "d")
     {
         mapGame.GameHor += 1;
     }
     if (textAction == "a")
     {
         mapGame.GameHor -= 1;
     }
     if (textAction == "w")
     {
         mapGame.GameVert -= 1;
     }
     if (textAction == "s")
     {
         mapGame.GameVert += 1;
     }
 }
예제 #3
0
 public override string Action(ref MapGame mapGame, string textAction)
 {
     Move(ref mapGame, textAction);
     return(mapGame.CenterViewMap());
 }
예제 #4
0
 public string Action(ref MapGame mapGame, string textAction)
 {
     throw new GameEndException("Thanks for the game, Wanderer");
 }
 public abstract string Action(ref MapGame mapGame, string textAction);