Esempio n. 1
0
 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;
 }
Esempio n. 2
0
        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();
        }
Esempio n. 3
0
 public PlayerCharacter(TileMap map, Vector2i initialPosition) : base(map,initialPosition)
 {
 }