载入中...
搜索中...
未找到
Avatar.h
浏览该文件的文档.
1#pragma once
2
4#include "common/Module.h"
5
6#include <string>
7#include <vector>
8
9namespace eve::graphics {
10class Graphics;
11}
12
13namespace eve::avatar {
14
23class Avatar : public Module {
24public:
26 Avatar() = default;
27 ~Avatar() override;
28
32
33 void update(float dt);
35 void sync();
40 void render(graphics::Graphics *gfx);
41 int getAvatarCount() const;
42
52 static std::string getLive2DBackendName();
53
54private:
55 friend class AvatarInstance;
56 void registerInstance(AvatarInstance *a);
57 void unregisterInstance(AvatarInstance *a);
58
59 std::vector<AvatarInstance *> avatars_;
60 static Live2DBackendFactory live2dFactory_;
61};
62
63} // namespace eve::avatar
uint32_t a
Unified avatar instance. Kind is a string: "image" | "live2d" | "vroid". Script-facing API avoids ove...
Avatar module — layered character rendering for VN / portrait use. Script: avatar <- eve....
Definition Avatar.h:23
static void registerLive2DBackend(Live2DBackendFactory factory)
C++ / plugin: replace Live2D backend factory. Pass nullptr to restore the built-in NullLive2DBackend ...
Definition Avatar.cpp:65
static Live2DBackendFactory live2DBackendFactory()
Definition Avatar.cpp:69
void render(graphics::Graphics *gfx)
Sync then draw Image/Live2D avatars via the shared 2D sprite queue (does not present)....
Definition Avatar.cpp:55
void update(float dt)
Definition Avatar.cpp:41
AvatarInstance * newLive2DAvatar()
Definition Avatar.cpp:37
~Avatar() override
Definition Avatar.cpp:15
AvatarInstance * newImageAvatar()
Definition Avatar.cpp:35
int getAvatarCount() const
Definition Avatar.cpp:63
static std::string getLive2DBackendName()
Backend name currently in effect ("null" when using the built-in stub).
Definition Avatar.cpp:76
AvatarInstance * newVroidAvatar()
Definition Avatar.cpp:39
static ILive2DBackend * createLive2DBackend()
Always returns a backend: custom factory, else NullLive2DBackend.
Definition Avatar.cpp:71
void sync()
Sync all live avatars into renderables.
Definition Avatar.cpp:48
Optional Live2D runtime backend (Cubism etc.). Registered from C++ / plugins.
ILive2DBackend *(*)() Live2DBackendFactory
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition AnimTrail.h:6