Exemplo n.º 1
0
        public static PlayerLoopSystem GetDefaultPlayerLoop()
        {
            PlayerLoopSystemInternal[] defaultPlayerLoopInternal = PlayerLoop.GetDefaultPlayerLoopInternal();
            int num = 0;

            return(PlayerLoop.InternalToPlayerLoopSystem(defaultPlayerLoopInternal, ref num));
        }
Exemplo 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);
        }