You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
832 B
C++
36 lines
832 B
C++
/******************************************************************************
|
|
* File - entity.cpp
|
|
* Author - Joey Pollack
|
|
* Date - 2022/05/23 (y/m/d)
|
|
* Mod Date - 2022/05/23 (y/m/d)
|
|
* Description - Provides functionality to work with world entities
|
|
******************************************************************************/
|
|
|
|
#include "entity.h"
|
|
#include "world.h"
|
|
|
|
namespace lunarium
|
|
{
|
|
Entity::Entity(World& w)
|
|
: mHandle(entt::null), mWorld(w)
|
|
{
|
|
mUUID = UUID::GetNewID();
|
|
Init();
|
|
}
|
|
|
|
Entity::Entity(World& w, LUUID uuid, entt::entity handle)
|
|
: mHandle(handle), mWorld(w), mUUID(uuid)
|
|
{
|
|
Init();
|
|
}
|
|
|
|
void Entity::Init()
|
|
{
|
|
mHandle = mWorld.GetEntityRegistry()->create();
|
|
}
|
|
|
|
LUUID Entity::GetUUID() const
|
|
{
|
|
return mUUID;
|
|
}
|
|
} |