2019-02-03 21:45:56 +08:00
|
|
|
|
// Copyright (C) 2019 Nomango
|
|
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
#include "common.h"
|
|
|
|
|
|
|
|
|
|
|
|
class Demo1
|
|
|
|
|
|
: public Scene
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
static ScenePtr Create()
|
|
|
|
|
|
{
|
|
|
|
|
|
return new Demo1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Demo1()
|
|
|
|
|
|
{
|
|
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD>
|
2019-04-11 14:40:54 +08:00
|
|
|
|
TextPtr text = new Text(L"Hello Kiwano!");
|
2019-03-10 13:44:02 +08:00
|
|
|
|
// <20><><EFBFBD>ýڵ<C3BD><DAB5><EFBFBD>СΪ<D0A1><CEAA><EFBFBD>ֲ<EFBFBD><D6B2>ִ<EFBFBD>С
|
|
|
|
|
|
text->SetSize(text->GetLayoutSize());
|
2019-02-03 21:45:56 +08:00
|
|
|
|
// <20><><EFBFBD>ı<EFBFBD><C4B1><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>Ļ<EFBFBD><C4BB><EFBFBD><EFBFBD>
|
|
|
|
|
|
text->SetPosition(WINDOW_WIDTH / 2, WINDOW_HEIGHT / 2);
|
|
|
|
|
|
text->SetAnchor(0.5, 0.5);
|
|
|
|
|
|
// <20><><EFBFBD>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
this->AddChild(text);
|
|
|
|
|
|
|
|
|
|
|
|
// ִ<>ж<EFBFBD><D0B6><EFBFBD>
|
|
|
|
|
|
text->AddAction(
|
2019-02-11 18:57:28 +08:00
|
|
|
|
Tween::Multiple({ // Action5: ͬʱִ<CAB1><D6B4> Action1 <20><> Action4, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD>
|
2019-02-03 21:45:56 +08:00
|
|
|
|
Tween::RotateBy(60).SetDuration(1000), // Action1: 1<><31><EFBFBD><EFBFBD>ת 60 <20><>
|
2019-02-11 18:57:28 +08:00
|
|
|
|
Tween::Group({ // Action4: ˳<><CBB3>ִ<EFBFBD><D6B4> Action2 <20><> Action3
|
2019-02-03 21:45:56 +08:00
|
|
|
|
Tween::FadeOut(500), // Action2: 500<30><30><EFBFBD>뵭<EFBFBD><EBB5AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
Tween::FadeIn(500) // Action3: 500<30><30><EFBFBD>뵭<EFBFBD>붯<EFBFBD><EBB6AF>
|
|
|
|
|
|
})
|
2019-02-09 22:45:27 +08:00
|
|
|
|
}).SetLoops(-1)
|
2019-02-03 21:45:56 +08:00
|
|
|
|
);
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|