예제 #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();
        }
예제 #2
0
파일: Sea.cs 프로젝트: weimingtom/db-diver
        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();
        }