feat(npc): 添加NPC交互高亮效果及复合纹理支持

实现NPC交互时的绿色高亮效果,通过InteractionHighlightSprite类实现
重构NpcAnimation支持复合纹理渲染,优化高亮效果的性能
添加ShaderManager获取所有加载Shader的方法,优化渲染器uniform更新逻辑
This commit is contained in:
2026-04-07 23:17:34 +08:00
parent caad22cca7
commit 5af657c5c9
11 changed files with 418 additions and 56 deletions

View File

@@ -0,0 +1,20 @@
#pragma once
#include <frostbite2D/2d/sprite.h>
namespace frostbite2D {
class InteractionHighlightSprite : public Sprite {
public:
InteractionHighlightSprite();
void SetGroundAnchorInTexture(const Vec2& groundAnchorInTexture);
protected:
void ConfigureShader(Shader* shader) const override;
private:
Vec2 texelSize_ = Vec2::One();
};
} // namespace frostbite2D