加入 Node节点类 还未测试新框架

This commit is contained in:
2025-10-27 23:12:56 +08:00
parent 80d088316b
commit 0ae47e5d6a
52 changed files with 1642 additions and 458 deletions

View File

@@ -20,18 +20,18 @@ void Scene_Loading_UI::Enter()
AddChild(actor);
RefPtr<Sprite> BackGroundSp = new Sprite("ImagePacks2/Loading1.png");
actor->AddComponent(BackGroundSp);
actor->AddChild(BackGroundSp);
RefPtr<Sprite> BackGround2Sp = new Sprite("ImagePacks2/Loading0.png");
BackGround2Sp->SetPos(Vec2{0, 686});
actor->AddComponent(BackGround2Sp);
actor->AddChild(BackGround2Sp);
RefPtr<Sprite> LoadCircleSp = new Sprite("ImagePacks2/Loading2.png");
LoadCircleSp->SetName("LoadCircle");
LoadCircleSp->SetPos(Vec2{1280 - 60, 686 - 60});
LoadCircleSp->SetBlendMode(LINEARDODGE);
LoadCircleSp->SetAnchor(Vec2{0.5f, 0.5f});
actor->AddComponent(LoadCircleSp);
actor->AddChild(LoadCircleSp);
actor->SetCallbackOnUpdate([LoadCircleSp](float deltaTime) mutable
actor->SetCallbackOnUpdate("Rotate", [LoadCircleSp](float deltaTime) mutable
{
float angle = LoadCircleSp->GetRotation();
LoadCircleSp->SetRotation(angle + 180.0f * deltaTime); });