public HelixBuilder(Vector2 Position, Vector2 Home, float rotation = 0, int team = 0) : base(Position, Home, rotation, team) { guns[0] = new HelixGun(this, new Vector2(7, -8), rotation - (float)Math.PI / 2); guns[1] = new HelixGun(this, new Vector2(-7, -8), rotation - (float)Math.PI / 2); entityID = 17; health = maxHealth = 40; foreach (Turret turret in guns) { turret.UpdateRelativePosition(); } }
public override void SpecialUpdate() { if (moveGuns) { gunTrigCounter += (float)Math.PI / 10; } limiter++; for (int t = 0; t < guns.Length; t++) { HelixGun turret = guns[t]; turret.UpdateRelativePosition(new Vector2((float)Math.Cos(gunTrigCounter) * 7 * (t == 0 ? 1: -1), -8)); turret.AimToward(-(float)Math.PI / 2); if (moveGuns) { if (limiter % 2 == 0) { turret.Shoot(t == 0, (float)-Math.Sin(gunTrigCounter) * 7 * (t == 0 ? 1 : -1) > 0 ? 1 : -1); } } } }