Exemplo 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;
 }
Exemplo n.º 2
0
		internal SoundInstance(Sound sound)
		{
			this.sound = sound;
			Volume = 1.0f;
			Panning = 0.0f;
			Pitch = 1.0f;
		}
Exemplo 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;
		}
Exemplo 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);
 }
Exemplo 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();
 }
Exemplo 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");
 }
Exemplo 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;
 }
Exemplo 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;
 }