public virtual Bullet CreateBullet(Property.BulletType t, float angle, BulletFactory factory) { Vector2 direction = new Vector2(0, 0); return(factory.CreateBullet(t, this.entPosition, direction, (float)3.15, bulletStrat)); }
public Bullet CreateBullet(Property.BulletType typeOfBullet, Vector2 position, Vector2 direction, float angle, int movementPattern) { Texture2D missileTexture; Bullet newBullet; bool is_spin = false; switch (typeOfBullet) { case Property.BulletType.Red: missileTexture = Property.spriteDict["missileRed"]; break; case Property.BulletType.Blue: missileTexture = Property.spriteDict["missileBlue"]; break; case Property.BulletType.Green: missileTexture = Property.spriteDict["missileGreen"]; is_spin = true; break; case Property.BulletType.Yellow: missileTexture = Property.spriteDict["missileYellow"]; break; case Property.BulletType.Special: missileTexture = Property.spriteDict["specialFist"]; newBullet = new Bullet(missileTexture, position, direction, angle, false, movementPattern); newBullet.size = 100; newBullet.entSpeed = 12; newBullet.hitbox.Width = 96; newBullet.hitbox.Height = 96; newBullet.hitbox.X += 64; newBullet.hitbox.Y += 48; return(newBullet); default: missileTexture = Property.spriteDict["missile"]; break; } newBullet = new Bullet(missileTexture, position, direction, angle, is_spin, movementPattern); return(newBullet); }
public override Bullet CreateBullet(Property.BulletType t, float angle, BulletFactory factory) // Bosses must override CreatBullet() to implement the decorator { return(base.CreateBullet(t, angle, factory)); }
public Bullet CreateBullet(Property.BulletType t, Vector2 pos, Vector2 dir, float angle, int movementPattern) { Bullet newBullet = bulletFactory.CreateBullet(t, pos, dir, angle, movementPattern); // A unique ID must be set in the factory return(newBullet); }