Exemplo n.º 1
0
        private static IntPtr cs_alloc_array_type(int arg1, hxValueType arg2)
        {
            Array arr;

            switch (arg2)
            {
            case hxValueType.valtBool:
                arr = new Array <bool>(new bool[arg1]);
                break;

            case hxValueType.valtInt:
                arr = new Array <int>(new int[arg1]);
                break;

            case hxValueType.valtFloat:
                arr = new Array <double>(new double[arg1]);
                break;

            case hxValueType.valtString:
                arr = new Array <String>(new String[arg1]);
                break;

            case hxValueType.valtObject:
                arr = new Array <object>(new object[arg1]);
                break;

            default:
                return(IntPtr.Zero);
            }
            return(CSHandleContainer.GetCurrent().CreateGCHandle(arr));
        }
Exemplo n.º 2
0
 private static IntPtr cs_alloc_array_type(int arg1, hxValueType arg2)
 {
     Array arr;
     switch(arg2)
     {
         case hxValueType.valtBool:
             arr = new Array<bool>(new bool[arg1]);
             break;
         case hxValueType.valtInt:
             arr = new Array<int>(new int[arg1]);
             break;
         case hxValueType.valtFloat:
             arr = new Array<double>(new double[arg1]);
             break;
         case hxValueType.valtString:
             arr = new Array<String>(new String[arg1]);
             break;
         case hxValueType.valtObject:
             arr = new Array<object>(new object[arg1]);
             break;
         default:
             return IntPtr.Zero;
     }
     return CSHandleContainer.GetCurrent().CreateGCHandle(arr);
 }