30 #include "hx3d/core/core.hpp" 31 #include "hx3d/window/events.hpp" 33 #include "hx3d/net/net.hpp" 34 #include "hx3d/audio/audio.hpp" 36 #include "hx3d/utils/assets.hpp" 49 #include "TargetConditionals.h" 50 #if TARGET_IPHONE_SIMULATOR 52 #elif TARGET_OS_IPHONE 61 Core* Core::_instance(
nullptr);
64 _assets =
new AssetManager();
65 _net =
new net::Net();
66 _audio =
new audio::AudioDevice();
79 return get()->_application;
87 return get()->_assets;
91 return get()->_events;
105 _instance =
new Core();
106 _instance->_application = app;
107 _instance->_events = events;
111 _instance->_game = game;
121 Log.
Error(
"Attempt to use the Core without initializing it.");
static window::Game * CurrentGame()
Get the game instance.
static void setGame(window::Game *game)
Set the game.
Game main class: multiple screens management.
static void shutdown()
Shutdown the core system.
static net::Net * Network()
Get the net instance.
static window::Application * App()
Get the application instance.
static AssetManager * Assets()
Get the asset manager.
void Error(const std::string fmt,...)
Write an error message.
static hx3d::LogImpl Log
Current log implementation.
static SystemType CurrentSystem
Current system type.
Centralized framework management.
static void initialize(window::Application *app, window::EventManager *events)
Initialize the core system.
static window::EventManager * Events()
Get the event manager.
static audio::AudioDevice * Audio()
Get the audio device instance.