public StandardProjectile(Texture2D texture, double bulletVel, int lifeSpan, int damage, string sound, SoundFX effect) { this.texture = texture; this.bulletVel = bulletVel; this.yAcc = 0; this.lifeSpan = lifeSpan; this.damage = damage; this.effect = effect; this.sound = sound; }
public MenuGrid(Texture2D background, IMenuItem[,] items, Rectangle itemZone) { this.background = background; this.items = items; this.currentItemX = 0; this.currentItemY = 0; this.itemsWidth = items.GetUpperBound(0) + 1; this.itemsHeight = items.GetUpperBound(1) + 1; this.itemZone = itemZone; this.items[0, 0].SetIsHighlighted(true); sound = new SoundFX(); }
public void InitializeArsenal(Texture2D pistolTexture, Texture2D shotgunTexture, Texture2D railgunTexture, Texture2D machinegunTexture, Texture2D bumblegunTexture, float num, SoundFX SoundLibrary) { arsenal.Add( new GunData( "G-32_C Phazer Pistol", // name false, // unlocked 0, // cooldown new StandardProjectile(pistolTexture, 5, -1, 10, // projectile data "click1", SoundLibrary), // sound false, // automatic 13, // barrel X 8, // barrel Y 7, // angled barrel X 8) // angled barrel Y ); arsenal.Add( new GunData("Flouroantimonic Shotgun", false, 15, new StandardProjectile(shotgunTexture, 5, 15, 20, "click2", SoundLibrary), false, 16, 8, 10, 6)); arsenal.Add( new GunData("IT-6.7 Rail Gun", false, 5, new StandardProjectile(railgunTexture, 5, -1, 50, "click1", SoundLibrary), false, 14, 8, 9, 9)); arsenal.Add( new GunData("Magmatorque Nail-Gun", false, 7, new StandardProjectile(machinegunTexture, 6, -1, 10, "click1", SoundLibrary), true, 18, 7, 10, 6)); arsenal.Add( new GunData("Symbionic Hive-Oscilator", false, 5, new SinusoidalProjectile(bumblegunTexture, 2.2, -1, 20, 7, 2, true, "bees", SoundLibrary), true, 17, 9, 10, 5)); }
public SaveStation(double worldX, double worldY, Texture2D texture, Vector2 mapCoordinates, int numFrames, int frameNum) : base(worldX, worldY, texture, new Vector2((float)worldX - mapCoordinates.X, (float)worldY - mapCoordinates.Y), numFrames, frameNum, false) { dialUp = new SoundFX(); }
public SinusoidalProjectile(Texture2D texture, double bulletVel, int lifeSpan, int damage, double amplitude, double frequency, bool random, string sound, SoundFX effect) : base(texture, bulletVel, lifeSpan, damage, sound, effect) { this.bulletVel = bulletVel; this.amplitude = amplitude / 10; this.frequency = frequency / amplitude; this.random = random; }
public Projectile(IProjectileData data, Directions direction, ISprite origin, Vector2 mapCoordinates, double worldX, double worldY, int frameNum, bool mirrorX, string cue, SoundFX effect) : base(worldX, worldY, data.GetTexture(), new Vector2((float)worldX - mapCoordinates.X, (float)worldY - mapCoordinates.Y), data.GetNumFrames(), frameNum, mirrorX) { Random rnd = new Random(); this.random = rnd.Next(); this.data = data; this.origin = origin; this.life = 0; this.damage = data.GetDamage(); this.direction = direction; effect.Play(StringConverter(cue)); }