Пример #1
0
        public void Initialize(GameEngineStateInitReason reason, AudioEngine audioEngine, SimulationSettingsValue simulationValue)
        {
            if (referenceCount == 0)
            {
                componentCache.Initialize();
                gameEngineState.Initialize(simulationValue, componentCache, reason);

                if (reason == GameEngineStateInitReason.Playing)
                {
                    audioEngineState.Initialize(audioEngine, componentCache, gameEngineState);
                }
            }

            ++referenceCount;
        }
Пример #2
0
        public void Initialize(GameEngineStateInitReason reason, AudioEngine audioEngine, SimulationSettingsValue simulationValue, string[] sofaFileNames)
        {
            if (referenceCount == 0)
            {
                componentCache.Initialize();
                gameEngineState.Initialize(simulationValue, componentCache, reason);

                if (reason == GameEngineStateInitReason.Playing)
                {
                    audioEngineState = AudioEngineStateFactory.Create(audioEngine);
                    audioEngineState.Initialize(componentCache, gameEngineState, sofaFileNames);
                }
            }

            ++referenceCount;
        }