Esempio n. 1
0
 internal static bool __tryArrayGet(Type type, RealStatePtr L, ObjectTranslator translator, object obj, int index)
 {
     if (type == typeof(UnityEngine.Vector2[]))
     {
         UnityEngine.Vector2[] array = obj as UnityEngine.Vector2[];
         translator.PushUnityEngineVector2(L, array[index]);
         return(true);
     }
     else if (type == typeof(UnityEngine.Vector3[]))
     {
         UnityEngine.Vector3[] array = obj as UnityEngine.Vector3[];
         translator.PushUnityEngineVector3(L, array[index]);
         return(true);
     }
     else if (type == typeof(UnityEngine.Vector4[]))
     {
         UnityEngine.Vector4[] array = obj as UnityEngine.Vector4[];
         translator.PushUnityEngineVector4(L, array[index]);
         return(true);
     }
     else if (type == typeof(UnityEngine.Color[]))
     {
         UnityEngine.Color[] array = obj as UnityEngine.Color[];
         translator.PushUnityEngineColor(L, array[index]);
         return(true);
     }
     else if (type == typeof(UnityEngine.Quaternion[]))
     {
         UnityEngine.Quaternion[] array = obj as UnityEngine.Quaternion[];
         translator.PushUnityEngineQuaternion(L, array[index]);
         return(true);
     }
     else if (type == typeof(UnityEngine.Ray[]))
     {
         UnityEngine.Ray[] array = obj as UnityEngine.Ray[];
         translator.PushUnityEngineRay(L, array[index]);
         return(true);
     }
     else if (type == typeof(UnityEngine.Bounds[]))
     {
         UnityEngine.Bounds[] array = obj as UnityEngine.Bounds[];
         translator.PushUnityEngineBounds(L, array[index]);
         return(true);
     }
     else if (type == typeof(UnityEngine.Ray2D[]))
     {
         UnityEngine.Ray2D[] array = obj as UnityEngine.Ray2D[];
         translator.PushUnityEngineRay2D(L, array[index]);
         return(true);
     }
     else if (type == typeof(Minecraft.ItemsData.ItemType[]))
     {
         Minecraft.ItemsData.ItemType[] array = obj as Minecraft.ItemsData.ItemType[];
         translator.PushMinecraftItemsDataItemType(L, array[index]);
         return(true);
     }
     else if (type == typeof(Minecraft.BlocksData.BlockFlags[]))
     {
         Minecraft.BlocksData.BlockFlags[] array = obj as Minecraft.BlocksData.BlockFlags[];
         translator.PushMinecraftBlocksDataBlockFlags(L, array[index]);
         return(true);
     }
     else if (type == typeof(Minecraft.BlocksData.BlockType[]))
     {
         Minecraft.BlocksData.BlockType[] array = obj as Minecraft.BlocksData.BlockType[];
         translator.PushMinecraftBlocksDataBlockType(L, array[index]);
         return(true);
     }
     else if (type == typeof(Minecraft.BlocksData.BlockVertexType[]))
     {
         Minecraft.BlocksData.BlockVertexType[] array = obj as Minecraft.BlocksData.BlockVertexType[];
         translator.PushMinecraftBlocksDataBlockVertexType(L, array[index]);
         return(true);
     }
     return(false);
 }