feat(sprite): 添加偏移量支持并优化NPK精灵创建

添加Sprite类的偏移量属性,支持设置和获取偏移量
修改NPK精灵创建逻辑,自动设置帧偏移量
注释掉main.cpp中不必要的锚点设置
This commit is contained in:
2026-03-28 04:36:02 +08:00
parent b5e5fe5e63
commit 913cd966b3
4 changed files with 28 additions and 3 deletions

View File

@@ -64,7 +64,7 @@ int main(int argc, char **argv) {
if (ani) {
SDL_Log("Animation created successfully");
ani->SetAnchor(Vec2(0.5f, 0.5f));
// ani->SetAnchor(Vec2(0.5f, 0.5f));
ani->SetPosition(640, 360);
menuScene->AddChild(ani);
}