public void Initialize(Level levelInput ,Texture2D textureInput, Vector2 positionInput) { this._level = levelInput; _texture = textureInput; //set the starting position of the player around the middle of the scrren and to the back _position = positionInput; //set the player to be alive _isAlive = true; //set the player health _health = 100; loadContent(); //sets the player movement speed _velocity = Vector2.Zero; //constructs the list of moves _moves = new Move[] { new Move("RunLeft", Direction.Left) { IsSubMove = true }, new Move("RunRight", Direction.Right) { IsSubMove = true }, new Move("SprintLeft", Direction.Left, Direction.Left), new Move("SprintRight", Direction.Right, Direction.Right), //new Move("Jump", Buttons.A) { IsSubMove = true }, }; //constructs a move list which will store its own copy of the moves array. _currentMoveList = new MovesList(_moves); //create an InputManager for the player with a sufficiently large buffer _inputManager = new InputManager(_currentMoveList.LongestMoveLength); }
public override void Initialize(Player player, Level level, Vector2 position, int health, int movementSpeed, int damage, int exp) { _player = player; base.Initialize(level, position, health, damage, movementSpeed, exp); }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { //Initialize the player class playerCharacter = new Player(); sampleLevel = new Level(); //Temporary, need to level scanning and automatic adding to the list enemyCharacter = new TheShredder(); enemyList.Add(enemyCharacter); base.Initialize(); }
public void Initialize(Level levelInput, Vector2 position, int health, int damage, int movementSpeed, int exp) { this._level = levelInput; _position = position; _isAlive = true; _health = 100; _damage = 10; _movementSpeed = movementSpeed; _exp = 100; }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { //Initialize the player class playerCharacter = new Player(); sampleLevel = new Level(); enemyCharacter = new TheShredder(); base.Initialize(); }