/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
Data/Tools/ezEditor/CppProject/CppSource/CppProjectPlugin/GameState/CppProjectGameState.h
38 строк
2 KB
C-Core
Try to find the preload collection for the startup scene (#1720)
23 ноя 2025, 13:22
Не верифицирован
23 ноя 2025, 13:22
911d5a8
Код
Авторство
О чём код?
#pragma once #include <Core/Input/Declarations.h> #include <Core/World/Declarations.h> #include <CppProjectPlugin/CppProjectPluginDLL.h> #include <GameEngine/GameApplication/GameApplication.h> #include <GameEngine/GameState/FallbackGameState.h> #include <GameEngine/GameState/GameState.h> // the ezFallbackGameState adds a free flying camera and a scene switching menu, so can be useful in the very beginning // but generally it's better to use ezGameState instead // using CppProjectGameStateBase = ezFallbackGameState; using CppProjectGameStateBase = ezGameState; class CppProjectGameState : public CppProjectGameStateBase { EZ_ADD_DYNAMIC_REFLECTION(CppProjectGameState, CppProjectGameStateBase); public: CppProjectGameState(); ~CppProjectGameState(); virtual void ProcessInput() override; protected: virtual void ConfigureInputActions() override; virtual void ConfigureMainCamera() override; virtual ezResult SpawnPlayer(ezStringView sStartPosition, const ezTransform& startPositionOffset) override; virtual void OnChangedMainWorld(ezWorld* pPrevWorld, ezWorld* pNewWorld, ezStringView sStartPosition, const ezTransform& startPositionOffset) override; virtual void GetStartupOptions(ezString& out_sScene, ezString& out_sPreloadCollection) override; private: virtual void OnActivation(ezWorld* pWorld, ezStringView sStartPosition, const ezTransform& startPositionOffset) override; virtual void BeforeWorldUpdate() override; virtual void AfterWorldUpdate() override; ezDeque<ezGameObjectHandle> m_SpawnedObjects; };