Exemplo n.º 1
0
 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; }
 }
Exemplo n.º 2
0
 //All food items heal.
 public override void PrimaryUse(Player player)
 {
     player.Heal (HealValue);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Activated when the player, e.g., left clicks
 /// </summary>
 public virtual void PrimaryUse(Player player)
 {
 }
Exemplo n.º 4
0
 /// <summary>
 /// Optional use for when the player, e.g., right clicks
 /// </summary>
 public virtual void SecondaryUse(Player player)
 {
 }
Exemplo n.º 5
0
 public override void SecondaryUse(Player player)
 {
     throw new NotImplementedException ();
 }