コード例 #1
0
void LoadState::Enter()
{
	SGD::GraphicsManager* pGraphics = SGD::GraphicsManager::GetInstance();
	m_hBackground = pGraphics->LoadTexture(L"resource/graphics/MenuBackgrounds/Options.png");
	m_hButton = pGraphics->LoadTexture("resource/graphics/optionsButton.png");
	m_hButtonHighlighted = pGraphics->LoadTexture("resource/graphics/optionHighlighted.png");
	m_hNameFrame = pGraphics->LoadTexture("resource/graphics/MenuBackgrounds/saveScroll.png");

	//SlotName();
	LoadNames();
}
コード例 #2
0
// Enter
/*virtual*/ void IntroState::Enter(void)
{
	// Set background color
	SGD::GraphicsManager::GetInstance()->SetClearColor({ 0, 0, 0 });	// black


	//starting_y = Game::GetInstance()->GetScreenHeight() + 20.0F;// * 15.0F;// + 170.0F;



	// Load assets
	SGD::GraphicsManager*	pGraphics			= SGD::GraphicsManager::GetInstance();
	SGD::AudioManager*		pAudio				= SGD::AudioManager::GetInstance();
	AnimationManager*		pAnimationManager	= AnimationManager::GetInstance();

	//pAnimationManager->Load("resource/config/animations/Zombie_Animation_New.xml", "zombie");
	//animation.m_strCurrAnimation = "zombie";

	m_hBackgroundImage = pGraphics->LoadTexture("resource/graphics/MenuImages/emergencybroadcast.png");

	m_hEmergency = pAudio->LoadAudio("resource/audio/zombieemergency.wav");

	IntroTimer.AddTime(60);
	ScreenTimer.AddTime(.1f);

	pAudio->PlayAudio(m_hEmergency, false);

	//m_hBackgroundImage	= pGraphics->LoadTexture("resource/graphics/youLose.png");

	//m_hBackgroundMusic = pAudio->LoadAudio("resource/audio/JNB_Credits_PinballGroove.xwm");
	//pAudio->PlayAudio(m_hBackgroundMusic);

}
コード例 #3
0
// Enter
/*virtual*/ void IntroState::Enter(void)
{
	// Set background color
	SGD::GraphicsManager::GetInstance()->SetClearColor({ 0, 0, 0 });	// black


	//starting_y = Game::GetInstance()->GetScreenHeight() + 20.0F;// * 15.0F;// + 170.0F;



	// Load assets
	SGD::GraphicsManager*	pGraphics			= SGD::GraphicsManager::GetInstance();
	SGD::AudioManager*		pAudio				= SGD::AudioManager::GetInstance();
	AnimationManager*		pAnimationManager	= AnimationManager::GetInstance();

	//pAnimationManager->Load("resource/config/animations/Zombie_Animation_New.xml", "zombie");
	//animation.m_strCurrAnimation = "zombie";

	pAudio->SetVoiceVolume(Game::GetInstance()->m_hMainVoice, 35);

	m_hBackgroundImage = pGraphics->LoadTexture("resource/graphics/MenuImages/emergencybroadcast.png");
	m_hinstruct = SGD::GraphicsManager::GetInstance()->LoadTexture("resource/graphics/MenuImages/ArcadeControlsIcons.png");

	m_hEmergency = pAudio->LoadAudio("resource/audio/zombieemergency.wav");

	if (IntroTimer.GetTime() < 45.0f)
	{
		float newTime = 45.0f - IntroTimer.GetTime();

		IntroTimer.AddTime(newTime);
	}

	else if (IntroTimer.GetTime() <= 0.0f)
		IntroTimer.AddTime(45.0f);

	if (ScreenTimer.GetTime() < .1f)
	{
		float newTime = .1f - ScreenTimer.GetTime();

		ScreenTimer.AddTime(newTime);
	}

	else if (ScreenTimer.GetTime() <= 0.0f)
		ScreenTimer.AddTime(.1f);

	transBack = 255;
	transTextFirst = 0;
	transText = 0;

	//IntroTimer.AddTime(45.0f - IntroTimer.GetTime());
	//ScreenTimer.AddTime(.1f - ScreenTimer.GetTime());

	pAudio->PlayAudio(m_hEmergency, false);

	//m_hBackgroundImage	= pGraphics->LoadTexture("resource/graphics/youLose.png");

	//m_hBackgroundMusic = pAudio->LoadAudio("resource/audio/JNB_Credits_PinballGroove.xwm");
	//pAudio->PlayAudio(m_hBackgroundMusic);

}