public ExploringState() { //Pretty loading here map = new TileMap(); player = new PlayerCharacter(map, new Vector2i(15,15)); exploringView = new View(Program.Window.GetView()); defaultView = Program.Window.DefaultView; }
public Character(TileMap map, Vector2i initialPosition) { //Bind map this.map = map; this.map.Tiles[initialPosition.X, initialPosition.Y].Enter(this); //Prepare the sprite sprite = new Sprite(); sprite.Texture = new Texture("Assets/Textures/playerTemp.png"); sprite.Origin = sprite.Texture.Center(); sprite.Position = new Vector2f(Position.X, Position.Y) * Tile.WorldSize + new Vector2f(Tile.WorldSize, Tile.WorldSize) / 2; //Start the updateTimer updateTimer = new Clock(); }
public PlayerCharacter(TileMap map, Vector2i initialPosition) : base(map,initialPosition) { }