Epok Engine

EPOK RUNTIME

epok::Sprite2DComponent

Class

Declarations are extracted from the pinned headers. Examples and general guidance are generated sketches, not verified complete programs; consult the linked source and guides for the actual contract.

Class

---- Sprite2D -------------------------------------------------------------------------- One textured quad, optionally animated by cooked frame clips (a still sprite and a frame-animated sprite in one component).

Namespace
epok
Header
world2d_components.hpp
Include
#include "world2d_components.hpp"
Module
world2d-components
Source
runtime/world2d_components.hpp:122
Inherits from
ActorComponent

Basic usage

This generated sketch illustrates syntax for reaching the type; adapt it to the actual API contract. Open a member below for an operation-specific example.

C++ example
#include "world2d_components.hpp"

epok::Sprite2DComponent& value = /* obtain a valid instance from your game */;

Fields and constants

animationExposes `animation` on `epok::Sprite2DComponent` for the world2d components module.FieldblendExposes `blend` on `epok::Sprite2DComponent` for the world2d components module.FieldcenteredExposes `centered` on `epok::Sprite2DComponent` for the world2d components module.Fieldclip_countExposes `clip_count` on `epok::Sprite2DComponent` for the world2d components module.FieldclipsCooked frame clips (SpriteFrames).FieldelapsedExposes `elapsed` on `epok::Sprite2DComponent` for the world2d components module.FieldfinishedExposes `finished` on `epok::Sprite2DComponent` for the world2d components module.Fieldflip_hExposes `flip_h` on `epok::Sprite2DComponent` for the world2d components module.Fieldflip_vExposes `flip_v` on `epok::Sprite2DComponent` for the world2d components module.FieldframeExposes `frame` on `epok::Sprite2DComponent` for the world2d components module.FieldhframesExposes `hframes` on `epok::Sprite2DComponent` for the world2d components module.Fieldlink2dExposes `link2d` on `epok::Sprite2DComponent` for the world2d components module.FieldmodulateExposes `modulate` on `epok::Sprite2DComponent` for the world2d components module.FieldoffsetExposes `offset` on `epok::Sprite2DComponent` for the world2d components module.Fieldpending_eventExposes `pending_event` on `epok::Sprite2DComponent` for the world2d components module.FieldplayingExposes `playing` on `epok::Sprite2DComponent` for the world2d components module.FieldregionExposes `region` on `epok::Sprite2DComponent` for the world2d components module.Fieldspeed_scaleExposes `speed_scale` on `epok::Sprite2DComponent` for the world2d components module.Fieldstatic_class_idExposes `static_class_id` on `epok::Sprite2DComponent` for the world2d components module.VariabletextureAuthored state.FieldvframesExposes `vframes` on `epok::Sprite2DComponent` for the world2d components module.FieldviewportAn actor with a SubViewport2D: its picture replaces the texture.FieldvisibleExposes `visible` on `epok::Sprite2DComponent` for the world2d components module.Fieldy_sortExposes `y_sort` on `epok::Sprite2DComponent` for the world2d components module.Fieldz_indexExposes `z_index` on `epok::Sprite2DComponent` for the world2d components module.Field

Public methods

~Sprite2DComponentReleases the resources owned by `epok::Sprite2DComponent`.destructoradvanceAdvances the playing clip by one simulation step.Methodanimation_countPerforms `animation count` as part of the world2d components module.Methodclass_idPerforms `class id` as part of the world2d components module.Methodcurrent_animationPerforms `current animation` as part of the world2d components module.Methodcurrent_framePerforms `current frame` as part of the world2d components module.Methodis_flipped_hReports whether flipped h as part of the world2d components module.Methodis_playingReports whether playing as part of the world2d components module.Methodis_visibleReports whether visible as part of the world2d components module.Methodlevel_attachedPerforms `level attached` as part of the world2d components module.MethodpausePauses pause as part of the world2d components module.MethodplayStarts play as part of the world2d components module.Methodplay_namedC++ convenience: play a clip by its authored name.Methodset_flip_hSets flip h as part of the world2d components module.Methodset_flip_vSets flip v as part of the world2d components module.Methodset_frameSets frame as part of the world2d components module.Methodset_modulateSets modulate as part of the world2d components module.Methodset_speed_scaleSets speed scale as part of the world2d components module.Methodset_texture_regionSets texture region as part of the world2d components module.Methodset_viewportShows the picture of the SubViewport2D on `actor` (an empty id: the texture again).Methodset_visibleSets visible as part of the world2d components module.Methodset_z_indexSets z index as part of the world2d components module.Methodsource_rectThe texel rectangle drawn this frame, given the texture size.MethodstopStops stop as part of the world2d components module.Methodtake_animation_finishedTrue once after a non-looping clip reached its last frame.Methodtake_frame_eventThe event id of the last frame entered (0 = none), reported once.Method