本文整理汇总了C++中Universe::setPosition方法的典型用法代码示例。如果您正苦于以下问题:C++ Universe::setPosition方法的具体用法?C++ Universe::setPosition怎么用?C++ Universe::setPosition使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Universe
的用法示例。
在下文中一共展示了Universe::setPosition方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createGame
void taeRuleset::createGame() {
Game* game = Game::getGame();
ObjectManager* obm = game->getObjectManager();
ObjectTypeManager* obtm = game->getObjectTypeManager();
//Create ship design category
Category* cat = new Category();
cat->setName("Ships");
cat->setDescription("Ship components");
game->getDesignStore()->addCategory(cat);
//Create properties
createProperties();
//Create components
createComponents();
//Create resources
setupResources();
uint32_t obT_Universe = obtm->getObjectTypeByName("Universe");
uint32_t obT_Galaxy = obtm->getObjectTypeByName("Galaxy");
//Create the universe
IGObject* universe = obm->createNewObject();
obtm->setupObject(universe, obT_Universe);
Universe* theUniverse = (Universe*)(universe->getObjectBehaviour());
theUniverse->setSize(1000000000000ll);
universe->setName("The Universe");
theUniverse->setPosition(Vector3d(0ll,0ll,0ll));
obm->addObject(universe);
//Create the galaxy
IGObject* gal = obm->createNewObject();
obtm->setupObject(gal, obT_Galaxy);
EmptyObject* galob = (EmptyObject*)(gal->getObjectBehaviour());
galob->setSize(100000000000ll);
gal->setName("The Fertile Galaxy");
galob->setPosition(Vector3d(0ll, -6000ll, 0ll));
gal->addToParent(universe->getID());
obm->addObject(gal);
string path = string(Settings::getSettings()->get("board_path"));
Logger::getLogger()->debug(path.c_str());
createBoard(path, gal->getID());
Logger::getLogger()->info("TaE created");
}