Пример #1
0
//z 2015-07-02 11:03 读入坐标和半径,并进行设置。
void Obstacle::Read(std::ifstream& in)
{
    double x, y, r;

    in >> x >> y >> r;

    SetPos(Vector2D(x,y));

    SetBRadius(r);
}
Пример #2
0
Trigger_SoundNotify::Trigger_SoundNotify(AbstRaven_Bot* source,
                                     double      range):Trigger_LimitedLifetime<AbstRaven_Bot>(FrameRate /script->GetInt("Bot_TriggerUpdateFreq")),
                                                       m_pSoundSource(source)
{
  //set position and range
  SetPos(m_pSoundSource->Pos());

  SetBRadius(range);

  //create and set this trigger's region of fluence
  AddCircularTriggerRegion(Pos(), BRadius());
}
Пример #3
0
void Trigger_WeaponGiver::Read(std::ifstream& in)
{
  double x, y, r;
  int GraphNodeIndex;
  
  in >>  x >> y  >> r >> GraphNodeIndex;

  SetPos(Vector2D(x,y)); 
  SetBRadius(r);
  SetGraphNodeIndex(GraphNodeIndex);

  //create this trigger's region of fluence
  AddCircularTriggerRegion(Pos(), script->GetDouble("DefaultGiverTriggerRange"));


  SetRespawnDelay((unsigned int)(script->GetDouble("Weapon_RespawnDelay") * FrameRate));
}