本文整理汇总了C++中Gate::GetID方法的典型用法代码示例。如果您正苦于以下问题:C++ Gate::GetID方法的具体用法?C++ Gate::GetID怎么用?C++ Gate::GetID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gate
的用法示例。
在下文中一共展示了Gate::GetID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Gate
Gate::Gate(Coordinate pos) {
top = true;
SetImage( Image::Get("Resources/Graphics/gate1_top.png") );
// Create the PartnerID Gate
Gate* partner = new Gate(this->GetID());
partnerID = partner->GetID();
exitID = 0;
SpriteManager::Instance()->Add((Sprite*)partner);
// Set both Position and Angle at the same time
SetWorldPosition(pos);
SetAngle( float( rand() %360 ) );
}
示例2: Gate
/**\brief Creates a Top Gate as well as a Bottom Gate automatically
* \todo Remove the SpriteManager Instance access.
*/
Gate::Gate(Coordinate pos, string _name) {
top = true;
SetImage( Image::Get("Resources/Graphics/gate1_top.png") );
// Create the PartnerID Gate
Gate* partner = new Gate(GetID());
partnerID = partner->GetID();
exitID = 0;
SpriteManager::Instance()->Add((Sprite*)partner);
// Set both Position and Angle at the same time
SetWorldPosition(pos);
SetAngle( float( rand() %360 ) );
if( _name == "" ) {
stringstream val_ss;
val_ss << GetID();
val_ss >> _name;
}