public Tile(Vector2 a_position, int a_height, TileMap a_tileMap) : base(a_position * new Vector2(TILE_WIDTH - 32, TILE_HEIGHT) - new Vector2(0, a_height * 40)) { X = (int)a_position.X; Y = (int)a_position.Y; m_layer = 0.500f - a_position.Y / 1000f; m_tileMap = a_tileMap; if (MathManager.isEven((int)a_position.X)) { m_layer -= 0.0001f; } m_tileState = TileState.Normal; m_color = Color.White; m_heightSprites = new Sprite[a_height]; m_height = a_height; m_tileMap = ((GameState)Game.getInstance().getCurrentState()).getTileMap(); for (int i = 0; i < a_height; i++) { m_heightSprites[i] = new Sprite("Tiles//" + m_tileMap.getTileSet() + "mellangrej.png", 1); } }
public override void load() { if (m_targetRecticle == null) { m_targetRecticle = new Sprite("Indicators/target.png", 1); m_targetRecticle.load(); m_targetRecticle.p_offset = m_targetOffset; } }