* 骨骼动画初步

This commit is contained in:
lveyou committed 2024-08-13 21:01:01 +08:00
1 parent ea9ed8b966
commit d259d6cd17
6 files changed
+7

No files matched your search

+1
View File
@@ -142,6 +142,7 @@ void Init()
g_factory->LoadModel("viking_room.obj", "room");
g_factory->LoadModel("assault_drone.glb", "drone");
g_factory->LoadModel("AK-47.glb", "ak47");
g_factory->LoadModel("Cesium_Man.glb", "man");
g_ui->SetStandardSize({ 800, 600 });
g_ui->RegisterAll("ui/");
g_scene->Add("main", new UIMain);
+6
View File
@@ -13,10 +13,12 @@ public:
_act = g_factory->CreateActor("room");
_act1 = g_factory->CreateActor("drone");
_act2 = g_factory->CreateActor("ak47");
_act3 = g_factory->CreateActor("man");
_act->GetTrans()->SetTranslation({ 0, 0, 0 });
_act1->GetTrans()->SetTranslation({ 50, 0, 0 });
_act2->GetTrans()->SetTranslation({ 200, 0, 0 });
_act3->GetTrans()->SetTranslation({ 300, 0, 0 });
}
~UIActor()
{}
@@ -32,13 +34,17 @@ public:
g_system->SetCursorMode(System::CursorMode::NORMAL);
_act->Render();
_act1->Update();
_act1->Render();
_act2->Render();
_act3->Update();
_act3->Render();
}
private:
gcActor _act;
gcActor _act1;
gcActor _act2;
gcActor _act3;
bool _bControl;
};
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.