示例#1
0
 public static void turnLightOn()
 {
     lights.Clear();
     map = new Lightmap(12, 67, 40);
     lights.Add(new Light(true));
     SoundComponent.decreaseFrequency();
 }
示例#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();
        }
示例#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);
            }
        }
示例#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;
            }
        }
示例#5
0
 public static void turnOffLights()
 {
     lights.Clear();
     map = new Lightmap(12, 67, 40);
     SoundComponent.increaseFrequency();
 }