public override SoundEvent CreateSoundScript() { SampleSoundEvent amb = new SampleSoundEvent("Broken_Packet5/5BrknAmbVamp.wav"); SampleSoundEvent bass = new SampleSoundEvent("Broken_Packet5/5BrknBassVamp.wav"); SampleSoundEvent drum = new SampleSoundEvent("Broken_Packet5/5BrknDrumVamp.wav"); SampleSoundEvent vox = new SampleSoundEvent("Broken_Packet5/5BrknVoxVamp.wav"); double durLoop = drum.Duration; // single loop duration amb.Repeat = 5; bass.Repeat = 7; drum.Repeat = 8; vox.Repeat = 1; script.AddEvent(5 /*durLoop*/, amb); script.AddEvent(0, bass); script.AddEvent(0, drum); //script.AddEvent(durLoop, vox); // add game event to 'amb' BallShape ballShape = new BallShape(0); Ball ballItem = new Ball(ballShape, new Vector2(1500f,300f),new Vector2(0f,300f), 400.0f); ItemCreateSoundEvent ice = new ItemCreateSoundEvent(ballItem); ice.AttachTo(amb); return script; }
void vol(double beatTime, SoundTrackEvent track, double measuresDuration, Ball item) { this.Add(item); if (item.nrgCharge != null) { SoundEvent sev = new VolDimSoundEvent(item.nrgCharge, measuresDuration * (4 * 60 / BPM)); track.b(beatTime, sev); // TODO rename method b ? item.StartTime = (float)Beat.BeatToTime(beatTime, BPM) - item.TrajectoryDuration; } }
Ball crBall(float y, float spd) { Ball b = new Ball("ball-titan"); //, new Vector2(2.1f, y), new Vector2(collideXposDefault, y), spd); b.Position = new Vector2(2.1f, y); float collideXposDefault = ship.Position.X + ship.WidthAbsolute / 2 + b.RadiusAbsolute; b.TargetPosition = new Vector2(collideXposDefault, y); b.VelocityScalar = spd; PowerRingWhenShipHitBehavior eff = new PowerRingWhenShipHitBehavior(); eff.RingWidth = 5.0f; eff.RingRadius = 0.07f; eff.RingColor = Color.DarkGreen; eff.Alpha = 0.5f; b.Add(eff); b.Add(new NRGcharge(Color.SeaGreen)); return b; }
Ball crBall(float y, float spd) { Ball b = new Ball("ball-supernova"); //, new Vector2(2.1f, y), new Vector2(collideXposDefault, y), spd); b.Position = new Vector2(2.1f, y); float collideXposDefault = ship.Position.X + ship.WidthAbsolute / 2 + b.RadiusAbsolute; b.TargetPosition = new Vector2(collideXposDefault, y); b.VelocityScalar = spd; PowerRingWhenShipHitBehavior eff = new PowerRingWhenShipHitBehavior(); eff.RingWidth = 5.0f; // TODO higher is less wide eff.RingRadius = 0.07f; //eff.RingColor = Color.DarkGreen; eff.RingColor = Color.Tomato; eff.Alpha = 0.5f; b.Add(eff); b.Add(new NRGcharge(Color.White)); b.Add(new BallAvoidanceBehavior()); //b.Add(new BallBallCollisionBehavior()); b.Add(new BallShipCollisionBehavior()); return b; }