Finish lecture 82: Implement the World class
Signed-off-by: Daniel Henry <iamdanhenry@gmail.com>
This commit is contained in:
36
LightYearsEngine/src/framework/World.cpp
Normal file
36
LightYearsEngine/src/framework/World.cpp
Normal file
@@ -0,0 +1,36 @@
|
||||
#include "framework/World.h"
|
||||
#include "framework/Core.h"
|
||||
|
||||
namespace ly {
|
||||
World::World(Application* owningApp) : mOwningApp{ owningApp }, mBeganPlay{ false } {
|
||||
|
||||
}
|
||||
|
||||
void World::BeginPlayInternal() {
|
||||
if (!mBeganPlay) {
|
||||
mBeganPlay = true;
|
||||
BeginPlay();
|
||||
}
|
||||
}
|
||||
|
||||
World::~World()
|
||||
{
|
||||
}
|
||||
|
||||
void World::TickInternal(float deltaTime)
|
||||
{
|
||||
Tick(deltaTime);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void World::BeginPlay()
|
||||
{
|
||||
LOG("Began Play");
|
||||
}
|
||||
|
||||
void World::Tick(float deltaTime)
|
||||
{
|
||||
LOG("Ticking at frame rate: %f", 1.f / deltaTime);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user