修改渲染底层,新增场景摄像机逻辑,地图可行区域逻辑
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include "EngineFrame/Component/Animation.h"
|
||||
#include "Actor/Map/GameMap.h"
|
||||
#include "Actor/Map/GameMapCamera.h"
|
||||
#include "Actor/Object/CharacterObject.h"
|
||||
class Scene_SelectCharacter_UI : public Scene
|
||||
{
|
||||
private:
|
||||
@@ -26,21 +27,30 @@ public:
|
||||
map->LoadMap("map/cataclysm/town/elvengard/new_elvengard.map");
|
||||
map->Enter(this);
|
||||
|
||||
RefPtr<CharacterObject> obj = new CharacterObject();
|
||||
obj->SetPosition({620, 200, 0});
|
||||
// 构造为鬼剑士
|
||||
obj->Construction(0);
|
||||
|
||||
map->AddObject(obj);
|
||||
|
||||
camera = new GameMapCamera;
|
||||
camera->SetParentMap(map);
|
||||
camera->SetFromActor(obj.Get());
|
||||
AddChild(camera);
|
||||
return;
|
||||
RefPtr<Actor> actor = new Actor;
|
||||
actor->SetPos(VecFPos{450, 350});
|
||||
// actor->SetAnchor(VecFPos{0.5, 0.5});
|
||||
actor->SetScale(VecFPos{-1.f, 1.f});
|
||||
AddChild(actor);
|
||||
|
||||
RefPtr<Actor> actor2 = new Actor;
|
||||
actor->AddChild(actor2);
|
||||
// RefPtr<Actor> actor = new Actor;
|
||||
// actor->SetPos(VecFPos{450, 350});
|
||||
// // actor->SetAnchor(VecFPos{0.5, 0.5});
|
||||
// actor->SetScale(VecFPos{-1.f, 1.f});
|
||||
// AddChild(actor);
|
||||
|
||||
RefPtr<Animation> ani4 = new Animation("map/cataclysm/town/hendonmyre/animation/object/gateall_02.ani");
|
||||
// ani4->SetScale(VecFPos{-1.0, 1.0});
|
||||
actor2->AddChild(ani4);
|
||||
// RefPtr<Actor> actor2 = new Actor;
|
||||
// actor->AddChild(actor2);
|
||||
|
||||
// RefPtr<Animation> ani4 = new Animation("map/cataclysm/town/hendonmyre/animation/object/gateall_02.ani");
|
||||
// // ani4->SetScale(VecFPos{-1.0, 1.0});
|
||||
// actor2->AddChild(ani4);
|
||||
|
||||
// RefPtr<Animation> ani3 = new Animation("map/cataclysm/town/elvengard/animation/obj/serialight01_right.ani");
|
||||
// ani3->SetPos(VecPos{300, 300});
|
||||
|
||||
Reference in New Issue
Block a user