public MainHero(Texture2D Texture, Vector2 StartPos) { keyboardState = keyboardStatePast = new KeyboardState(); width = 57; height = 57; position = StartPos; texture = Texture; speed = 10f; health = 5000; //rectangle = new Rectangle((int)StartPos.X, (int)StartPos.Y, Width, Height); rectangle = new RectangleV3(StartPos, width, height); guns = new Weapon[4]; guns[0] = new Pistol(); //guns[0].isEnemy = false; guns[1] = new Blaster(); // guns[1].isEnemy = false; guns[2] = new Lightsaber(); // guns[2].isEnemy = false; guns[3] = new Rocket(); // guns[3].isEnemy = false; //guns[1] = new Blaster(); //guns[2] = new Lightsaber(); abilities = new List <Ability>(); //abilities.Add(new Standart(this)); }
public LightsaberFire(Vector2 startPosition, Vector2 direction, bool isEnemy, Lightsaber lightsaber) { this.lightsaber = lightsaber; this.damage = 1; this.position = startPosition; this.direction = direction; // rec2 = new RectangleV2(direction, width, height, startPosition); // rectangle = new Rectangle((int)startPosition.X, (int)startPosition.Y, width, height); rec = new RectangleV3(startPosition, 0.5f, 0.5f, direction, width, height); this.isEnemy = isEnemy; /* this.width = width; * this.height = height; * this.startpos = startpos; * Pos = startpos; * rectangle = new Rectangle((int)startpos.X, (int)startpos.Y, width, height); * Velocity = new Vector2(endpos.X-startpos.X , endpos.Y-startpos.Y); * rec2 = new RectangleV2(Velocity, width, height, startpos); * damage = 1;*/ }