void BioXASXRFDetectorView::startAcquisition() { BioXASXRFScanConfiguration *configuration = new BioXASXRFScanConfiguration; AMDetectorInfoSet detectorSet; detectorSet.addDetectorInfo(detector_->toInfo()); configuration->setDetectorConfigurations(detectorSet); AMScanAction *scanAction = new AMScanAction(new AMScanActionInfo(configuration)); connect(scanAction, SIGNAL(cancelled()), scanAction, SLOT(scheduleForDeletion())); connect(scanAction, SIGNAL(failed()), scanAction, SLOT(scheduleForDeletion())); connect(scanAction, SIGNAL(succeeded()), scanAction, SLOT(scheduleForDeletion())); scanAction->start(); }
//------------------------------------------------------------------------------ void TankMine::explode(const SystemAddress & hit_player, WEAPON_HIT_TYPE feedback_type, OBJECT_HIT_TYPE object_hit) { physics::CollisionInfo info; info.pos_ = getPosition(); info.n_ = Vector(0,1,0); game_logic_server_->sendWeaponHit(getOwner(), hit_player, info, feedback_type, object_hit); scheduleForDeletion(); }
//------------------------------------------------------------------------------ void Missile::destroy(void*) { assert(game_logic_server_); physics::CollisionInfo info; info.pos_ = getPosition(); info.n_ = Vector(0.0f, 1.0f, 0.0f); game_logic_server_->onProjectileHit(this, NULL, 1.0f, info, true); scheduleForDeletion(); }
//------------------------------------------------------------------------------ void TankMine::frameMove(float dt) { RigidBody::frameMove(dt); if(getProxy()) return; // handle only on server side if(lifetime_ <= 0.0f) { scheduleForDeletion(); } else { lifetime_ -= dt; } }