|
@ -88,7 +88,7 @@ void play_state_enter(game_context* ctx) |
|
|
ecs::archetype* flashlight_archetype = resource_manager->load<ecs::archetype>("flashlight.ent"); |
|
|
ecs::archetype* flashlight_archetype = resource_manager->load<ecs::archetype>("flashlight.ent"); |
|
|
ecs::archetype* flashlight_light_cone_archetype = resource_manager->load<ecs::archetype>("flashlight-light-cone.ent"); |
|
|
ecs::archetype* flashlight_light_cone_archetype = resource_manager->load<ecs::archetype>("flashlight-light-cone.ent"); |
|
|
ecs::archetype* lens_light_cone_archetype = resource_manager->load<ecs::archetype>("lens-light-cone.ent"); |
|
|
ecs::archetype* lens_light_cone_archetype = resource_manager->load<ecs::archetype>("lens-light-cone.ent"); |
|
|
ecs::archetype* round_eye_archetype = resource_manager->load<ecs::archetype>("round-eye.ent"); |
|
|
|
|
|
|
|
|
ecs::archetype* ant_head_archetype = resource_manager->load<ecs::archetype>("ant-head.ent"); |
|
|
|
|
|
|
|
|
// Create tools
|
|
|
// Create tools
|
|
|
forceps_archetype->assign(ecs_registry, ctx->forceps_entity); |
|
|
forceps_archetype->assign(ecs_registry, ctx->forceps_entity); |
|
@ -211,12 +211,11 @@ void play_state_enter(game_context* ctx) |
|
|
ctx->overworld_camera->look_at({0, 0, 1}, {0, 0, 0}, {0, 1, 0}); |
|
|
ctx->overworld_camera->look_at({0, 0, 1}, {0, 0, 0}, {0, 1, 0}); |
|
|
ctx->camera_system->set_camera(ctx->overworld_camera); |
|
|
ctx->camera_system->set_camera(ctx->overworld_camera); |
|
|
|
|
|
|
|
|
auto round_eye = round_eye_archetype->create(ecs_registry); |
|
|
|
|
|
math::transform<float> eye_xf; |
|
|
|
|
|
eye_xf.translation = {50, 0, 0}; |
|
|
|
|
|
eye_xf.rotation = math::angle_axis(-math::half_pi<float>, {1, 0, 0}); |
|
|
|
|
|
eye_xf.scale = float3{1, 1, 1} * 50.0f; |
|
|
|
|
|
ec::set_transform(ecs_registry, round_eye, eye_xf, true); |
|
|
|
|
|
|
|
|
auto ant_head = ant_head_archetype->create(ecs_registry); |
|
|
|
|
|
math::transform<float> head_xf = math::identity_transform<float>; |
|
|
|
|
|
head_xf.translation = {50, 0, 0}; |
|
|
|
|
|
head_xf.scale = float3{1, 1, 1} * 1.0f; |
|
|
|
|
|
ec::set_transform(ecs_registry, ant_head, head_xf, true); |
|
|
|
|
|
|
|
|
ctx->overworld_scene->update_tweens(); |
|
|
ctx->overworld_scene->update_tweens(); |
|
|
|
|
|
|
|
|