public World(int width, int height) { player = new Player ("test", PlayerType.Wizard); player.Position = new Vector2 (100, 100); Width = width; Height = height; layers = new List<WorldLayer> (); layers.Add (new WorldLayer (width, height, TileType.Floor)); // floor layer layers.Add (new WorldLayer (width, height, TileType.Wall)); // wall layer for (int i = 1; i<width - 1; i++)for (int j = 1; j<width - 1; j++) { layers[1].Tiles[i,j].Type = TileType.Air; layers[1].Tiles[i,j].Solid=false; } }
//All food items heal. public override void PrimaryUse(Player player) { player.Heal (HealValue); }
/// <summary> /// Activated when the player, e.g., left clicks /// </summary> public virtual void PrimaryUse(Player player) { }
/// <summary> /// Optional use for when the player, e.g., right clicks /// </summary> public virtual void SecondaryUse(Player player) { }
public override void SecondaryUse(Player player) { throw new NotImplementedException (); }