Cleanup
This commit is contained in:
@@ -4,25 +4,18 @@ bool HydraGame::Initialise()
|
||||
{
|
||||
// m_angle = 0.01f;
|
||||
|
||||
// m_sun_light_id = GetEngine()->ActorManager()->CreateActor<HydraPointLightActor>();
|
||||
// GetEngine()->ActorManager()->InitialiseActor(m_sun_light_id);
|
||||
// GetEngine()->ActorManager()->SetOrientation(m_sun_light_id, -0.5f, 0.0f, 0.0f);
|
||||
// GetEngine()->ActorManager()->SetPosition(m_sun_light_id, glm::dvec3(0.0f, 4.0f, 10.0f));
|
||||
m_sun_light_id = GetEngine()->ActorManager()->CreateActor<HydraDirectionalLightActor>();
|
||||
GetEngine()->ActorManager()->InitialiseActor(m_sun_light_id);
|
||||
GetEngine()->ActorManager()->SetOrientation(m_sun_light_id, -0.5f, -0.2f, 0.0f);
|
||||
|
||||
// m_sun_light_id = GetEngine()->ActorManager()->CreateActor<HydraDirectionalLightActor>();
|
||||
// GetEngine()->ActorManager()->InitialiseActor(m_sun_light_id);
|
||||
// GetEngine()->ActorManager()->SetOrientation(m_sun_light_id, -0.5f, -0.2f, 0.0f);
|
||||
|
||||
|
||||
m_other_light_id = GetEngine()->ActorManager()->CreateActor<HydraPointLightActor>();
|
||||
GetEngine()->ActorManager()->InitialiseActor(m_other_light_id);
|
||||
GetEngine()->ActorManager()->SetPosition(m_other_light_id, glm::dvec3(2.0f, 3.0f, 2.0f));
|
||||
|
||||
// m_spot_light_id = GetEngine()->ActorManager()->CreateActor<HydraSpotLightActor>();
|
||||
// GetEngine()->ActorManager()->InitialiseActor(m_spot_light_id);
|
||||
// GetEngine()->ActorManager()->SetOrientation(m_spot_light_id, -0.5f, -0.2f, 0.0f);
|
||||
// GetEngine()->ActorManager()->SetPosition(m_spot_light_id, glm::dvec3(0.0f, 4.0f, 5.0f));
|
||||
|
||||
// m_point_light_id = GetEngine()->ActorManager()->CreateActor<HydraPointLightActor>();
|
||||
// GetEngine()->ActorManager()->InitialiseActor(m_point_light_id);
|
||||
// GetEngine()->ActorManager()->SetPosition(m_point_light_id, glm::dvec3(2.0f, 3.0f, 2.0f));
|
||||
|
||||
// //1.570796327f
|
||||
// //3.141592654f
|
||||
@@ -38,21 +31,21 @@ bool HydraGame::Initialise()
|
||||
m_plane_actor_id = GetEngine()->ActorManager()->CreateActor<HydraPlaneActor>();
|
||||
GetEngine()->ActorManager()->InitialiseActor(m_plane_actor_id);
|
||||
GetEngine()->ActorManager()->SetPosition(m_plane_actor_id, glm::dvec3(0, 0, 0));
|
||||
|
||||
|
||||
// m_plane_actor_id1 = GetEngine()->ActorManager()->CreateActor<HydraPlaneActor>();
|
||||
// GetEngine()->ActorManager()->InitialiseActor(m_plane_actor_id1);
|
||||
// GetEngine()->ActorManager()->SetPosition(m_plane_actor_id1, glm::dvec3(0, 10, 0));
|
||||
|
||||
// m_cube_actor_id = GetEngine()->ActorManager()->CreateActor<HydraPlaneActor>();
|
||||
// GetEngine()->ActorManager()->InitialiseActor(m_cube_actor_id);
|
||||
// m_cube_actor_id = GetEngine()->ActorManager()->CreateActor<HydraPlaneActor>();
|
||||
// GetEngine()->ActorManager()->InitialiseActor(m_cube_actor_id);
|
||||
// GetEngine()->ActorManager()->SetPosition(m_cube_actor_id, glm::dvec3(0, -2, 0));
|
||||
// GetEngine()->ActorManager()->SetRelationship(m_plane_actor_id, m_cube_actor_id);
|
||||
|
||||
// m_gltf_id = GetEngine()->ActorManager()->LoadActor("c:/Code/HydraV3/Media/AntiqueCamera.glb");
|
||||
// m_gltf_id = GetEngine()->ActorManager()->LoadActor("c:/Code/HydraV3/Media/AntiqueCamera.glb");
|
||||
// GetEngine()->ActorManager()->InitialiseActor(m_gltf_id);
|
||||
// GetEngine()->ActorManager()->SetPosition(m_gltf_id, glm::dvec3(0, 0, 0));
|
||||
|
||||
// m_gltf_id1 = GetEngine()->ActorManager()->LoadActor("c:/Code/HydraV3/Media/Tree1.glb");
|
||||
// m_gltf_id1 = GetEngine()->ActorManager()->LoadActor("c:/Code/HydraV3/Media/Tree1.glb");
|
||||
// GetEngine()->ActorManager()->InitialiseActor(m_gltf_id);
|
||||
// GetEngine()->ActorManager()->SetPosition(m_gltf_id, glm::dvec3(0, 0, 500));
|
||||
|
||||
@@ -63,7 +56,7 @@ bool HydraGame::Initialise()
|
||||
GetEngine()->PossessPlayer(m_player_actor_id);
|
||||
GetEngine()->Camera()->AttachToActor(m_player_actor_id);
|
||||
|
||||
//GetEngine()->ActorManager()->SetRelationship(m_player_actor_id, m_other_light_id);
|
||||
// GetEngine()->ActorManager()->SetRelationship(m_player_actor_id, m_other_light_id);
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -74,6 +67,34 @@ void HydraGame::Update(float delta_t_seconds)
|
||||
{
|
||||
GetEngine()->Exit();
|
||||
}
|
||||
|
||||
if (GetEngine()->KeyPressed(HYDRA_KEY_CODES::HYDRA_KEY_0))
|
||||
{
|
||||
GetEngine()->ActorManager()->DeleteActor(m_sun_light_id);
|
||||
}
|
||||
if (GetEngine()->KeyPressed(HYDRA_KEY_CODES::HYDRA_KEY_9))
|
||||
{
|
||||
if (m_spot_light_id == INVALID_HYDRA_ID)
|
||||
{
|
||||
m_point_light_id = GetEngine()->ActorManager()->CreateActor<HydraPointLightActor>();
|
||||
GetEngine()->ActorManager()->InitialiseActor(m_point_light_id);
|
||||
GetEngine()->ActorManager()->SetPosition(m_point_light_id, glm::dvec3(2.0f, 3.0f, 2.0f));
|
||||
|
||||
m_spot_light_id = GetEngine()->ActorManager()->CreateActor<HydraSpotLightActor>();
|
||||
GetEngine()->ActorManager()->InitialiseActor(m_spot_light_id);
|
||||
GetEngine()->ActorManager()->SetOrientation(m_spot_light_id, -0.5f, -0.2f, 0.0f);
|
||||
GetEngine()->ActorManager()->SetPosition(m_spot_light_id, glm::dvec3(0.0f, 4.0f, 5.0f));
|
||||
}
|
||||
}
|
||||
if (GetEngine()->KeyPressed(HYDRA_KEY_CODES::HYDRA_KEY_8))
|
||||
{
|
||||
if (m_point_light_id == INVALID_HYDRA_ID)
|
||||
{
|
||||
m_point_light_id = GetEngine()->ActorManager()->CreateActor<HydraPointLightActor>();
|
||||
GetEngine()->ActorManager()->InitialiseActor(m_point_light_id);
|
||||
GetEngine()->ActorManager()->SetPosition(m_point_light_id, glm::dvec3(2.0f, 3.0f, 2.0f));
|
||||
}
|
||||
}
|
||||
// GetEngine()->ActorManager()->SetOrientation(m_sun_light_id, m_angle, 0.4, 0.0f);
|
||||
// if(m_angle > (M_PI) - 0.01)
|
||||
// {
|
||||
@@ -81,7 +102,7 @@ void HydraGame::Update(float delta_t_seconds)
|
||||
// }
|
||||
|
||||
m_angle += m_diff;
|
||||
//GetEngine()->ActorManager()->SetOrientation(m_other_light_id, -0.5f, m_angle, 0);
|
||||
// GetEngine()->ActorManager()->SetOrientation(m_gltf_id, 0, m_angle, 0);
|
||||
// GetEngine()->ActorManager()->SetOrientation(m_plane_actor_id, 0, m_angle, 0);
|
||||
// GetEngine()->ActorManager()->SetOrientation(m_other_light_id, -0.5f, m_angle, 0);
|
||||
// GetEngine()->ActorManager()->SetOrientation(m_gltf_id, 0, m_angle, 0);
|
||||
// GetEngine()->ActorManager()->SetOrientation(m_plane_actor_id, 0, m_angle, 0);
|
||||
}
|
||||
Reference in New Issue
Block a user