实现NPC交互时的绿色高亮效果,通过InteractionHighlightSprite类实现 重构NpcAnimation支持复合纹理渲染,优化高亮效果的性能 添加ShaderManager获取所有加载Shader的方法,优化渲染器uniform更新逻辑
21 lines
376 B
C++
21 lines
376 B
C++
#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
|