加入 Node节点类 还未测试新框架
This commit is contained in:
@@ -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); });
|
||||
|
||||
Reference in New Issue
Block a user