void Missile::update(){ pos_x += 5*v->x; pos_y += 5*v->y; if(pos_x > 1024 || pos_x < 0 || pos_y > 768 || pos_y < 0){ markForRemoval(); } }
void Character::tick(const float dt) { if (!isAlive()) { markForRemoval(); return; } onGround = false; MovableObject::tick(dt); }
void Aegrum::tick(const float dt) { scale = glm::vec3(0.3f); if (lifeTime > LIFE_SECONDS) { SPtr<Scene> sScene = scene.lock(); if (sScene) { Particle::createEffect(sScene, getPosition(), // Position glm::vec3(0.0f), // Velocity false, // Gravity enabled 5.0f, // Size 10, // Number of particles 3.0f, // Duration (seconds) 25.0f, // Particle spread false); // Stencil mode } markForRemoval(); return; } lifeTime += dt; Vis::tick(dt); }
void TemporaryText::onUpdate(float deltaTime) { this->_timeRemaining -= deltaTime; if(_timeRemaining <= 0) markForRemoval(this, "TemporaryText"); }
void TestTreeItem::markForRemovalRecursively(bool mark) { markForRemoval(mark); for (int row = 0, count = childCount(); row < count; ++row) childItem(row)->markForRemovalRecursively(mark); }
void Projectile::checkOutOfBounds() { if(getPosition().x < -10 || getPosition().x > 1034 || getPosition().y < -10 || getPosition().y > 778){ markForRemoval(); } }