Esempio n. 1
1
 protected Item(Image image, Image imageEffect, Sound soundEffect, Point initialPosition)
     : base(image, Rectangle.FromCenter(initialPosition, Size.Zero))
 {
     this.imageEffect = imageEffect;
     this.soundEffect = soundEffect;
     RenderLayer = MaxRenderLayer;
 }
Esempio n. 2
0
		internal SoundInstance(Sound sound)
		{
			this.sound = sound;
			Volume = 1.0f;
			Panning = 0.0f;
			Pitch = 1.0f;
		}
Esempio n. 3
0
		protected Item(Material material, Material effectMaterial, Sound soundEffect)
			: base(material, Rectangle.FromCenter(Vector2D.Half, Size.Zero))
		{
			this.effectMaterial = effectMaterial;
			this.soundEffect = soundEffect;
			RenderLayer = (int)RenderLayers.Items + 1;
		}
Esempio n. 4
0
 public Ball(Paddle paddle, Content content, InputCommands inputCommands)
     : base(content.Load<Image>("Ball"), Rectangle.Zero)
 {
     this.paddle = paddle;
     UpdateOnPaddle();
     fireBallSound = content.Load<Sound>("PaddleBallStart");
     collisionSound = content.Load<Sound>("BallCollision");
     RegisterFireBallCommand(inputCommands);
 }
Esempio n. 5
0
 public Level(Content content, Renderer renderer, Score score)
 {
     brickImage = content.Load<Image>("Brick");
     explosionImage = content.Load<Image>("Explosion");
     explosionSound = content.Load<Sound>("BrickExplosion");
     lostBallSound = content.Load<Sound>("LostBall");
     this.renderer = renderer;
     this.score = score;
     Initialize();
 }
Esempio n. 6
0
 public override void Preview(string contentName)
 {
     verdana = ContentLoader.Load<Font>("Verdana12");
     new FontText(verdana, "Play", Rectangle.One);
     sound = ContentLoader.Load<Sound>(contentName);
     var trigger = new MouseButtonTrigger();
     trigger.AddTag("temporary");
     var soundCommand = new Command(() => sound.Play(1)).Add(trigger);
     soundCommand.AddTag("temporary");
 }
Esempio n. 7
0
 public RabbitsGrid(Content content, Renderer renderer, Time time, Score score)
     : base(GetColumns(renderer.Screen.Viewport), GetRows(renderer.Screen.Viewport))
 {
     rabbitImage = content.Load<Image>("Rabbit");
     deadRabbitImage = content.Load<Image>("DeadRabbit");
     malletHitSound = content.Load<Sound>("MalletHit");
     malletBloodImage = content.Load<Image>("BloodSplatter");
     this.renderer = renderer;
     this.score = score;
     this.time = time;
 }
Esempio n. 8
0
 public Level(Content content, Renderer renderer, Score score)
 {
     brickImage = content.Load<Image>("Brick");
     explosionImage = content.Load<Image>("Explosion");
     explosionSound = content.Load<Sound>("BrickExplosion");
     lostBallSound = content.Load<Sound>("LostBall");
     this.renderer = renderer;
     this.score = score;
     Initialize();
     renderer.Screen.ViewportSizeChanged += UpdateDrawAreas;
 }