/// <summary> /// Initializes a new instance of the <see cref="Player"/> class. /// </summary> /// <param name="position">The position to instanciate the player at</param> public Player(Vector2 position) : base(position, Stage.Player, 0, 0, 0, 1000) { //implement tank variables BaseImg = Tools.Content.Load <Texture2D>("Images/Sprites/Tanks/TierOne/T1PP"); Cannon = new TierOneCannon(Owner.Player, Stage.Player, BasePosition, BaseRotation); BasePosition = position; //load and implement tank explosion animation var explosionSpritesheet = Tools.Content.Load <Texture2D>("Images/Sprites/Effects/spritesheet"); ExplosionAnimation = new Animation(explosionSpritesheet, 3, 3, 9, 1, 1, 1, 2, BasePosition, 0.3f, true); }
/// <summary> /// Initializes a new instance of the <see cref="TierOneEnemy"/> class. /// </summary> /// <param name="position">The initial position.</param> /// <param name="path">The path.</param> /// <param name="stage">The stage.</param> /// <param name="rotation">The initial rotation.</param> /// <seealso cref="Tank"/> public TierOneEnemy(Vector2 position, List <Vector2> path, Stage stage, float rotation) : base(position, stage, VIEW_RANGE_OPTIONS[(int)stage], SPEED[(int)stage], ROTATION_SPEED[(int)stage], HEALTH[(int)stage], rotation) { //implmeants tank img BaseImg = Tools.Content.Load <Texture2D>("Images/Sprites/Tanks/TierOne/T1P" + ((int)stage + 1)); //implements the tank cannon Cannon = new TierOneCannon(Owner.Enemy, stage, BasePosition, BaseRotation); //implements the tank explosion animation var explosionSpritesheet = Tools.Content.Load <Texture2D>("Images/Sprites/Effects/spritesheet"); ExplosionAnimation = new Animation(explosionSpritesheet, 3, 3, 9, 1, 1, 1, 2, BasePosition, 0.3f, true); //saves the given path to member variable this.path = path; //chooses attack range and view range of this enemy based on its stage playerAttackRange = ATTACK_RANGE_OPTIONS[(int)stage]; viewRange = VIEW_RANGE_OPTIONS[(int)stage]; }