Пример #1
0
void CheckLives()
{
	//game is in player displayer lives at top right
	hud.SetDisplayInt(4, lives, 0.86f, 0.93f);

	//levelnum
	hud.SetDisplayInt(8, currentLevel, 0.52f, 0.93f);

	//if game is over display final score
	if(gameOver)
	{
		ShowScores();
		hud.SetDisplayString(3, "", 0.0f, 0.0f);
		hud.SetDisplayString(0, "", 0.3f, 0.55f);
		hud.SetDisplayString(2, "    Game Over\nYour Score:\n\n\n -High Scores-\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nBackspace = Restart", 0.4f, 0.65f);
		hud.SetDisplayString(4, "", 0.3f, 0.55f);
	}

	//check if level is complete
	if(nextLevel)
	{
		hud.SetDisplayString(3, "", 0.0f, 0.0f);
		hud.SetDisplayString(0, "", 0.3f, 0.55f);
		hud.SetDisplayString(2, "Level Complete!\n\nPress Enter to Progress", 0.3f, 0.55f);
		hud.SetDisplayString(4, "", 0.3f, 0.55f);
	}
}
Пример #2
0
void CheckScore()
{
	if(!gameOver && !nextLevel)
		hud.SetDisplayInt(1, score, 0.14f, 0.93f);
	if(gameOver)
		hud.SetDisplayInt(1, score, 0.56f, 0.62f);
	if(!gameOver)
		hud.SetDisplayInt(1, score, 0.14f, 0.93f);
	if(nextLevel)
		hud.SetDisplayInt(1, score, -10.14f, 0.93f);
}
Пример #3
0
void UpdateTime()
{
	if(!gameOver)
	{
		hud.SetDisplayInt(29, minutes, 0.25f, 0.01f);	
		//code to manually place a 0 before any seond number lower than 10
		if(seconds < 10)
		{
			hud.SetDisplayString(31, "Playtime:      : 0", 0.10f, 0.01f);
			hud.SetDisplayInt(30, seconds, 0.31f, 0.01f);
		}
		else
		{
			hud.SetDisplayString(31, "Playtime:      :", 0.10f, 0.01f);
			hud.SetDisplayInt(30, seconds, 0.30f, 0.01f);
		}
	}
	else
	{
		hud.SetDisplayInt(29, minutes, -100.25f, 0.01f);	
		//code to manually place a 0 before any seond number lower than 10
		if(seconds < 10)
		{
			hud.SetDisplayString(31, "Playtime:      : 0", -100.10f, 0.01f);
			hud.SetDisplayInt(30, seconds, -100.31f, 0.01f);
		}
		else
		{
			hud.SetDisplayString(31, "Playtime:      :", -100.10f, 0.01f);
			hud.SetDisplayInt(30, seconds, -100.30f, 0.01f);
		}
	}
}
Пример #4
0
void UnShowScores()
{
	int count = 9;
	for(int i = 0; i < 10; i++)
	{
		if(orderedScores[i] > 0)
		{			
			hud.SetDisplayInt(count, 0, -100.55f, 0.5f - ((float)i/40)); 
			char *display = &orderedNames[i][0];
			count++;
  			hud.SetDisplayString(count, "", -100.4f, 0.5f - ((float)i/40));
			count ++;
		}
	}
	count = 0;
}