Beispiel #1
0
        public DiverGame()
        {
            DefaultContent = Content;
            graphicsDeviceManager = new GraphicsDeviceManager(this);

            Content.RootDirectory = "Content";
            IsMouseVisible = true;

            audioDevice = new AudioDevice();
            audioMixer = new AudioMixer(audioDevice);
            state = new State();
            state.Input = new Input();
        }
Beispiel #2
0
        public void Update(State s)
        {
            isMiniMapShowing ^= s.Input.WasPressed(Input.Action.Map);

            if (s.Input.WasPressed(Input.Action.Item1))
            {
                //LoadState();
            }

            foreach(KeyValuePair<string, Room> keyValuePair in rooms)
            {
                if (keyValuePair.Value != null)
                {
                    keyValuePair.Value.Update(s, currentRoom == keyValuePair.Value);
                }
            }

            foreach (EntityTransition entityTransition in entityTransitions)
            {
                PerformTransition(entityTransition);
            }

            entityTransitions.Clear();
        }