Working on taxi logic
This commit is contained in:
1 parent
77c8471636
commit
b94f02bd77
10 files changed
+95
-15
No files matched your search
@@ -6,6 +6,8 @@ namespace ZL {
|
||||
|
||||
void TeleportZone::initSparks(std::shared_ptr<Texture> activeTex, std::shared_ptr<Texture> inactiveTex)
|
||||
{
|
||||
activeTexture = activeTex;
|
||||
inactiveTexture = inactiveTex;
|
||||
sparks = std::make_unique<SparkEmitter>();
|
||||
std::vector<Vector3f> emitPoints;
|
||||
emitPoints.push_back(Vector3f{ position.x(), position.y(), position.z() });
|
||||
@@ -25,6 +27,13 @@ void TeleportZone::initSparks(std::shared_ptr<Texture> activeTex, std::shared_pt
|
||||
sparks->markConfigured();
|
||||
}
|
||||
|
||||
void TeleportZone::setActive(bool isActive)
|
||||
{
|
||||
active = isActive;
|
||||
if (sparks && activeTexture && inactiveTexture)
|
||||
sparks->setTexture(isActive ? activeTexture : inactiveTexture);
|
||||
}
|
||||
|
||||
void TeleportZone::update(float deltaMs)
|
||||
{
|
||||
if (sparks) sparks->update(deltaMs);
|
||||
|
||||
Reference in new issue
Block a user