refactor to class style and not c style

This commit is contained in:
David Markowitz
2023-08-05 01:21:59 -07:00
parent 42de987e25
commit af8bc2c458
10 changed files with 406 additions and 606 deletions

View File

@@ -5,6 +5,7 @@
#include "Character.h"
#include "dZoneManager.h"
#include "RenderComponent.h"
#include "MovingPlatformComponent.h"
void CavePrisonCage::OnStartup(Entity* self) {
const auto& myNum = self->GetVar<std::u16string>(u"myNumber");
@@ -83,8 +84,8 @@ void CavePrisonCage::SpawnCounterweight(Entity* self, Spawner* spawner) {
return;
}
// Move the counterweight down 2 units
counterweight->SetPosition(counterweight->GetPosition() + NiPoint3(0, -2, 0));
auto* mpc = counterweight->GetComponent<MovingPlatformComponent>();
if (mpc) mpc->StartPathing();
// Serialize the counterweight
Game::entityManager->SerializeEntity(counterweight);