本文整理汇总了C++中Level::GetName方法的典型用法代码示例。如果您正苦于以下问题:C++ Level::GetName方法的具体用法?C++ Level::GetName怎么用?C++ Level::GetName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Level
的用法示例。
在下文中一共展示了Level::GetName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnLevelMapCalc
void MapEditor::OnLevelMapCalc(Level& level, int number)
{
if (level.GetMapBG().IsEmpty())
{
Exclamation(NFormat(t_("Please, select the image for level: %s"), level.GetName()));
return;
}
String fp = AppendFileName( AppendFileName( GetFileDirectory(GetExeFilePath()), "Maps"),
level.GetMapBG());
if (!FileExists(fp))
{
Exclamation(NFormat(t_("Image file not exist: %s"), fp));
return;
}
String name = level.GetName();
double zx = level.GetZoomDX();
Size pz = level.GetPageSize();
Size sz = level.GetCellSize();
FileIn in(fp);
One<StreamRaster> r = StreamRaster::OpenAny(in);
if (!r)
{
Exclamation(NFormat(t_("Error while loading image file: %s"), fp));
return;
}
Image img = r->GetImage();
Calculate(sz.cx, sz.cy, pz.cx, pz.cy, zx,
NFormat("%s-%d", _map.GetName(), number + 1), img);
}
示例2: GameScreen
MissionScreen::MissionScreen(RocketCommanderGame &game, const Level &level)
: GameScreen(game, "Mission.layout", false),
m_rocketEndGameScale(0.0f),
m_fuelBar(NULL),
m_healthBar(NULL),
m_speedBar(NULL),
m_lifeBar(NULL),
m_posText(NULL),
m_rankText(NULL),
m_timeText(NULL),
m_scoreText(NULL),
m_messageText(NULL),
m_targetIcon(NULL),
m_targetIconSize(Vector2::ZERO),
m_arrowRight(NULL),
m_arrowLeft(NULL),
m_arrowUp(NULL),
m_arrowDown(NULL),
m_arrowSize(Vector2::ZERO)
{
// Set level for asteroid manager
m_game.GetAsteroidManager().SetLevel(level);
// Start new game
m_game.GetPlayer().Reset(level.GetName());
}