Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 645 Bytes

sprite_component.rst

File metadata and controls

29 lines (19 loc) · 645 Bytes

SpriteComponent

This component add sprite to game object.

Warning

This component use the TransformComponent and it can't work without it.

Editor

In the editor, you can change sprite by selecting json file or drag and drop.

Script

Variables

  • game_object: Object which own this component (GameObject)
  • engine: Utility class to control the game (Engine)
  • sprite: Resource file. Will search in resources folder. (string)
  • render: Final render.

Warning

You mustn't change render directly but use update_render function.

Functions

  • update_render(): Update render of component