예제 #1
0
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();
}
예제 #2
0
//------------------------------------------------------------------------------
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();
}
예제 #3
0
//------------------------------------------------------------------------------
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();
}
예제 #4
0
//------------------------------------------------------------------------------
void TankMine::frameMove(float dt)
{
    RigidBody::frameMove(dt);

    if(getProxy()) return; // handle only on server side

    if(lifetime_ <= 0.0f)
    {
        scheduleForDeletion();
    }
    else
    {
        lifetime_ -= dt;
    }
    
}