本文整理汇总了C++中Obstacle::setLHW方法的典型用法代码示例。如果您正苦于以下问题:C++ Obstacle::setLHW方法的具体用法?C++ Obstacle::setLHW怎么用?C++ Obstacle::setLHW使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Obstacle
的用法示例。
在下文中一共展示了Obstacle::setLHW方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createMap
void World::createMap(ObstacleContainer* obstacleContainer, TargetContainer* targetContainer)
{
obstacleContainer->add();
Obstacle* wall1 = obstacleContainer->getLast();
wall1->setLHW(1060.0f, 11.0f, 30.0f);
wall1->setPosition(500.0f, 5.0f, -1015.0f);
wall1->setColor(1.0f, 1.0f, 1.0f);
obstacleContainer->add();
Obstacle* wall2 = obstacleContainer->getLast();
wall2->setLHW(1060.0f, 11.0f, 30.0f);
wall2->setPosition(500.0f, 5.0f, 15.0f);
wall2->setColor(1.0f, 1.0f, 1.0f);
obstacleContainer->add();
Obstacle* wall3 = obstacleContainer->getLast();
wall3->setLHW(30.0f, 11.0f, 1000.0f);
wall3->setPosition(-15.0f, 5.0f, -500.0f);
wall3->setColor(1.0f, 1.0f, 1.0f);
obstacleContainer->add();
Obstacle* wall4 = obstacleContainer->getLast();
wall4->setLHW(30.0f, 11.0f, 1000.0f);
wall4->setPosition(1015.0f, 5.0f, -500.0f);
wall4->setColor(1.0f, 1.0f, 1.0f);
if(level == LEVEL_CHOICE_MAZE)
{
obstacleContainer->add();
Obstacle* o = obstacleContainer->getLast();
o->setLHW(203.0f, 101.0f, 304.0f);
o->setPosition(200.0f, 50.0f, -750.0f);
o->setColor(1.0f, 0.0f, 0.0f);
obstacleContainer->add();
o = obstacleContainer->getLast();
o->setLHW(350.0f, 101.0f, 150.0f);
o->setPosition(700.0f, 50.0f, -750.0f);
o->setColor(1.0f, 0.0f, 0.0f);
obstacleContainer->add();
o = obstacleContainer->getLast();
o->setLHW(425.0f, 101.0f, 200.0f);
o->setPosition(302.0f, 50.0f, -401.0f);
o->setColor(1.0f, 0.0f, 0.0f);
obstacleContainer->add();
o = obstacleContainer->getLast();
o->setLHW(310.0f, 101.0f, 250.0f);
o->setPosition(774.0f, 50.0f, -450.0f);
o->setColor(1.0f, 0.0f, 0.0f);
obstacleContainer->add();
o = obstacleContainer->getLast();
o->setLHW(400.0f, 101.0f, 100.0f);
o->setPosition(501.0f, 50.0f, -174.0f);
o->setColor(1.0f, 0.0f, 0.0f);
}
else if(level == LEVEL_CHOICE_BLOCK_FORT)
{
float diameter = 200.0f;
obstacleContainer->add();
Obstacle* o = obstacleContainer->getLast();
o->setLHW(diameter, diameter-1.0f, diameter);
o->setPosition(250.0f, 95.0f, -250.0f);
o->setColor(1.0f, 0.0f, 0.0f);
obstacleContainer->add();
o = obstacleContainer->getLast();
o->setLHW(diameter, diameter-1.0f, diameter);
o->setPosition(751.0f, 95.0f, -250.0f);
o->setColor(1.0f, 0.0f, 0.0f);
obstacleContainer->add();
o = obstacleContainer->getLast();
o->setLHW(diameter, diameter-1.0f, diameter);
o->setPosition(250.0f, 95.0f, -750.0f);
o->setColor(1.0f, 0.0f, 0.0f);
obstacleContainer->add();
//.........这里部分代码省略.........