jade-engine  0.0
JadeEngine::BoxSprite Class Reference
Inheritance diagram for JadeEngine::BoxSprite:
JadeEngine::Sprite JadeEngine::IGameObject

Public Member Functions

 BoxSprite (const BoxSpriteParams &params)
 
void Render (SDL_Renderer *renderer) override
 
void SetScale (const int32_t x, const int32_t y)
 
bool HasHitTest () const override
 
- Public Member Functions inherited from JadeEngine::Sprite
 Sprite (const SpriteParams &params)
 
 Sprite (const ObjectLayer layer, std::shared_ptr< Texture > texture, const int32_t z)
 
void Render (SDL_Renderer *renderer) override
 
void Clean () override
 
void Tint (const SDL_Color &tintColor)
 
void SetAlpha (const float alpha)
 
void MakeTextureUnique ()
 
virtual float GetAlpha () const
 
void SetRotation (const double angle)
 
virtual bool HitTest (const int32_t x, const int32_t y) const
 
void SetSampling (const TextureSampling sampling)
 
void SetSpriteSheetSprite (const std::string &sprite)
 
void SetSpriteSheetMask (const Rectangle &mask)
 
const std::string & GetTextureName () const
 
- Public Member Functions inherited from JadeEngine::IGameObject
 IGameObject ()
 
virtual void Update ()
 
virtual LoadState Load (SDL_Renderer *renderer)
 
LoadState GetLoadState () const
 
void SetLoadState (const LoadState newState)
 
bool IsShown () const
 
virtual void Show (const bool show)
 
int32_t GetZ () const
 
void Destroy ()
 
bool DestructionWanted () const
 

Additional Inherited Members

- Public Attributes inherited from JadeEngine::IGameObject
const std::shared_ptr< Transformtransform
 
- Protected Attributes inherited from JadeEngine::Sprite
std::shared_ptr< Texture_textureDescription
 
const detail::SpriteSheetDescription * _spriteSheetDescription
 
SDL_Texture * _texture
 
bool _spriteSheetMasked
 
Rectangle _spriteSheetMask
 
std::string _textureName
 
bool _rotated
 
float _alpha
 
double _rotationAngle
 
ObjectLayer _layer
 
- Protected Attributes inherited from JadeEngine::IGameObject
LoadState _loadState
 
bool _shown
 
int32_t _z
 

Member Function Documentation

◆ HasHitTest()

bool JadeEngine::BoxSprite::HasHitTest ( ) const
inlineoverridevirtual

Return whether the sprite's texture was initialized with hit map.

See also
GameInitParamsTextureEntry::generateHitMap, Sprite::HitTest

Reimplemented from JadeEngine::Sprite.

◆ Render()

void JadeEngine::BoxSprite::Render ( SDL_Renderer *  renderer)
overridevirtual

Triggered every frame while the scene that owns this game object is active, the game object was successfully loaded and the game object is shown.

The trigger order is the following: IScene::PreUpdate -> IGameObject::Load -> IGameObject::Update -> IScene::Update -> IGameObject::Load -> IGameObject::Render.

Parameters
rendererThe engine's SDL2 renderer that should be used to render the game object.
See also
IGameObject::Update, LoadState, IGameObject::IsShown

Reimplemented from JadeEngine::IGameObject.


The documentation for this class was generated from the following files: