My Project
Loading...
Searching...
No Matches
Script Class Referenceabstract

Abstract base class for all user scripts. More...

#include <Script.hpp>

Inheritance diagram for Script:
UserScript

Public Member Functions

virtual ~Script ()=default
 Virtual destructor. Ensures derived scripts are properly destroyed when deleted via a base pointer.
virtual void OnStart ()=0
 Called once when the script is initialized. Use this method to set up any state or references needed before the first Update().
virtual void Update (float deltatime)=0
 Called every frame to update the script.

Detailed Description

Abstract base class for all user scripts.

Scripts should inherit from this class and implement the OnStart() and Update() methods. This allows the engine to call lifecycle methods on all registered scripts consistently.

Constructor & Destructor Documentation

◆ ~Script()

virtual Script::~Script ( )
virtualdefault

Virtual destructor. Ensures derived scripts are properly destroyed when deleted via a base pointer.

Member Function Documentation

◆ OnStart()

virtual void Script::OnStart ( )
pure virtual

Called once when the script is initialized. Use this method to set up any state or references needed before the first Update().

Implemented in UserScript.

◆ Update()

virtual void Script::Update ( float deltatime)
pure virtual

Called every frame to update the script.

Parameters
deltatimeTime elapsed since the last frame, in seconds.

Implemented in UserScript.


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