コード例 #1
0
        public static void LoadToObject(Component game, ref BuoyancyData data)
        {
            var obj = game.GetComponent <BuoyancyEffector2D>();

            if (obj == null)
            {
                return;
            }
            obj.useColliderMask = data.useColliderMask;
            obj.colliderMask    = data.colliderMask;
            obj.surfaceLevel    = data.surfaceLevel;
            obj.density         = data.density;
            obj.linearDrag      = data.linearDrag;
            obj.angularDrag     = data.angularDrag;
            obj.flowAngle       = data.flowAngle;
            obj.flowMagnitude   = data.flowMagnitude;
            obj.flowVariation   = data.flowVariation;
        }
コード例 #2
0
 public unsafe override void Load(FakeStruct fake)
 {
     data = *(BuoyancyData *)fake.ip;
 }