using System; using System.Collections.Generic; using System.Reflection; using System.Runtime.InteropServices; using UnityFusion.CLR.TypeSystem; using UnityFusion.CLR.Method; using UnityFusion.Runtime.Enviorment; using UnityFusion.Runtime.Intepreter; using UnityFusion.Runtime.Stack; using UnityFusion.Reflection; using UnityFusion.CLR.Utils; #if DEBUG && !DISABLE_UNITYFUSION_DEBUG using AutoList = System.Collections.Generic.List; #else using AutoList = UnityFusion.Other.UncheckedList; #endif namespace UnityFusion.Runtime.Generated { unsafe class UnityEngine_Random_Binding { public static void Register(UnityFusion.Runtime.Enviorment.AppDomain app) { BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly; MethodBase method; Type[] args; Type type = typeof(UnityEngine.Random); args = new Type[]{typeof(System.Int32)}; method = type.GetMethod("InitState", flag, null, args, null); app.RegisterCLRMethodRedirection(method, InitState_0); args = new Type[]{}; method = type.GetMethod("get_state", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_state_1); args = new Type[]{typeof(UnityEngine.Random.State)}; method = type.GetMethod("set_state", flag, null, args, null); app.RegisterCLRMethodRedirection(method, set_state_2); args = new Type[]{typeof(System.Single), typeof(System.Single)}; method = type.GetMethod("Range", flag, null, args, null); app.RegisterCLRMethodRedirection(method, Range_3); args = new Type[]{typeof(System.Int32), typeof(System.Int32)}; method = type.GetMethod("Range", flag, null, args, null); app.RegisterCLRMethodRedirection(method, Range_4); args = new Type[]{}; method = type.GetMethod("get_value", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_value_5); args = new Type[]{}; method = type.GetMethod("get_insideUnitSphere", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_insideUnitSphere_6); args = new Type[]{}; method = type.GetMethod("get_insideUnitCircle", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_insideUnitCircle_7); args = new Type[]{}; method = type.GetMethod("get_onUnitSphere", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_onUnitSphere_8); args = new Type[]{}; method = type.GetMethod("get_rotation", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_rotation_9); args = new Type[]{}; method = type.GetMethod("get_rotationUniform", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_rotationUniform_10); args = new Type[]{}; method = type.GetMethod("ColorHSV", flag, null, args, null); app.RegisterCLRMethodRedirection(method, ColorHSV_11); args = new Type[]{typeof(System.Single), typeof(System.Single)}; method = type.GetMethod("ColorHSV", flag, null, args, null); app.RegisterCLRMethodRedirection(method, ColorHSV_12); args = new Type[]{typeof(System.Single), typeof(System.Single), typeof(System.Single), typeof(System.Single)}; method = type.GetMethod("ColorHSV", flag, null, args, null); app.RegisterCLRMethodRedirection(method, ColorHSV_13); args = new Type[]{typeof(System.Single), typeof(System.Single), typeof(System.Single), typeof(System.Single), typeof(System.Single), typeof(System.Single)}; method = type.GetMethod("ColorHSV", flag, null, args, null); app.RegisterCLRMethodRedirection(method, ColorHSV_14); args = new Type[]{typeof(System.Single), typeof(System.Single), typeof(System.Single), typeof(System.Single), typeof(System.Single), typeof(System.Single), typeof(System.Single), typeof(System.Single)}; method = type.GetMethod("ColorHSV", flag, null, args, null); app.RegisterCLRMethodRedirection(method, ColorHSV_15); } static StackObject* InitState_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Int32 @seed = ptr_of_this_method->Value; UnityEngine.Random.InitState(@seed); return __ret; } static StackObject* get_state_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); var result_of_this_method = UnityEngine.Random.state; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* set_state_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.Random.State @value = (UnityEngine.Random.State)typeof(UnityEngine.Random.State).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); UnityEngine.Random.state = value; return __ret; } static StackObject* Range_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 2); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Single @maxInclusive = *(float*)&ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 2); System.Single @minInclusive = *(float*)&ptr_of_this_method->Value; var result_of_this_method = UnityEngine.Random.Range(@minInclusive, @maxInclusive); __ret->ObjectType = ObjectTypes.Float; *(float*)&__ret->Value = result_of_this_method; return __ret + 1; } static StackObject* Range_4(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 2); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Int32 @maxExclusive = ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 2); System.Int32 @minInclusive = ptr_of_this_method->Value; var result_of_this_method = UnityEngine.Random.Range(@minInclusive, @maxExclusive); __ret->ObjectType = ObjectTypes.Integer; __ret->Value = result_of_this_method; return __ret + 1; } static StackObject* get_value_5(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); var result_of_this_method = UnityEngine.Random.value; __ret->ObjectType = ObjectTypes.Float; *(float*)&__ret->Value = result_of_this_method; return __ret + 1; } static StackObject* get_insideUnitSphere_6(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); var result_of_this_method = UnityEngine.Random.insideUnitSphere; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* get_insideUnitCircle_7(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); var result_of_this_method = UnityEngine.Random.insideUnitCircle; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* get_onUnitSphere_8(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); var result_of_this_method = UnityEngine.Random.onUnitSphere; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* get_rotation_9(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); var result_of_this_method = UnityEngine.Random.rotation; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* get_rotationUniform_10(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); var result_of_this_method = UnityEngine.Random.rotationUniform; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* ColorHSV_11(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); var result_of_this_method = UnityEngine.Random.ColorHSV(); return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* ColorHSV_12(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 2); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Single @hueMax = *(float*)&ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 2); System.Single @hueMin = *(float*)&ptr_of_this_method->Value; var result_of_this_method = UnityEngine.Random.ColorHSV(@hueMin, @hueMax); return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* ColorHSV_13(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 4); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Single @saturationMax = *(float*)&ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 2); System.Single @saturationMin = *(float*)&ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 3); System.Single @hueMax = *(float*)&ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 4); System.Single @hueMin = *(float*)&ptr_of_this_method->Value; var result_of_this_method = UnityEngine.Random.ColorHSV(@hueMin, @hueMax, @saturationMin, @saturationMax); return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* ColorHSV_14(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 6); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Single @valueMax = *(float*)&ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 2); System.Single @valueMin = *(float*)&ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 3); System.Single @saturationMax = *(float*)&ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 4); System.Single @saturationMin = *(float*)&ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 5); System.Single @hueMax = *(float*)&ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 6); System.Single @hueMin = *(float*)&ptr_of_this_method->Value; var result_of_this_method = UnityEngine.Random.ColorHSV(@hueMin, @hueMax, @saturationMin, @saturationMax, @valueMin, @valueMax); return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* ColorHSV_15(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 8); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Single @alphaMax = *(float*)&ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 2); System.Single @alphaMin = *(float*)&ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 3); System.Single @valueMax = *(float*)&ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 4); System.Single @valueMin = *(float*)&ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 5); System.Single @saturationMax = *(float*)&ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 6); System.Single @saturationMin = *(float*)&ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 7); System.Single @hueMax = *(float*)&ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 8); System.Single @hueMin = *(float*)&ptr_of_this_method->Value; var result_of_this_method = UnityEngine.Random.ColorHSV(@hueMin, @hueMax, @saturationMin, @saturationMax, @valueMin, @valueMax, @alphaMin, @alphaMax); return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } } }