public void SetInvisible(List <Monster> monsterList) { foreach (Character monster in monsterList) { MyFoxDraw.SetPosition(MyFoxDraw.Items[monster.CharacterId], -500, -500); } }
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; } }
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; } }
public void DrawMap() { for (int i = 0; i < HeightUnits; i++) { for (int j = 0; j < WidthUnits; j++) { if (WallTiles.Contains(WidthUnits * i + j)) { MyFoxDraw.AddImage("./Assets/wall.png", 50 * j, 50 * i); } else { MyFoxDraw.AddImage("./Assets/floor.png", 50 * j, 50 * i); } } } }
public void DrawCharacter(Character character) { MyFoxDraw.AddImage(character.ImageSource, ((character.TileNumber % WidthUnits) * 50), ((character.TileNumber / WidthUnits) * 50)); }
public void ResetPositionToZero(Character character) { MyFoxDraw.SetPosition(MyFoxDraw.Items[character.CharacterId], 0, 0); character.TileNumber = 0; }
public void SetInvisible(Character character) { MyFoxDraw.SetPosition(MyFoxDraw.Items[character.CharacterId], -500, -500); }