Beispiel #1
0
        public override async System.Threading.Tasks.Task <object> CreateObject()
        {
            var ptr = CoreObjectBase.NewNativeObjectByNativeName <CPhyContext.NativePointer>("PhyContext");
            var ctx = new CPhyContext(ptr);

            if (await ctx.InitContext() == false)
            {
                return(null);
            }
            return(ctx);
        }
Beispiel #2
0
        public static CPhyMaterial LoadXnd(CPhyContext ctx, IO.XndAttrib attr)
        {
            attr.BeginRead();
            float staticFriction;
            float dynamicFriction;
            float restitution;

            attr.Read(out staticFriction);
            attr.Read(out dynamicFriction);
            attr.Read(out restitution);
            attr.EndRead();
            return(ctx.CreateMaterial(staticFriction, dynamicFriction, restitution));
        }