示例#1
0
        public static uint SurfaceObjectCreate(Vector3 position, Quaternion rotation, SM64Surface[] surfaces)
        {
            var surfListHandle = GCHandle.Alloc(surfaces, GCHandleType.Pinned);
            var t = SM64ObjectTransform.FromUnityWorld(position, rotation);

            SM64SurfaceObject surfObj = new SM64SurfaceObject
            {
                transform    = t,
                surfaceCount = (uint)surfaces.Length,
                surfaces     = surfListHandle.AddrOfPinnedObject()
            };

            uint result = sm64_surface_object_create(ref surfObj);

            surfListHandle.Free();

            return(result);
        }
示例#2
0
        public static void SurfaceObjectMove(uint id, Vector3 position, Quaternion rotation)
        {
            var t = SM64ObjectTransform.FromUnityWorld(position, rotation);

            sm64_surface_object_move(id, ref t);
        }
示例#3
0
 static extern void sm64_surface_object_move(uint objectId, ref SM64ObjectTransform transform);