static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.Experimental.LowLevel.PlayerLoop o;
         o = new UnityEngine.Experimental.LowLevel.PlayerLoop();
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Esempio n. 2
0
        private static PlayerLoopSystem InternalToPlayerLoopSystem(PlayerLoopSystemInternal[] internalSys, ref int offset)
        {
            PlayerLoopSystem result = new PlayerLoopSystem
            {
                type                  = internalSys[offset].type,
                updateDelegate        = internalSys[offset].updateDelegate,
                updateFunction        = internalSys[offset].updateFunction,
                loopConditionFunction = internalSys[offset].loopConditionFunction,
                subSystemList         = null
            };
            int num = offset++;

            if (internalSys[num].numSubSystems > 0)
            {
                List <PlayerLoopSystem> list = new List <PlayerLoopSystem>();
                while (offset <= num + internalSys[num].numSubSystems)
                {
                    list.Add(PlayerLoop.InternalToPlayerLoopSystem(internalSys, ref offset));
                }
                result.subSystemList = list.ToArray();
            }
            return(result);
        }
Esempio n. 3
0
        private static int PlayerLoopSystemToInternal(PlayerLoopSystem sys, ref List <PlayerLoopSystemInternal> internalSys)
        {
            int count = internalSys.Count;
            PlayerLoopSystemInternal playerLoopSystemInternal = new PlayerLoopSystemInternal
            {
                type                  = sys.type,
                updateDelegate        = sys.updateDelegate,
                updateFunction        = sys.updateFunction,
                loopConditionFunction = sys.loopConditionFunction,
                numSubSystems         = 0
            };

            internalSys.Add(playerLoopSystemInternal);
            if (sys.subSystemList != null)
            {
                for (int i = 0; i < sys.subSystemList.Length; i++)
                {
                    playerLoopSystemInternal.numSubSystems += PlayerLoop.PlayerLoopSystemToInternal(sys.subSystemList[i], ref internalSys);
                }
            }
            internalSys[count] = playerLoopSystemInternal;
            return(playerLoopSystemInternal.numSubSystems + 1);
        }