Just™ Game Engine
Public Member Functions | Static Public Member Functions | Friends | List of all members
jng::Scene Class Reference

#include <scene.hpp>

Public Member Functions

 Scene ()=default
 
 ~Scene ()
 
Entity createEntity (const std::string &name)
 
Entity createEntity (const std::string &name, GUID id)
 
Entity duplicateEntity (Entity other)
 
void destroyEntity (Entity entity)
 
void onCreate (f32 gravity)
 
void onDestroy ()
 
void onUpdate (f32 dt)
 
void onEvent (Event &event)
 
template<typename Func >
void each (Func func)
 
template<typename Component , typename Func >
void sort (Func func)
 
template<typename Component , typename Func >
void each (Func func)
 
void setViewportSize (f32 width, f32 height)
 

Static Public Member Functions

static Ref< Scenecopy (const Ref< Scene > &other)
 

Friends

class EditorLayer
 
class Entity
 
class SceneSerializer
 

Constructor & Destructor Documentation

◆ Scene()

jng::Scene::Scene ( )
default

◆ ~Scene()

jng::Scene::~Scene ( )

Member Function Documentation

◆ copy()

Ref< Scene > jng::Scene::copy ( const Ref< Scene > &  other)
static

◆ createEntity() [1/2]

Entity jng::Scene::createEntity ( const std::string &  name)

◆ createEntity() [2/2]

Entity jng::Scene::createEntity ( const std::string &  name,
GUID  id 
)

◆ destroyEntity()

void jng::Scene::destroyEntity ( Entity  entity)

◆ duplicateEntity()

Entity jng::Scene::duplicateEntity ( Entity  other)

◆ each() [1/2]

template<typename Func >
void jng::Scene::each ( Func  func)

◆ each() [2/2]

template<typename Component , typename Func >
void jng::Scene::each ( Func  func)

◆ onCreate()

void jng::Scene::onCreate ( f32  gravity)

◆ onDestroy()

void jng::Scene::onDestroy ( )

◆ onEvent()

void jng::Scene::onEvent ( Event event)

◆ onUpdate()

void jng::Scene::onUpdate ( f32  dt)

◆ setViewportSize()

void jng::Scene::setViewportSize ( f32  width,
f32  height 
)
inline

◆ sort()

template<typename Component , typename Func >
void jng::Scene::sort ( Func  func)

Friends And Related Function Documentation

◆ EditorLayer

friend class EditorLayer
friend

◆ Entity

friend class Entity
friend

◆ SceneSerializer

friend class SceneSerializer
friend

The documentation for this class was generated from the following files: