Exemplo n.º 1
0
void InputSystemFixture::Should_Throw_Given_Already_Initialized()
{
  InputSystem* inputSystem = new InputSystem();
  inputSystem->Initialize(0);
  CPPUNIT_ASSERT_THROW(inputSystem->Initialize(0), AlreadyInitializedException);

  delete inputSystem;
}
Exemplo n.º 2
0
void InputSystemFixture::Should_Not_Initialize_With_NULL_HWND()
{  
  InputSystem* inputSystem = new InputSystem();
  CPPUNIT_ASSERT_THROW(inputSystem->Initialize(0), IntializeFailedException);

  delete inputSystem;
}
Exemplo n.º 3
0
void InputSystemFixture::Should_Initialize_Properly()
{
  InputSystem* inputSystem = new InputSystem();
  inputSystem->Initialize(0);

  delete inputSystem;
}
Exemplo n.º 4
0
bool Game1::Initialize(SDL_Window* pWin)
{
	InputSystem* tInput = new InputSystem("InputSystem");
	VelocitySystem* tVel = new VelocitySystem("VelocitySystem");
	AttachSystem* tAtt = new AttachSystem("AttachSystem");
	PhysicSystem* tPhysics = new PhysicSystem("PhysicSystem");
	RenderSystem* tRender = new RenderSystem("RenderSystem");
	TriggerSystem* tTrigger = new TriggerSystem("TriggerSystem");
	SoundSystem* tSound = new SoundSystem("SoundSystem");
	ScoreSystem* tScore = new ScoreSystem("ScoreSystem");
	MenuSystem* tMenu = new MenuSystem("MenuSystem");
	PowerUpSystem* tPowerUps = new PowerUpSystem("PowerUpSystem");
	ShipGunSystem* tGunSystem = new ShipGunSystem("ShipGunSystem");
	EnemySystem* tEnemy = new EnemySystem("EnemySystem");
	WaveSystem* tWave= new WaveSystem("WaveSystem");
	
	tRender->Initialize();
	tRender->Initialize(pWin);
	tInput->Initialize();
	tVel->Initialize();
	tAtt->Initialize();
	tPhysics->Initialize();
	tTrigger->Initialize();
	tSound->Initialize();
	tScore->Initialize();
	tMenu->Initialize();
	tPowerUps->Initialize();
	tEnemy->Initialize();
	tGunSystem->Initialize();
	tWave->Initialize();

	//set systems to game here
	mSystems.push_back(tInput);
	mSystems.push_back(tVel);
	mSystems.push_back(tPhysics);
	mSystems.push_back(tTrigger);
	mSystems.push_back(tGunSystem);
	mSystems.push_back(tAtt);
	mSystems.push_back(tSound);
	mSystems.push_back(tScore);
	mSystems.push_back(tPowerUps);
	mSystems.push_back(tWave);
	mSystems.push_back(tMenu);
	mSystems.push_back(tEnemy);
	mSystems.push_back(tRender);
	
	GameStateClass::GetInstance()->SetGameState(GameState::MenuScreen);



	
	return true;
}