Exemple #1
0
        public Skeleton CreateAgentSkeleton(
            string skeletonName,
            bool isHumanoid,
            int actionSetIndex,
            string monsterUsageSetName,
            ref AgentVisualsNativeData agentVisualsNativeData)
        {
            byte[] numArray1 = (byte[])null;
            if (skeletonName != null)
            {
                numArray1 = CallbackStringBufferManager.StringBuffer0;
                int bytes = ScriptingInterfaceOfIMBSkeletonExtensions._utf8.GetBytes(skeletonName, 0, skeletonName.Length, numArray1, 0);
                numArray1[bytes] = (byte)0;
            }
            byte[] numArray2 = (byte[])null;
            if (monsterUsageSetName != null)
            {
                numArray2 = CallbackStringBufferManager.StringBuffer1;
                int bytes = ScriptingInterfaceOfIMBSkeletonExtensions._utf8.GetBytes(monsterUsageSetName, 0, monsterUsageSetName.Length, numArray2, 0);
                numArray2[bytes] = (byte)0;
            }
            NativeObjectPointer nativeObjectPointer = ScriptingInterfaceOfIMBSkeletonExtensions.call_CreateAgentSkeletonDelegate(numArray1, isHumanoid, actionSetIndex, numArray2, ref agentVisualsNativeData);
            Skeleton            skeleton            = (Skeleton)null;

            if (nativeObjectPointer.Pointer != UIntPtr.Zero)
            {
                skeleton = new Skeleton(nativeObjectPointer.Pointer);
                LibraryApplicationInterface.IManaged.DecreaseReferenceCount(nativeObjectPointer.Pointer);
            }
            return(skeleton);
        }
        public SceneView GetEditorSceneView()
        {
            NativeObjectPointer nativeObjectPointer = ScriptingInterfaceOfIMBEditor.call_GetEditorSceneViewDelegate();
            SceneView           nativeObjectWrapper = NativeObject.CreateNativeObjectWrapper <SceneView>(nativeObjectPointer);

            if (!(nativeObjectPointer.Pointer != UIntPtr.Zero))
            {
                return(nativeObjectWrapper);
            }
            LibraryApplicationInterface.IManaged.DecreaseReferenceCount(nativeObjectPointer.Pointer);
            return(nativeObjectWrapper);
        }
Exemple #3
0
        public Skeleton CreateWithActionSet(
            ref AgentVisualsNativeData agentVisualsNativeData,
            ref AnimationSystemData animationSystemData)
        {
            NativeObjectPointer nativeObjectPointer = ScriptingInterfaceOfIMBSkeletonExtensions.call_CreateWithActionSetDelegate(ref agentVisualsNativeData, ref animationSystemData);
            Skeleton            skeleton            = (Skeleton)null;

            if (nativeObjectPointer.Pointer != UIntPtr.Zero)
            {
                skeleton = new Skeleton(nativeObjectPointer.Pointer);
                LibraryApplicationInterface.IManaged.DecreaseReferenceCount(nativeObjectPointer.Pointer);
            }
            return(skeleton);
        }
Exemple #4
0
        public Skeleton CreateSimpleSkeleton(string skeletonName)
        {
            byte[] numArray = (byte[])null;
            if (skeletonName != null)
            {
                numArray = CallbackStringBufferManager.StringBuffer0;
                int bytes = ScriptingInterfaceOfIMBSkeletonExtensions._utf8.GetBytes(skeletonName, 0, skeletonName.Length, numArray, 0);
                numArray[bytes] = (byte)0;
            }
            NativeObjectPointer nativeObjectPointer = ScriptingInterfaceOfIMBSkeletonExtensions.call_CreateSimpleSkeletonDelegate(numArray);
            Skeleton            skeleton            = (Skeleton)null;

            if (nativeObjectPointer.Pointer != UIntPtr.Zero)
            {
                skeleton = new Skeleton(nativeObjectPointer.Pointer);
                LibraryApplicationInterface.IManaged.DecreaseReferenceCount(nativeObjectPointer.Pointer);
            }
            return(skeleton);
        }
        public MBAgentVisuals CreateAgentVisuals(
            UIntPtr scenePtr,
            string ownerName,
            Vec3 eyeOffset)
        {
            byte[] numArray = (byte[])null;
            if (ownerName != null)
            {
                numArray = CallbackStringBufferManager.StringBuffer0;
                int bytes = ScriptingInterfaceOfIMBAgentVisuals._utf8.GetBytes(ownerName, 0, ownerName.Length, numArray, 0);
                numArray[bytes] = (byte)0;
            }
            NativeObjectPointer nativeObjectPointer = ScriptingInterfaceOfIMBAgentVisuals.call_CreateAgentVisualsDelegate(scenePtr, numArray, eyeOffset);
            MBAgentVisuals      mbAgentVisuals      = (MBAgentVisuals)null;

            if (nativeObjectPointer.Pointer != UIntPtr.Zero)
            {
                mbAgentVisuals = new MBAgentVisuals(nativeObjectPointer.Pointer);
                LibraryApplicationInterface.IManaged.DecreaseReferenceCount(nativeObjectPointer.Pointer);
            }
            return(mbAgentVisuals);
        }