1- // #include "MyGame.hpp"
2- // #include <Engine3DRadSpace\Objects\Impl\Skinmesh.hpp>
3- // #include <Engine3DRadSpace\Objects\Impl\Camera.hpp>
4- // #include <Engine3DRadSpace\Objects\ObjectList.hpp>
5- // #include <Engine3DRadSpace\Math\Quaternion.hpp>
6- // #include <Engine3DRadSpace\Graphics\Primitives\Box.hpp>
7- //
8- // using namespace Engine3DRadSpace;
9- // using namespace Engine3DRadSpace::Objects;
10- // using namespace Engine3DRadSpace::Input;
11- // using namespace Engine3DRadSpace::Math;
12- //
13- // using namespace Engine3DRadSpace::Graphics;
14- // using namespace Engine3DRadSpace::Graphics::Primitives;
15- //
16- // std::unique_ptr<Box> box;
17- //
18- // MyGame::MyGame() : Game("3DRadSpace Empty", 800, 600)
19- // {
20- // }
21- //
22- // void MyGame::Initialize()
23- // {
24- // Game::Initialize();
25- // Device->ImmediateContext()->ToggleFullScreen();
26- //
27- // this->ClearColor = Colors::CornflowerBlue;
28- //
29- // //Add a camera viewing the fish model
30- // Camera cam;
31- // cam.Position = { 0, 1, 1.5 };
32- // cam.Rotation = Quaternion::FromYawPitchRoll(0, 0, 0);
33- // cam.LookAt = { 0.5f,0.5f,0.5f };
34- // cam.LookMode = Camera::CameraMode::UseLookAtCoordinates;
35- // _cam = this->Objects->AddNew(std::move(cam)).first; //first is object pointer, second is ID.
36- //
37- // //Directly create a fish model into the scene
38- // //_fish = this->Objects->AddNew<Skinmesh>("fish", true, "Data\\Models\\YellowFish.x").first;
39- //
40- // box = std::make_unique<Box>(Device.get(), BoundingBox(Vector3(0,0,0), Vector3(1,1,1)), Colors::Orange);
41- // }
42- //
43- // void MyGame::Load()
44- // {
45- // Game::Load();
46- //
47- // _sound = this->Content->Load<Sound>("Data\\Sounds\\explosion.ogg");
48- // _soundInstance = std::make_unique<SoundInstance>(_sound);
49- // _soundInstance->SetLooping(false);
50- //
51- // // zoom the camera into the model.
52- // //float distance = _fish->GetModel()->GetBoundingSphere().Radius + 0.25f;
53- // _cam->Position *= 2;
54- // }
55- //
56- // void MyGame::Update()
57- // {
58- // Game::Update();
59- //
60- // if(Keyboard.IsKeyDown(Key::X))
61- // {
62- // _soundInstance->Play();
63- // }
64- //
65- // /*
66- // if(Keyboard.IsKeyDown(Key::X))
67- // {
68- // _fish->Rotation *= Quaternion::FromYawPitchRoll(0, this->Draw_dt, 0);
69- // }
70- // if(Keyboard.IsKeyDown(Key::Y))
71- // {
72- // _fish->Rotation *= Quaternion::FromYawPitchRoll(this->Draw_dt, 0, 0);
73- // }
74- // if(Keyboard.IsKeyDown(Key::Z))
75- // {
76- // _fish->Rotation *= Quaternion::FromYawPitchRoll(0, 0, this->Draw_dt);
77- // }
78- // if(Keyboard.IsKeyDown(Key::R))
79- // {
80- // _fish->Rotation = Quaternion();
81- // }
82- // _fish->Rotation.Normalize();
83- // */
84- // }
85- //
86- // void MyGame::Draw3D()
87- // {
88- // Game::Draw3D();
89- //
90- // box->Transform = _cam->GetViewMatrix() * _cam->GetProjectionMatrix();
91- // box->Draw3D();
92- // }
93- //
94- // void MyGame::Draw2D()
95- // {
96- // Game::Draw2D();
97- // }
1+ #include " MyGame.hpp"
2+
3+ MyGame::MyGame () : Game(" FPCharacter Demo" , 1280 , 720 )
4+ {
5+ AppendScene (R"( D:\Projects\3D_Rad_Space\3DRadSpace\out\build\x64-Release\Projects\FPCharacter Demo.3drsp)" );
6+ }
0 commit comments