-
Notifications
You must be signed in to change notification settings - Fork 0
/
livingEntity.cs
35 lines (27 loc) · 954 Bytes
/
livingEntity.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace AscensionGame
{
public abstract class livingEntity
{
public Rectangle currentRectangle;
//Implement random starting positions for all spawning creatures.
public Vector2 spawnPos;
public static List<tile> nearbyTiles = new List<tile>();
//The x tile and the y tile of the character's position
public static int xTile, yTile;
public virtual void Update()
{
nearbyTiles.Clear();
xTile = (int)(currentRectangle.Location.X + gameScreen.currentCameraPos.X) / tile.tileSize;
yTile = (int)(currentRectangle.Location.Y + gameScreen.currentCameraPos.Y) / tile.tileSize;
}
public virtual void Draw()
{
}
}
}