Пример #1
0
 static public int set_OnDamage(IntPtr l)
 {
     try {
         GameFramework.EntityManager    self = (GameFramework.EntityManager)checkSelf(l);
         GameFramework.DamageDelegation v;
         int op = LuaDelegation.checkDelegate(l, 2, out v);
         if (op == 0)
         {
             self.OnDamage = v;
         }
         else if (op == 1)
         {
             self.OnDamage += v;
         }
         else if (op == 2)
         {
             self.OnDamage -= v;
         }
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #2
0
 static public int get_Entities(IntPtr l)
 {
     try {
         GameFramework.EntityManager self = (GameFramework.EntityManager)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.Entities);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #3
0
 static public int Reset(IntPtr l)
 {
     try {
         GameFramework.EntityManager self = (GameFramework.EntityManager)checkSelf(l);
         self.Reset();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #4
0
 static public int HasCombatNpcAlive(IntPtr l)
 {
     try {
         GameFramework.EntityManager self = (GameFramework.EntityManager)checkSelf(l);
         var ret = self.HasCombatNpcAlive();
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #5
0
 static public int AddEntity(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 6)
         {
             GameFramework.EntityManager self = (GameFramework.EntityManager)checkSelf(l);
             System.Int32 a1;
             checkType(l, 2, out a1);
             System.Int32 a2;
             checkType(l, 3, out a2);
             TableConfig.Actor a3;
             checkType(l, 4, out a3);
             System.String a4;
             checkType(l, 5, out a4);
             System.String[] a5;
             checkParams(l, 6, out a5);
             var ret = self.AddEntity(a1, a2, a3, a4, a5);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         else if (argc == 7)
         {
             GameFramework.EntityManager self = (GameFramework.EntityManager)checkSelf(l);
             System.Int32 a1;
             checkType(l, 2, out a1);
             System.Int32 a2;
             checkType(l, 3, out a2);
             System.Int32 a3;
             checkType(l, 4, out a3);
             TableConfig.Actor a4;
             checkType(l, 5, out a4);
             System.String a5;
             checkType(l, 6, out a5);
             System.String[] a6;
             checkParams(l, 7, out a6);
             var ret = self.AddEntity(a1, a2, a3, a4, a5, a6);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #6
0
 static public int SetSceneContext(IntPtr l)
 {
     try {
         GameFramework.EntityManager    self = (GameFramework.EntityManager)checkSelf(l);
         GameFramework.SceneContextInfo a1;
         checkType(l, 2, out a1);
         self.SetSceneContext(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #7
0
 static public int RemoveEntity(IntPtr l)
 {
     try {
         GameFramework.EntityManager self = (GameFramework.EntityManager)checkSelf(l);
         System.Int32 a1;
         checkType(l, 2, out a1);
         self.RemoveEntity(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #8
0
 static public int constructor(IntPtr l)
 {
     try {
         GameFramework.EntityManager o;
         System.Int32 a1;
         checkType(l, 2, out a1);
         o = new GameFramework.EntityManager(a1);
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #9
0
 static public int GetEntityInfoByUnitId(IntPtr l)
 {
     try {
         GameFramework.EntityManager self = (GameFramework.EntityManager)checkSelf(l);
         System.Int32 a1;
         checkType(l, 2, out a1);
         var ret = self.GetEntityInfoByUnitId(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #10
0
 static public int GetNearest(IntPtr l)
 {
     try {
         GameFramework.EntityManager self = (GameFramework.EntityManager)checkSelf(l);
         ScriptRuntime.Vector3       a1;
         checkValueType(l, 2, out a1);
         System.Single a2;
         checkType(l, 3, out a2);
         var ret = self.GetNearest(a1, ref a2);
         pushValue(l, true);
         pushValue(l, ret);
         pushValue(l, a2);
         return(3);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #11
0
 static public int FireDamageEvent(IntPtr l)
 {
     try {
         GameFramework.EntityManager self = (GameFramework.EntityManager)checkSelf(l);
         System.Int32 a1;
         checkType(l, 2, out a1);
         System.Int32 a2;
         checkType(l, 3, out a2);
         System.Boolean a3;
         checkType(l, 4, out a3);
         System.Boolean a4;
         checkType(l, 5, out a4);
         System.Int32 a5;
         checkType(l, 6, out a5);
         System.Int32 a6;
         checkType(l, 7, out a6);
         self.FireDamageEvent(a1, a2, a3, a4, a5, a6);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #12
0
 public void SetEntityManager(EntityManager npcMgr)
 {
     m_NpcMgr = npcMgr;
 }
 public void SetEntityManager(EntityManager npcMgr)
 {
     m_EntityMgr = npcMgr;
 }
 internal void Init(Scene scene, EntityManager mgr)
 {
     m_Scene = scene;
     m_EntityMgr = mgr;
     mgr.OnDamage += OnDamage;
 }