1
#region File Description
2 //-----------------------------------------------------------------------------
5 // Microsoft XNA Community Game Platform
6 // Copyright (C) Microsoft Corporation. All rights reserved.
7 //-----------------------------------------------------------------------------
11 using Microsoft
.Xna
.Framework
;
12 using Microsoft
.Xna
.Framework
.Graphics
;
14 namespace Platformer2D
17 /// Controls the collision detection and response behavior of a tile.
22 /// A passable tile is one which does not hinder player motion at all.
27 /// An impassable tile is one which does not allow the player to move through
28 /// it at all. It is completely solid.
33 /// A platform tile is one which behaves like a passable tile except when the
34 /// player is above it. A player can jump up through a platform as well as move
35 /// past it to the left and right, but can not fall down through the top of it.
41 /// Stores the appearance and collision behavior of a tile.
45 public Texture2D Texture
;
46 public TileCollision Collision
;
48 public const int Width
= 40;
49 public const int Height
= 32;
51 public static readonly Vector2 Size
= new Vector2(Width
, Height
);
54 /// Constructs a new tile.
56 public Tile(Texture2D texture
, TileCollision collision
)
59 Collision
= collision
;