Definition at line 6 of file WebDemoScene.h.
◆ Destroy()
void WebDemoScene::Destroy |
( |
| ) |
|
|
overridevirtual |
◆ Init()
void WebDemoScene::Init |
( |
| ) |
|
|
overridevirtual |
Implements CSE::Scene.
Definition at line 13 of file WebDemoScene.cpp.
13 {
14
15 SPrefab* stormtrooper = SResource::Create<SPrefab>(
"model.prefab");
16
18 auto ab = stormtrooper->Clone(
vec3{ 0, -0.3f, 0 }, root);
19
20 ab->GetTransform()->m_scale =
vec3{ 0.08f, 0.08f, 0.08f };
21 ab->GetTransform()->m_rotation = Quaternion::AngleAxis(
vec3{1, 0, 0}, Pi/2.f);
23 ab->GetComponent<
CustomComponent>()->SetClassName(
"Stormtrooper.script");
24
27 camera->GetTransform()->m_position =
vec3{0, 0, 1.2f };
28 camera_comp->SetBackgroundSkybox();
29 camera_comp->SetBackgroundType(CameraBase::SKYBOX);
30
32 direction->SetParent(root);
33 direction->SetName("directional");
34 direction->GetTransform()->m_position =
vec3{ 0.f, 0.5f, 0.f };
37 direction->GetComponent<
LightComponent>()->SetLightType(LightComponent::DIRECTIONAL);
40
41
42
43}
◆ Tick()
void WebDemoScene::Tick |
( |
float |
elapsedTime | ) |
|
|
overridevirtual |
The documentation for this class was generated from the following files: