Ejemplo n.º 1
0
#include "StdAfx.h"
#include "ActorSystem.h"

#include "MonoScriptSystem.h"
#include "Actor.h"

#include <IGameFramework.h>

CActorSystem::TActorClasses CActorSystem::m_monoActorClasses = TActorClasses();

CActorSystem::CActorSystem()
{
	REGISTER_METHOD(GetPlayerHealth);
	REGISTER_METHOD(SetPlayerHealth);
	REGISTER_METHOD(GetPlayerMaxHealth);
	REGISTER_METHOD(SetPlayerMaxHealth);

	REGISTER_METHOD(GetActorInfoByChannelId);
	REGISTER_METHOD(GetActorInfoById);

	REGISTER_METHOD(RegisterActorClass);
	REGISTER_METHOD(CreateActor);
	REGISTER_METHOD(RemoveActor);

	REGISTER_METHOD(GetClientActorId);

	gEnv->pEntitySystem->AddSink(this, IEntitySystem::OnSpawn, 0);
}

CActorSystem::~CActorSystem()
{
Ejemplo n.º 2
0
#include "StdAfx.h"
#include "ActorSystem.h"

#include "Actor.h"
#include "AIActor.h"

#include "MonoScriptSystem.h"

#include "MonoEntity.h"

#include <IGameFramework.h>

CScriptbind_ActorSystem::TActorClasses CScriptbind_ActorSystem::m_monoActorClasses = TActorClasses();

CScriptbind_ActorSystem::CScriptbind_ActorSystem()
{
	REGISTER_METHOD(GetPlayerHealth);
	REGISTER_METHOD(SetPlayerHealth);
	REGISTER_METHOD(GetPlayerMaxHealth);
	REGISTER_METHOD(SetPlayerMaxHealth);

	REGISTER_METHOD(GetActorInfoByChannelId);
	REGISTER_METHOD(GetActorInfoById);

	REGISTER_METHOD(RegisterActorClass);
	REGISTER_METHOD(CreateActor);
	REGISTER_METHOD(RemoveActor);

	REGISTER_METHOD(GetClientActorId);

	REGISTER_METHOD(RemoteInvocation);