Esempio n. 1
0
        /// <summary>
        /// Creates a basic non-collidable tile.
        /// </summary>
        /// <param name="texture">Texture for the tile.</param>
        /// <param name="position">Position of the tile.</param>
        /// <param name="tileSize">Size of the file.</param>
        /// <param name="rotation">Rotation of the tile.</param>
        /// <returns>The created non collidable tile</returns>
        public ITile CreateNonCollidableTile(Texture2D texture, Vector2 position, Rectangle tileSize, float rotation)
        {
            var tile = new Tiles.Tile(m_spriteBatch, texture, position, tileSize, rotation);

            NonCollidableTiles.Add(tile);
            Tiles.Add(tile);

            return(tile);
        }
        /// <summary>
        /// Creates a basic non-collidable tile.
        /// </summary>
        /// <param name="texture">Texture for the tile.</param>
        /// <param name="position">Position of the tile.</param>
        /// <param name="tileSize">Size of the file.</param>
        /// <param name="rotation">Rotation of the tile.</param>
        /// <returns>The created non collidable tile</returns>
        public ITile CreateNonCollidableTile(Texture2D texture, Vector2 position, Rectangle tileSize, float rotation)
        {
            var tile = new Tiles.Tile(m_spriteBatch, texture, position, tileSize, rotation);
            NonCollidableTiles.Add(tile);
            Tiles.Add(tile);

            return tile;
        }