#pragma once #include namespace frostbite2D { struct CharacterShadowFrameSnapshot { bool visible = false; Ptr texture = nullptr; Vec2 textureSize = Vec2::Zero(); Vec2 groundAnchorInTexture = Vec2::Zero(); Vec2 groundScreenPosition = Vec2::Zero(); int zOrder = 0; uint64 textureVersion = 0; }; class CharacterShadowActor : public Sprite { public: CharacterShadowActor(); void ApplyFrameSnapshot(const CharacterShadowFrameSnapshot& snapshot); private: void ApplyTextureState(const CharacterShadowFrameSnapshot& snapshot); Ptr appliedTexture_ = nullptr; Vec2 appliedTextureSize_ = Vec2::Zero(); Vec2 appliedGroundAnchorInTexture_ = Vec2::Zero(); uint64 appliedTextureVersion_ = 0; }; } // namespace frostbite2D