Leviathan  0.8.0.0
Leviathan game engine
GameWorldFactory.h
Go to the documentation of this file.
1 // Leviathan Game Engine
2 // Copyright (c) 2012-2018 Henri Hyyryläinen
3 #pragma once
4 #include "Include.h"
5 // ------------------------------------ //
6 #include <memory>
7 
8 namespace Leviathan {
9 
10 class PhysicsMaterialManager;
11 class GameWorld;
12 
16 public:
19 
26  DLLEXPORT virtual std::shared_ptr<GameWorld> CreateNewWorld(int worldtype,
27  const std::shared_ptr<PhysicsMaterialManager>& physicsMaterials, int overrideid = -1);
28 
29  DLLEXPORT static GameWorldFactory* Get();
30 
31 protected:
34 };
35 
37 enum class INBUILT_WORLD_TYPE : int32_t { Standard = 1024 };
38 
41 public:
42  static std::shared_ptr<GameWorld> CreateNewWorld(INBUILT_WORLD_TYPE worldtype,
43  const std::shared_ptr<PhysicsMaterialManager>& physicsMaterials, int overrideid = -1);
44 };
45 
46 } // namespace Leviathan
static DLLEXPORT GameWorldFactory * Get()
INBUILT_WORLD_TYPE
Types of inbuilt world types.
Allows overwriting the used GameWorld class in the engine. By default creates a StandardWorld.
static DLLEXPORT GameWorldFactory * StaticInstance
Global instance. Overwrite this in child class constructors.
#define DLLEXPORT
Definition: Include.h:84
virtual DLLEXPORT std::shared_ptr< GameWorld > CreateNewWorld(int worldtype, const std::shared_ptr< PhysicsMaterialManager > &physicsMaterials, int overrideid=-1)
Creates a new world that can be used.
Factory for inbuilt world types.
The access mask controls which registered functions and classes a script sees.
Definition: GameModule.h:12
static std::shared_ptr< GameWorld > CreateNewWorld(INBUILT_WORLD_TYPE worldtype, const std::shared_ptr< PhysicsMaterialManager > &physicsMaterials, int overrideid=-1)