NWengine 0.9
Loading...
Searching...
No Matches
Scriptable Class Reference

The base class for scriptable components. More...

#include <Script.h>

Public Member Functions

 Scriptable (GameObject *goc=nullptr, void *nws=nullptr)
 Constructs a Scriptable object.
 
virtual void Start ()
 Called when the script is started.
 
virtual void Update ()
 Called every frame to update the script.
 
virtual void Gui ()
 Called to draw the script's GUI.
 
virtual void ShaderCode (void *sprite)
 Called to generate shader code for the script.
 
virtual std::string GetName ()
 Gets the name of the script.
 

Public Attributes

GameObjectgoc = nullptr
 
std::string __nwname = "None"
 
voidnws = nullptr
 

Detailed Description

The base class for scriptable components.

Constructor & Destructor Documentation

◆ Scriptable()

Scriptable::Scriptable ( GameObject * goc = nullptr,
void * nws = nullptr )
inline

Constructs a Scriptable object.

Parameters
gocThe associated GameObject.
nwsA pointer to additional script data.

Member Function Documentation

◆ GetName()

virtual std::string Scriptable::GetName ( )
inlinevirtual

Gets the name of the script.

Returns
The name of the script.

◆ ShaderCode()

void Scriptable::ShaderCode ( void * sprite)
virtual

Called to generate shader code for the script.

Parameters
spriteA pointer to the sprite data.

◆ Start()

virtual void Scriptable::Start ( )
inlinevirtual

Called when the script is started.

Virtual destructor.

Member Data Documentation

◆ __nwname

std::string Scriptable::__nwname = "None"

The name of the script.

◆ goc

GameObject* Scriptable::goc = nullptr

The associated GameObject.

◆ nws

void* Scriptable::nws = nullptr

Additional script data.


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