breakout the component types into a scoped enum (#1002)

* breakout the component types into a scoped enum

tested that things are the same as they were before

* fix missed rename

* fix brick-by-brick name to be crafting
because that's what it is
This commit is contained in:
Aaron Kimbrell
2023-03-04 01:16:37 -06:00
committed by GitHub
parent 2837f68f44
commit e524b86e12
106 changed files with 598 additions and 430 deletions

View File

@@ -4,13 +4,14 @@
#include "MissionComponent.h"
#include "RenderComponent.h"
#include "EntityManager.h"
#include "eReplicaComponentType.h"
void GfCampfire::OnStartup(Entity* self) {
self->SetI32(u"counter", static_cast<int32_t>(0));
self->SetProximityRadius(2.0f, "placeholder");
self->SetBoolean(u"isBurning", true);
auto* render = static_cast<RenderComponent*>(self->GetComponent(COMPONENT_TYPE_RENDER));
auto* render = static_cast<RenderComponent*>(self->GetComponent(eReplicaComponentType::RENDER));
if (render == nullptr)
return;
@@ -20,7 +21,7 @@ void GfCampfire::OnStartup(Entity* self) {
void GfCampfire::OnFireEventServerSide(Entity* self, Entity* sender, std::string args, int32_t param1, int32_t param2,
int32_t param3) {
if (args == "physicsReady") {
auto* render = static_cast<RenderComponent*>(self->GetComponent(COMPONENT_TYPE_RENDER));
auto* render = static_cast<RenderComponent*>(self->GetComponent(eReplicaComponentType::RENDER));
render->PlayEffect(295, u"running", "Burn");
}