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;
using Microsoft.Xna.Framework.Input;
namespace CarFire
{
///
/// Base class for all Characters,
/// includes: basic position information,
/// character Texture
/// health
/// damage
///
public class Character
{
//Member Variables
Map theMap;
int movementSpeed;
int gridX;
int gridY;
Texture2D charModel;
int health;
int damage;
int range;
bool isMoving;
int pixelX;
int pixelY;
///
/// Call this method to give the game a chance to load its content.
///
/// The map that this character will interact with
/// The model for this character
/// How fast the character moves
/// The starting health of the character
/// The base damage of the character
/// The range of the character attack
public Character( Map _currentMap,
Texture2D _charModel,
int _baseMovementSpeed,
int _baseHealth,
int _baseDamage,
int _baseRange)
{
theMap = _currentMap;
movementSpeed = _baseMovementSpeed;
gridX = 100; //should be included in the map as a designated spawn point to begin map
gridY = 100; //
charModel = _charModel;
health = _baseHealth;
range = _baseRange;
isMoving = false;
pixelX = gridX * 1; // 1 needs to be changed to the size of the map grid, also someway need to be determined to change to screen cordinates from would the world cordinates
pixelY = gridY * 1; //
}
public void Draw(SpriteBatch spriteBatch)
{
spriteBatch.Draw(charModel, new Vector2(pixelX, pixelY), null, Color.White, 0, new Vector2(0f,0f), 1f, SpriteEffects.None, 0);
}
///
/// Adjust Health of player
///
public int Health
{
get { return health; }
set { health = value; }
}
public bool IsMoving
{
get { return isMoving; }
}
}
///
/// A manager class to handle network interactions between peers and
/// lobby/game switching.
///
public class Player : Character
{
//Member Variables
public Player( Map _currentMap,
Texture2D _charModel,
int _baseMovementSpeed,
int _baseHealth,
int _baseDamage,
int _baseRange)
: base(_currentMap,_charModel,_baseMovementSpeed, _baseHealth, _baseDamage, _baseRange)
{
}
public void Update()
{
}
}
///
/// A manager class to handle network interactions between peers and
/// lobby/game switching.
///
public class Monster : Character
{
//Member Variables
public Monster( Map _currentMap,
Texture2D _charModel,
int _baseMovementSpeed,
int _baseHealth,
int _baseDamage,
int _baseRange)
: base(_currentMap,_charModel,_baseMovementSpeed, _baseHealth, _baseDamage, _baseRange)
{
}
public void Update()
{
}
}
//this is for testing purposes only!
public class Map
{
public Map()
{
}
}
}