feat(sprite): 添加偏移量支持并优化NPK精灵创建
添加Sprite类的偏移量属性,支持设置和获取偏移量 修改NPK精灵创建逻辑,自动设置帧偏移量 注释掉main.cpp中不必要的锚点设置
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user