Esempio n. 1
0
 internal void MoveDown(Character character)
 {
     if ((character.TileNumber / WidthUnits != HeightUnits - 1) && !WallTiles.Contains(character.TileNumber + 10))
     {
         double x = MyFoxDraw.GetLeft(MyFoxDraw.Items[character.CharacterId]);
         double y = MyFoxDraw.GetTop(MyFoxDraw.Items[character.CharacterId]) + 50;
         MyFoxDraw.SetPosition(MyFoxDraw.Items[character.CharacterId], x, y);
         character.TileNumber += 10;
     }
 }
Esempio n. 2
0
 internal void MoveUp(Character character)
 {
     if ((character.TileNumber / WidthUnits != 0) && !WallTiles.Contains(character.TileNumber - 10))
     {
         double x = MyFoxDraw.GetLeft(MyFoxDraw.Items[character.CharacterId]);
         double y = MyFoxDraw.GetTop(MyFoxDraw.Items[character.CharacterId]) - 50;
         MyFoxDraw.SetPosition(MyFoxDraw.Items[character.CharacterId], x, y);
         character.TileNumber -= 10;
     }
 }