Exemplo n.º 1
0
 public static void turnLightOn()
 {
     lights.Clear();
     map = new Lightmap(12, 67, 40);
     lights.Add(new Light(true));
     SoundComponent.decreaseFrequency();
 }
Exemplo n.º 2
0
        protected override void Initialize()
        {
            otherDevice = this.GraphicsDevice;
            camera      = new Camera2D(this);
            Components.Add(camera);
            lights = new LightComponent(this);
            Components.Add(lights);
            sound = new SoundComponent(this);
            Components.Add(sound);
            f = new Floor1();

            mBox = new MessageBox();
            base.Initialize();
        }
Exemplo n.º 3
0
        public override void update(GameTime gameTime, Floor floor)
        {
            if (done || measureDis(floor.Character) < 220)
            {
                done = true;
                Open = false;
                return;
            }


            base.update(gameTime, floor);

            time += (float)gameTime.ElapsedGameTime.TotalSeconds;
            if (time >= 1f)
            {
                Open = !Open;
                time = 0;
                SoundComponent.playEffect(Sound.DoorOpening, .25f);
            }
        }
Exemplo n.º 4
0
        public virtual void update(GameTime gameTime, Floor floor)
        {
            base.update(gameTime);

            //Check if play near by
            if (this == floor.Character.Focus)
            {
                this.color = new Color(185, 185, 185);
                hasFocus(floor);

                //Play sound
                if (Input.actionBarPressed() && sound != null)
                {
                    SoundComponent.playEffect(sound);
                }
            }
            else
            {
                this.color = Color.White;
            }
        }
Exemplo n.º 5
0
 public static void turnOffLights()
 {
     lights.Clear();
     map = new Lightmap(12, 67, 40);
     SoundComponent.increaseFrequency();
 }