feat(npc): 添加NPC交互高亮效果及复合纹理支持
实现NPC交互时的绿色高亮效果,通过InteractionHighlightSprite类实现 重构NpcAnimation支持复合纹理渲染,优化高亮效果的性能 添加ShaderManager获取所有加载Shader的方法,优化渲染器uniform更新逻辑
This commit is contained in:
20
Game/include/common/InteractionHighlightSprite.h
Normal file
20
Game/include/common/InteractionHighlightSprite.h
Normal 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
|
||||
Reference in New Issue
Block a user