当前位置: 首页>>代码示例>>C++>>正文


C++ ProgressBar::SetFillColor方法代码示例

本文整理汇总了C++中ProgressBar::SetFillColor方法的典型用法代码示例。如果您正苦于以下问题:C++ ProgressBar::SetFillColor方法的具体用法?C++ ProgressBar::SetFillColor怎么用?C++ ProgressBar::SetFillColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ProgressBar的用法示例。


在下文中一共展示了ProgressBar::SetFillColor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Load

void TestLevel::Load() {
    //TEMP STUFF TO AVOID LAG
    GameObject* temp = new GameObject();
    ModelRender* tempModel = new ModelRender("DinoLasers\\Laser.obj", "Laser");
    temp->AddComponent(tempModel);
    temp->GetTransform().SetScale(vector3(0.0f, 0.0f, 0.0f));
    GameObjectManager::GetInstance()->AddGameObject(temp);
    temp = new GameObject();
    tempModel = new ModelRender("DinoLasers\\Spaghetti.obj", "Spaghetti");
    temp->AddComponent(tempModel);
    temp->GetTransform().SetScale(vector3(0.0f, 0.0f, 0.0f));
    GameObjectManager::GetInstance()->AddGameObject(temp);
    tempModel = new ModelRender("DinoLasers\\SpaghettiMine.obj", "Mine");
    temp->AddComponent(tempModel);
    temp->GetTransform().SetScale(vector3(0.0f, 0.0f, 0.0f));
    GameObjectManager::GetInstance()->AddGameObject(temp);
    tempModel = new ModelRender("DinoLasers\\Explosion.obj", "Explosion");
    temp->AddComponent(tempModel);
    temp->GetTransform().SetScale(vector3(0.0f, 0.0f, 0.0f));
    GameObjectManager::GetInstance()->AddGameObject(temp);
    //END TEMP STUFF


    dino = new GameObject();
    dino->AddComponent(new ModelRender("DinoLasers\\Dino.obj", "Dino"));
    BoundingObject* dinoBO = new BoundingObject();
    dinoBO->SetLayer(2 | 8);
    dino->AddComponent(dinoBO);
    dino->AddComponent(new CameraFollow());
    ProjectileLauncher* launcher = new ProjectileLauncher();
    launcher->SetFireTime(0.1f);
    dino->AddComponent(launcher);
    dino->AddComponent(new PlayerMovement());
    dino->AddComponent(new Rigidbody());
    dino->AddComponent(new Health());
    dino->AddComponent(new Score());
    dino->GetTransform().SetPosition(vector3(0.0f, 5.0f, 0.0f));
    //dino->AddComponent(new CollisionDebug());
    GameObjectManager::GetInstance()->AddGameObject(dino);

    crateDropper = new GameObject();
    crateDropper->AddComponent(new CrateDropper(1.0f, 20));
    GameObjectManager::GetInstance()->AddGameObject(crateDropper);

    /*Component* testModel = new ModelRender("DinoLasers\\SpaghettiMine.obj", "Mine");
    test = new GameObject();
    //test->AddComponent(testModel);
    test->GetTransform().SetPosition(vector3(0.0f, 1.0f, 0.0f));
    //BoundingObject* testBO = new BoundingObject();
    //test->AddComponent(testBO);
    GameObjectManager::GetInstance()->AddGameObject(test);*/

    ProgressBar* healthBar = new ProgressBar("Health", 100.0f);
    healthBar->SetFillColor(RERED);
    AddUIElement(healthBar);

    //maxGameTimer = gameTimer;
    ProgressBar* timerBar = new ProgressBar("Timer", maxGameTimer);
    timerBar->SetFillColor(REBLUE);
    AddUIElement(timerBar);

    //Load Level
    LoadLevelFromFile();
}
开发者ID:QRayarch,项目名称:DinoLasers,代码行数:64,代码来源:TestLevel.cpp


注:本文中的ProgressBar::SetFillColor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。