Nebula
Loading...
Searching...
No Matches
scriptfeatureunit.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
9#include "game/featureunit.h"
10#include "assemblyid.h"
11
12//------------------------------------------------------------------------------
13namespace Scripting
14{
15
16class NSharpServer;
17
19{
22
23public:
24
29
31 void SetScriptAssembly(IO::URI const& path);
32
34
35 void OnActivate() override;
36 void OnDeactivate() override;
37 void OnBeginFrame() override;
38 void OnFrame() override;
39 void OnEndFrame() override;
40 virtual void OnRenderDebug();
41
42private:
45
47};
48
49} // namespace Scripting
50//------------------------------------------------------------------------------
A FeatureUnit is an encapsulated feature which can be added to an application.
Definition featureunit.h:34
An URI object can split a Uniform Resource Identifier string into its components or build a string fr...
Definition uri.h:67
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition ptr.h:38
Definition scriptfeatureunit.h:19
void OnEndFrame() override
called at the end of the feature trigger cycle
Definition scriptfeatureunit.cc:104
Ptr< Scripting::NSharpServer > server
Definition scriptfeatureunit.h:46
void OnBeginFrame() override
called on begin of frame
Definition scriptfeatureunit.cc:86
__DeclareClass(ScriptFeatureUnit) __DeclareSingleton(ScriptFeatureUnit) public ~ScriptFeatureUnit()
destructor
Definition scriptfeatureunit.cc:25
IO::URI assemblyPath
Definition scriptfeatureunit.h:43
void SetScriptAssembly(IO::URI const &path)
call this before attaching the feature unit
Definition scriptfeatureunit.cc:34
void OnActivate() override
called after GameServer::AttachGameFeature()
Definition scriptfeatureunit.cc:52
void OnFrame() override
called in the middle of the feature trigger cycle
Definition scriptfeatureunit.cc:95
Scripting::AssemblyId GetAssemblyId() const
Definition scriptfeatureunit.cc:43
Scripting::AssemblyId assemblyId
Definition scriptfeatureunit.h:44
virtual void OnRenderDebug()
called when game debug visualization is on
Definition scriptfeatureunit.cc:113
void OnDeactivate() override
called before GameServer::RemoveGameFeature()
Definition scriptfeatureunit.cc:75
Prototype for deargui scripting init.
Definition deargui.cpp:2701
#define __DeclareSingleton(type)
Definition osxsingleton.h:24
#define __DeclareClass(type)
Definition assemblyid.h:12