Main in separater Klasse.
Neue Klassen: Map, Tile, Player, Dragon
This commit is contained in:
111
Tile.cs
Normal file
111
Tile.cs
Normal 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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user