修改游戏底层矩阵相关
This commit is contained in:
@@ -16,41 +16,42 @@ Scene_Test::~Scene_Test()
|
||||
|
||||
void Scene_Test::Enter()
|
||||
{
|
||||
SetScale(VecFPos(1.2f, 1.2f));
|
||||
map = new GameMap;
|
||||
map->LoadMap("map/cataclysm/town/elvengard/new_elvengard.map");
|
||||
map->LoadMap("map/cataclysm/town/elvengard/new_d_elvengard_l.map");
|
||||
map->Enter(this);
|
||||
|
||||
RefPtr<CharacterObject> obj = new CharacterObject();
|
||||
obj->SetPosition({1000, 300, 0});
|
||||
obj->Construction(0);
|
||||
|
||||
map->AddObject(obj);
|
||||
|
||||
RefPtr<MonsterObject> monster = new MonsterObject();
|
||||
monster->SetPosition({1200, 301, 0});
|
||||
monster->Construction(1);
|
||||
monster->SetDirection(1);
|
||||
|
||||
map->AddObject(obj);
|
||||
map->AddObject(monster);
|
||||
|
||||
_camera = new GameMapCamera;
|
||||
_camera->SetFromActor(obj.Get());
|
||||
|
||||
return;
|
||||
|
||||
// // SDL_Log("Scene_Test::进入测试场景!");
|
||||
RefPtr<Actor> actor = new Actor;
|
||||
AddChild(actor);
|
||||
|
||||
RefPtr<Sprite> sprite = new Sprite("ImagePacks2/test_white_background.png");
|
||||
// RefPtr<Sprite> sprite = new Sprite("ImagePacks2/test_white_background.png");
|
||||
|
||||
RefPtr<Sprite> chr = new Sprite("sprite/interface2/hud/hud.img", 0);
|
||||
// chr->SetPos(VecFPos{200, 100});
|
||||
chr->SetPos(Vec2{200, 100});
|
||||
// chr->SetAlpha(0.5);
|
||||
// chr->SetShadow();
|
||||
actor->AddComponent(chr);
|
||||
// actor->AddComponent(chr);
|
||||
|
||||
// RefPtr<Canvas> canvas = new Canvas(VecSize{1280, 720});
|
||||
// actor->AddChild(canvas);
|
||||
RefPtr<Canvas> canvas = new Canvas(VecSize{250, 720});
|
||||
actor->AddChild(canvas);
|
||||
canvas->DrawImg("sprite/interface2/hud/hud.img", 0, Vec2{0, 0});
|
||||
|
||||
// canvas->AddChild(chr);
|
||||
|
||||
@@ -58,21 +59,16 @@ void Scene_Test::Enter()
|
||||
// RefPtr<Animation> ani4 = new Animation("map/cataclysm/town/hendonmyre/animation/object/gateall_02.ani");
|
||||
// Am->AddAnimation(ani4);
|
||||
|
||||
// // Am->SetPos(VecFPos{200, 100});
|
||||
// // Am->SetPos(Vec2{200, 100});
|
||||
// actor->AddChild(Am);
|
||||
|
||||
// RefPtr<Text> text = new Text();
|
||||
// text->Init("测试文本", Global_Game::GetInstance().Fonts[0], SDL_Color{255, 255, 255, 255});
|
||||
// text->SetPos(VecFPos{200, 100});
|
||||
// actor->AddChild(text);
|
||||
|
||||
// // sprite2->UnsetClipRect();
|
||||
|
||||
// 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});
|
||||
// // ani4->SetScale(Vec2{-1.0, 1.0});
|
||||
// actor->AddChild(ani4);
|
||||
|
||||
// RefPtr<Animation> ani3 = new Animation("map/cataclysm/town/elvengard/animation/obj/serialight01_right.ani");
|
||||
|
||||
Reference in New Issue
Block a user