v1.4.4
This commit is contained in:
commit
9c94d113d3
10260 changed files with 1237388 additions and 0 deletions
25
source/game/interfaces/StarScriptedEntity.hpp
Normal file
25
source/game/interfaces/StarScriptedEntity.hpp
Normal file
|
@ -0,0 +1,25 @@
|
|||
#ifndef STAR_SCRIPTED_ENTITY_HPP
|
||||
#define STAR_SCRIPTED_ENTITY_HPP
|
||||
|
||||
#include "StarEntity.hpp"
|
||||
#include "StarLua.hpp"
|
||||
|
||||
namespace Star {
|
||||
|
||||
STAR_CLASS(ScriptedEntity);
|
||||
|
||||
// All ScriptedEntity methods should only be called on master entities
|
||||
class ScriptedEntity : public virtual Entity {
|
||||
public:
|
||||
// Call a script function directly with the given arguments, should return
|
||||
// nothing only on failure.
|
||||
virtual Maybe<LuaValue> callScript(String const& func, LuaVariadic<LuaValue> const& args) = 0;
|
||||
|
||||
// Execute the given code directly in the underlying context, return nothing
|
||||
// on failure.
|
||||
virtual Maybe<LuaValue> evalScript(String const& code) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue