2 using System.Collections.Generic;
5 using Microsoft.Xna.Framework;
6 using Microsoft.Xna.Framework.Content;
7 using Microsoft.Xna.Framework.Graphics;
8 using Microsoft.Xna.Framework.Input;
13 /// Base class for all Characters,
14 /// includes: basic position information,
19 public class Character
35 /// Call this method to give the game a chance to load its content.
37 /// <param name="_currentMap">The map that this character will interact with</param>
38 /// <param name="_charModel">The model for this character</param>
39 /// <param name="_baseMovementSpeed">How fast the character moves</param>
40 /// <param name="_baseHealth">The starting health of the character</param>
41 /// <param name="_baseDamage">The base damage of the character</param>
42 /// <param name="_baseRange">The range of the character attack</param>
43 public Character( Map _currentMap,
45 int _baseMovementSpeed,
51 movementSpeed = _baseMovementSpeed;
52 gridX = 100; //should be included in the map as a designated spawn point to begin map
54 charModel = _charModel;
58 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
59 pixelY = gridY * 1; //
62 public void Draw(SpriteBatch spriteBatch)
64 spriteBatch.Draw(charModel, new Vector2(pixelX, pixelY), null, Color.White, 0, new Vector2(0f,0f), 1f, SpriteEffects.None, 0);
68 /// Adjust Health of player
72 get { return health; }
73 set { health = value; }
78 get { return isMoving; }
83 /// A manager class to handle network interactions between peers and
84 /// lobby/game switching.
86 public class Player : Character
90 public Player( Map _currentMap,
92 int _baseMovementSpeed,
96 : base(_currentMap,_charModel,_baseMovementSpeed, _baseHealth, _baseDamage, _baseRange)
107 /// A manager class to handle network interactions between peers and
108 /// lobby/game switching.
110 public class Monster : Character
113 public Monster( Map _currentMap,
114 Texture2D _charModel,
115 int _baseMovementSpeed,
119 : base(_currentMap,_charModel,_baseMovementSpeed, _baseHealth, _baseDamage, _baseRange)
130 //this is for testing purposes only!