public Character(Rectangle winSize, Vector2 position, int width, int height, string assetName, int textureColumns, int textureLines) { _windowSize = winSize; _position = position; _graphicalBounds = new GraphicalBounds<CharacterActions>(new Dictionary<CharacterActions, Rectangle>()); _sprite = new AnimatedSprite(new Rectangle((int)position.X - width / 2, (int)position.Y - height, width, height), winSize, assetName, textureColumns, textureLines, 30, 1, -1, -1, true); _canMove = true; _jumping = false; _jumpHeight = 0; _direction = true; // = right _timer = 0; _physics = new Physics(); Life = 1; _action = CharacterActions.StandRight; _attacks = new Dictionary<CharacterActions, Attack>(); }
public Character(Rectangle winSize, Vector2 position, int width, int height, string assetName, int textureColumns, int textureLines) { this._windowSize = winSize; this._position = position; Damage = 1; this._weapons = new List<Weapon>(); this._graphicalBounds = new GraphicalBounds<CharacterActions>(new Dictionary<CharacterActions, Rectangle>()); this._sprite = new AnimatedSprite(new Rectangle((int)position.X - width / 2, (int)position.Y - height, width, height), winSize, assetName, textureColumns, textureLines, 30, 1, -1, -1, true); this._canMove = true; this._jumping = false; this._jumpHeight = 0; this._direction = true; this._timer = 0; this._physics = new Physics(200, 1000); this.Life = 1f; this._action = CharacterActions.StandRight; this._attacks = new Dictionary<CharacterActions, Attack>(); Armor = 1; CanBeStunned = true; }