|
Deki 0.19.0
Modular C++ 2D engine for embedded displays and desktop
|
Runs the boot scene's SetupComponents (such as SDCardComponent) one at a time, in order, waiting for each to finish, then loads the startup scene. More...
#include <deki/PlatformSetupComponent.h>
Inherits Deki::Component.
Public Member Functions | |
| PlatformSetupComponent () | |
| virtual | ~PlatformSetupComponent () |
| void | Start () override |
| Called once before the first Update, after every component's Awake has run. | |
| void | Update () override |
| Called every frame, only on classes that declare it. | |
| Public Member Functions inherited from Deki::Component | |
| Component () | |
| virtual | ~Component ()=default |
| Component (const Component &)=delete | |
| Component & | operator= (const Component &)=delete |
| ComponentType | GetType () const |
| The class's type id (TypeId<T>()), 0 for an instance with no type info. | |
| ComponentType | GetBaseType () const |
| The direct component base's type id, so GetComponent<Base>() finds subclasses. | |
| const ComponentTypeInfo * | GetTypeInfo () const |
| The class entry this instance runs through. | |
| void | SetTypeInfo (const ComponentTypeInfo *info) |
| Attaches the class entry. | |
| bool | DeclaresUpdate () const |
| True when this class (or a reflected base) declares Update(), as the codegen read it from the class declaration. | |
| Object * | GetOwner () const |
| void | SetOwner (Object *owner) |
| virtual void | Awake () |
| Called once, after AssetRefs and ObjectRefs are resolved. | |
| bool | HasAwoken () const |
| bool | HasStarted () const |
| void | MarkAwoken () |
| void | MarkStarted () |
| virtual void | LoadAssets () |
| Loads the assets this component needs (sprites, fonts, ...). | |
| virtual void | UnloadAssets () |
| Drops this component's asset pointers before shutdown. | |
| virtual void | RuntimeUpdate (float deltaTime) |
| Engine-driven per-frame work (physics, animation, ...), separate from the script-facing Update(): it runs in every mode, including the editor in edit mode, on components whose NeedsRuntimeUpdate() is true. | |
| virtual void | OnAssetRefResolved (const char *propertyName, void *asset, const char *guid) |
| Called after LifecycleManager resolves the AssetRef field propertyName to asset, loaded from guid. | |
| virtual bool | NeedsAssetLoading () const |
| True when LoadAssets() should be called. | |
| virtual bool | NeedsRuntimeUpdate () const |
| True when RuntimeUpdate() should be called each frame. | |
| bool | Deserialize (SceneFormat::SceneMsgPackParser &parser, uint32_t mapSize) |
| Reads this component's fields from the MessagePack map the parser is at (mapSize key-value pairs), through the codegen's hash-switch deserializer. | |
| void | ResolveObjectRefs (Scene *scene) |
| Points every ObjectRef field at its object in scene (ObjectRef.id -> ObjectRef.resolved). | |
| void | RemapObjectRefs (const std::unordered_map< uint32_t, uint32_t > &idRemap) |
| Rewrites ObjectRef ids through idRemap (old id -> new id), after Instantiate() gave the copies new ids. | |
| bool | HasRefsResolved () const |
| void | MarkRefsResolved () |
| void | ResetRefsResolved () |
| virtual void | OnPropertyChanged (const char *propertyName) |
| Called when the editor changes the field propertyName, after both Execute() and Undo() of ModifyComponentPropertyCommand. | |
Public Attributes | |
| std::vector< ObjectRef< SetupComponent > > | setupComponents |
Additional Inherited Members | |
| Protected Attributes inherited from Deki::Component | |
| Object * | m_Owner |
| const ComponentTypeInfo * | m_TypeInfo |
| bool | m_RefsResolved |
| bool | m_HasAwoken |
| bool | m_HasStarted |
Runs the boot scene's SetupComponents (such as SDCardComponent) one at a time, in order, waiting for each to finish, then loads the startup scene.
If a setup fails it stops there and the startup scene is not loaded.
In a boot scene: BootRoot ├── PlatformSetupComponent │ └── setupComponents: [→SDCardComponent] └── SDCardObj └── SDCardComponent
| Deki::PlatformSetupComponent::PlatformSetupComponent | ( | ) |
|
virtual |
|
overridevirtual |
Called once before the first Update, after every component's Awake has run.
Use it for setup that touches other components.
Reimplemented from Deki::Component.
|
overridevirtual |
Called every frame, only on classes that declare it.
Reimplemented from Deki::Component.
| std::vector<ObjectRef<SetupComponent> > Deki::PlatformSetupComponent::setupComponents |