// // TeapotWarsBaseGame::VRemoveActor - TODO // void CometConquestBaseGame::VRemoveActor(ActorId aid) { shared_ptr<IActor> actor = VGetActor( aid ); assert(actor && "No such actor!"); if (!actor) { return; } //Stuff about calling function when actor is destroyed BaseGameLogic::VRemoveActor(aid); //Now remove the actor from the system. safeQueEvent( IEventDataPtr( GCC_NEW EvtData_Destroy_Actor( aid ) ) ); }
void TeapotWarsLogic::VMoveActor(const ActorId id, Mat4x4 const &mat) { BaseGameLogic::VMoveActor(id, mat); // [rez] HACK: This will be removed whenever the gameplay update stuff is in. This is meant to model the death // zone under the grid. // FUTURE WORK - This would make a great basis for a Trigger actor that ran a LUA script when other // actors entered or left it! StrongActorPtr pActor = MakeStrongPtr(VGetActor(id)); if (pActor) { shared_ptr<TransformComponent> pTransformComponent = MakeStrongPtr(pActor->GetComponent<TransformComponent>(TransformComponent::g_Name)); if (pTransformComponent && pTransformComponent->GetPosition().y < -25) { shared_ptr<EvtData_Destroy_Actor> pDestroyActorEvent(GCC_NEW EvtData_Destroy_Actor(id)); IEventManager::Get()->VQueueEvent(pDestroyActorEvent); } } }