Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using Microsoft.Xna.Framework;
- using Microsoft.Xna.Framework.Content;
- using Microsoft.Xna.Framework.Graphics;
- namespace Platformer2D.Map_Objects
- {
- public class Tiles
- {
- protected Texture2D texture;
- private Rectangle rectangle;
- public Rectangle Rectangle
- {
- get
- {
- return rectangle;
- }
- protected set
- {
- rectangle = value;
- }
- }
- private static ContentManager content;
- public static ContentManager Content
- {
- protected get
- {
- return content;
- }
- set
- {
- content = value;
- }
- }
- public void Draw(SpriteBatch spriteBatch)
- {
- spriteBatch.Draw(texture, rectangle, Game.defaultColour);
- }
- }
- public class CollisionTiles : Tiles
- {
- public CollisionTiles(int i, Rectangle newRectangle)
- {
- texture = Content.Load<Texture2D>("Graphics/Tiles/tile_" + i);
- this.Rectangle = newRectangle;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement