mirror of
https://github.com/Squareville/TestEventServer.git
synced 2026-01-04 01:29:32 -06:00
format codebase
This commit is contained in:
@@ -2,67 +2,54 @@
|
||||
#include "MovingPlatformComponent.h"
|
||||
#include "GameMessages.h"
|
||||
|
||||
void FallingTile::OnStartup(Entity* self)
|
||||
{
|
||||
auto* movingPlatfromComponent = self->GetComponent<MovingPlatformComponent>();
|
||||
void FallingTile::OnStartup(Entity* self) {
|
||||
auto* movingPlatfromComponent = self->GetComponent<MovingPlatformComponent>();
|
||||
|
||||
if (movingPlatfromComponent == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (movingPlatfromComponent == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
movingPlatfromComponent->SetSerialized(true);
|
||||
movingPlatfromComponent->SetSerialized(true);
|
||||
}
|
||||
|
||||
void FallingTile::OnCollisionPhantom(Entity* self, Entity* target)
|
||||
{
|
||||
if (self->GetVar<bool>(u"AboutToFall"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
void FallingTile::OnCollisionPhantom(Entity* self, Entity* target) {
|
||||
if (self->GetVar<bool>(u"AboutToFall")) {
|
||||
return;
|
||||
}
|
||||
|
||||
self->AddTimer("flipTime", 0.75f);
|
||||
self->AddTimer("flipTime", 0.75f);
|
||||
|
||||
self->SetVar<bool>(u"AboutToFall", true);
|
||||
self->SetVar<bool>(u"AboutToFall", true);
|
||||
|
||||
self->SetNetworkVar<float>(u"startEffect", 2);
|
||||
self->SetNetworkVar<float>(u"startEffect", 2);
|
||||
}
|
||||
|
||||
void FallingTile::OnWaypointReached(Entity* self, uint32_t waypointIndex)
|
||||
{
|
||||
if (waypointIndex == 1)
|
||||
{
|
||||
}
|
||||
else if (waypointIndex == 0)
|
||||
{
|
||||
}
|
||||
void FallingTile::OnWaypointReached(Entity* self, uint32_t waypointIndex) {
|
||||
if (waypointIndex == 1) {
|
||||
} else if (waypointIndex == 0) {
|
||||
}
|
||||
}
|
||||
|
||||
void FallingTile::OnTimerDone(Entity* self, std::string timerName)
|
||||
{
|
||||
auto* movingPlatfromComponent = self->GetComponent<MovingPlatformComponent>();
|
||||
void FallingTile::OnTimerDone(Entity* self, std::string timerName) {
|
||||
auto* movingPlatfromComponent = self->GetComponent<MovingPlatformComponent>();
|
||||
|
||||
if (movingPlatfromComponent == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (movingPlatfromComponent == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (timerName == "flipTime")
|
||||
{
|
||||
self->AddTimer("flipBack", 2.0f);
|
||||
if (timerName == "flipTime") {
|
||||
self->AddTimer("flipBack", 2.0f);
|
||||
|
||||
self->SetNetworkVar<float>(u"stopEffect", 3);
|
||||
self->SetNetworkVar<float>(u"stopEffect", 3);
|
||||
|
||||
movingPlatfromComponent->GotoWaypoint(1);
|
||||
movingPlatfromComponent->GotoWaypoint(1);
|
||||
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), -1, u"down", "down");
|
||||
}
|
||||
else if (timerName == "flipBack")
|
||||
{
|
||||
self->SetVar<bool>(u"AboutToFall", false);
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), -1, u"down", "down");
|
||||
} else if (timerName == "flipBack") {
|
||||
self->SetVar<bool>(u"AboutToFall", false);
|
||||
|
||||
movingPlatfromComponent->GotoWaypoint(0);
|
||||
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), -1, u"up", "up");
|
||||
}
|
||||
movingPlatfromComponent->GotoWaypoint(0);
|
||||
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), -1, u"up", "up");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user