source: 2011/23/sijoseha/Fera Proelia/Fera Proelia/Fera Proelia/Tile.cs @ 2144

Revision 2141, 967 bytes checked in by sijoseha, 8 years ago (diff)

Whoa. A lot of stuff since last commit.
Implemented ScreenManager? stuff to handle all the screens.
Input is handled also.
Simple tile based map system started up.
Normal menu.
Alotofsmallstuff

Line 
1using System;
2using System.Collections.Generic;
3using Microsoft.Xna.Framework;
4using Microsoft.Xna.Framework.Graphics;
5
6namespace Fera_Proelia
7{
8    public enum TileType
9    {
10        Ground,
11    }
12
13    public class Tile : GameObject, ISelectable<Tile>
14    {
15        public static Texture2D[] Textures = new Texture2D[4];
16
17
18        public bool IsSelected { get; set; }
19
20        public event EventHandler<SelectedEventArgs<Tile>> Selected;
21        protected internal virtual void OnSelectTile(Tile tile)
22        {
23            if (Selected != null)
24                Selected(this, new SelectedEventArgs<Tile>(tile));
25        }
26
27        public TileType TileType { get; set; }
28
29        public Tile(Vector2 position, float width, float height)
30            : base(width, height)
31        {
32            Position = position;
33            HitBounds = new Rectangle((int)position.X, (int)position.Y, (int)width, (int)height);
34        }
35    }
36}
Note: See TracBrowser for help on using the repository browser.