Пример #1
0
        public static Object[] getRPCObject(int i, bool isTrue = true, int rangeMin = 0, int rangeMax = 0, bool rangeFirst = false, bool isPosition = false, Vector3 pos = new Vector3())
        {
            Debug.Msg("getRPCObject", 3);
            Object[] obj = new Object[i];
            if (i > 0)
            {
                Boolean boolean = default(Boolean);
                if (!rangeFirst)
                {
                    if (isTrue)
                    {
                        boolean.m_value = true;
                    }
                    else
                    {
                        boolean.m_value = false;
                    }
                    obj[0] = boolean.BoxIl2CppObject();

                    if (i == 2)
                    {
                        Int32 integer = default(Int32);
                        integer.m_value = Random.Range(rangeMin, rangeMax);
                        obj[1]          = integer.BoxIl2CppObject();
                    }
                }
                else
                {
                    Int32 integer = default(Int32);
                    integer.m_value = Random.Range(rangeMin, rangeMax);
                    obj[0]          = integer.BoxIl2CppObject();
                }
            }
            if (isPosition)
            {
                Vector3 vector = default(Vector3);
                vector = pos;
                obj[0] = vector.BoxIl2CppObject();
            }

            return(obj);
        }
Пример #2
0
        private static Object[] getRPCObject(int i, bool isTrue = true, int rangeMin = 0, int rangeMax = 0, bool rangeFirst = false)
        {
            Debug.Out("getRPCObject");
            Object[] obj = new Object[i];
            if (i > 0)
            {
                Boolean boolean = default(Boolean);
                if (!rangeFirst)
                {
                    if (isTrue)
                    {
                        boolean.m_value = true;
                    }
                    else
                    {
                        boolean.m_value = false;
                    }
                    obj[0] = boolean.BoxIl2CppObject();

                    if (i == 2)
                    {
                        Int32 integer = default(Int32);
                        integer.m_value = Random.Range(rangeMin, rangeMax);
                        obj[1]          = integer.BoxIl2CppObject();
                    }
                }
                else
                {
                    Int32 integer = default(Int32);
                    integer.m_value = Random.Range(rangeMin, rangeMax);
                    obj[0]          = integer.BoxIl2CppObject();
                }
            }

            return(obj);
        }