public virtual void Initialize(Texture2D texture, Vector2 position, OdinLevels LevelController) { objectTexture = texture; levelController = LevelController; // Set the starting position of the object around the middle of the screen and to the back Position = position; // Set the object to be active Active = true; }
public virtual void Initialize(Texture2D Texture, Vector2 position, Animation animate, OdinLevels LevelController) { texture = Texture; animation = animate; levelController = LevelController; Position = position; // Set the object to be active active = true; // Set the object health }
public override void Initialize(Texture2D Texture, Vector2 Position, Animation AttackAnimation, Animation WalkingAnimation, Animation DeathAnimation, OdinLevels LevelController) { position = Position; levelController = LevelController; texture = Texture; attackAnimation = AttackAnimation; walkingAnimation = WalkingAnimation; deathAnimation = DeathAnimation; bloodSplat = LevelController.Content.Load<Texture2D>("blood_splat"); // load the players hitbox enemyHitBoxTexture = new Texture2D(levelController.ScreenManager.GraphicsDevice, 1, 1); enemyHitBoxTexture.SetData(new Color[] { Color.Transparent }); borderLine = new Texture2D(levelController.ScreenManager.GraphicsDevice, 1, 1); borderLine.SetData(new[] { Color.White }); health = 100; }
public virtual void Initialize(Texture2D Texture, Vector2 postion, Animation AttackAnimation, Animation WalkingAnimation, Animation DeathAnimation, OdinLevels LevelController) { }
public void Initialize(Vector2 position, Dictionary<string, Texture2D> spellsDict, OdinLevels LevelController) { deathCounter = 0; dyingCounter = 0; playerResources = new PlayerResourceController(); playerAnimationController = new PlayerAnimationController(); levelController = LevelController; spells = spellsDict; //sounds playerAttackingSound = LevelController.Content.Load<SoundEffect>("Soundeffects\\PlayerAttack"); heroWalkingSound = levelController.Content.Load<SoundEffect>("Soundeffects\\heroWalking"); lightningSound = levelController.Content.Load<SoundEffect>("Soundeffects\\lightning"); heroDying = levelController.Content.Load<SoundEffect>("Soundeffects\\heroDying"); // Set the starting position of the player around the middle of the screen and to the back PlayerPosition = position; // Set the player to be active //active = true; playerHit = false; // load the players hitbox playerAnimationController.PlayerHitBoxTexture = new Texture2D(levelController.ScreenManager.GraphicsDevice, 1, 1); playerAnimationController.PlayerHitBoxTexture.SetData(new Color[] { Color.Transparent }); playerAnimationController.BorderLine = new Texture2D(levelController.ScreenManager.GraphicsDevice, 1, 1); playerAnimationController.BorderLine.SetData(new[] { Color.White }); }