Main in separater Klasse.

Neue Klassen: Map, Tile, Player, Dragon
This commit is contained in:
Daniel Herrmann
2014-04-03 10:17:40 +02:00
parent 4a2a01853a
commit 2cac9a9203
5 changed files with 331 additions and 0 deletions

111
Tile.cs Normal file
View File

@@ -0,0 +1,111 @@
using System;
class Tile
{
public int x;
public int y;
public Dragon drag;
public Player playr;
public bool isWalkable;
public bool isForest;
public bool isHuntable;
public bool isWater;
public Tile(int posX, int posY, bool walkable, bool forest, bool huntable, bool water)
{
this.setX(posX);
this.setY(posY);
this.setWalkable(walkable);
this.setForest(forest);
this.setHuntable(huntable);
this.setWater(water);
}
public void setX(int x)
{
this.x = x;
}
public int getX()
{
return x;
}
public void setY(int y)
{
this.y = y;
}
public int getY()
{
return y;
}
public void setDragon(Dragon drag)
{
this.drag = drag;
}
public Dragon getDragon()
{
return drag;
}
public void setPlayer(Player playr)
{
this.playr = playr;
}
public Player getPlayer()
{
return playr;
}
public void setWalkable(bool walkable)
{
this.isWalkable = walkable;
}
public bool getWalkable()
{
return isWalkable;
}
public void setForest(bool forest)
{
this.isForest = forest;
}
public bool getForest()
{
return isForest;
}
public void setHuntable(bool huntable)
{
this.isHuntable = huntable;
}
public bool getHuntable()
{
return isHuntable;
}
public void setWater(bool water)
{
this.isWater = water;
}
public bool getWater()
{
return isWater;
}
}