Ejemplo n.º 1
0
	LightPtr LightManager::GetNextAffectingLight(LightPtr pLight, const ViewFrustum& frustum)
	{
		LightPtr pNode = GetNextLight(pLight);
		
		while(pNode)
		{
			if(pNode->IsAffecting(frustum))
			{
				return pNode;
			}
			pNode = GetNextLight(pNode);
		}
		
		return pNode;
	}
Ejemplo n.º 2
0
void DoLonelyModeLoop()
{
	static const unsigned int cycleTime = 100;
	static unsigned char lightMask = 0x08;
	static unsigned int lastChange = 0;

	if (millis() - lastChange > cycleTime)
	{
		lightMask = GetNextLight(lightMask);

		panel.WritePlayer1LEDs(lightMask);
		panel.WritePlayer2LEDs(lightMask);

		lastChange = millis();
	}

	if (OnePlayerButtonPressed())
	{
		LaunchOnePlayerGame();
	}
	else if (TwoPlayerButtonPressed())
	{
		LaunchTwoPlayerGame();
	}
}