Nebula
Loading...
Searching...
No Matches
game.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
10//------------------------------------------------------------------------------
11#include "nsharp/nsconfig.h"
12
13namespace Scripting
14{
15
16namespace Api
17{
18
19//------------------------------------------------------------------------------
22NEBULA_EXPORT bool EntityIsValid(uint64_t entity);
23
24//------------------------------------------------------------------------------
27NEBULA_EXPORT uint64_t EntityCreateFromTemplate(uint32_t worldId, const char* tmpl);
28
29//------------------------------------------------------------------------------
32NEBULA_EXPORT void EntityDelete(uint64_t entity);
33
34//------------------------------------------------------------------------------
37NEBULA_EXPORT bool EntityHasComponent(uint64_t entity, uint32_t componentId);
38
39//------------------------------------------------------------------------------
43
44//------------------------------------------------------------------------------
47NEBULA_EXPORT void EntitySetPosition(uint64_t entity, Math::vec3 pos);
48
49//------------------------------------------------------------------------------
53
54//------------------------------------------------------------------------------
57NEBULA_EXPORT void EntitySetOrientation(uint64_t entity, Math::quat orientation);
58
59//------------------------------------------------------------------------------
63
64//------------------------------------------------------------------------------
67NEBULA_EXPORT void EntitySetScale(uint64_t entity, Math::vec3 scale);
68
69//------------------------------------------------------------------------------
72NEBULA_EXPORT uint32_t ComponentGetId(const char* name);
73
74//------------------------------------------------------------------------------
77NEBULA_EXPORT void ComponentGetData(uint64_t entity, uint32_t componentId, void* outData, int dataSize);
78
79//------------------------------------------------------------------------------
82NEBULA_EXPORT void ComponentSetData(uint64_t entity, uint32_t componentId, void* data, int dataSize);
83
84//------------------------------------------------------------------------------
88
89} // namespace Api
90
91} // namespace Scripting
Nebula.Game.NebulaApiV1 Api
Definition Entity.cs:8
void ComponentGetData(uint64_t entityId, uint32_t componentId, void *outData, int dataSize)
Definition game.cc:153
uint64_t EntityCreateFromTemplate(uint32_t worldId, const char *tmpl)
Definition game.cc:39
Math::float4 EntityGetPosition(uint64_t entity)
Definition game.cc:75
void ComponentSetData(uint64_t entityId, uint32_t componentId, void *data, int dataSize)
Definition game.cc:173
void EntitySetPosition(uint64_t entity, Math::vec3 pos)
Definition game.cc:87
Math::float4 EntityGetScale(uint64_t entity)
Definition game.cc:121
Math::float4 EntityGetOrientation(uint64_t entity)
Definition game.cc:98
void EntitySetOrientation(uint64_t entity, Math::quat orientation)
Definition game.cc:110
bool EntityHasComponent(uint64_t entity, uint32_t componentId)
Definition game.cc:64
void EntityDelete(uint64_t entity)
Definition game.cc:53
void EntitySetScale(uint64_t entity, Math::vec3 scale)
Definition game.cc:133
uint32_t ComponentGetId(const char *name)
Definition game.cc:144
uint32_t WorldGetDefaultWorldId()
Definition game.cc:193
bool EntityIsValid(uint64_t entity)
Definition game.cc:24
Prototype for deargui scripting init.
Definition deargui.cpp:2701
#define NEBULA_EXPORT
Definition nsconfig.h:3
Definition scalar.h:76
A quaternion is usually used to represent an orientation in 3D space.
Definition quat.h:30
A 3D vector.
Definition vec3.h:40