Пример #1
0
        protected override void OnRegistered()
        {
            base.OnRegistered();

            _controllers = new ControllerContainer(this, _material);

            _materialReplacer = new PhysicMaterialReplacer(transform, _material);
            _warper           = new RigidbodyWarper(_manager, transform, _rigidbody, _material.GraphicalReturnTime);

            _childrenArray = GetComponentsInChildren <Transform>(true);

            _contactMode = ContactMode.NORMAL;
            updateLayer();
        }
Пример #2
0
        protected override void OnUnregistered()
        {
            base.OnUnregistered();

            Assert.IsTrue(UntrackedHandCount == 0);

            // Ditch this object in the layer that doesn't collide with brushes in case they are still embedded.
            _contactMode = ContactMode.SOFT;
            updateLayer();

            _warper.Dispose();
            _warper = null;

            revertRigidbodyState();
        }
Пример #3
0
        protected void updateContactMode()
        {
            ContactMode desiredContactMode = ContactMode.NORMAL;

            if (base.IsBeingGrasped)
            {
                desiredContactMode = ContactMode.GRASPED;
            }

            if (_contactMode != desiredContactMode)
            {
                _contactMode = desiredContactMode;
                updateLayer();
            }

            Assert.IsTrue((_contactMode == ContactMode.GRASPED) == base.IsBeingGrasped);
        }
Пример #4
0
        protected void updateContactMode()
        {
            ContactMode desiredContactMode = ContactMode.NORMAL;

            if (base.IsBeingGrasped)
            {
                desiredContactMode = ContactMode.GRASPED;
            }
            else if (_dislocatedBrushCounter < DISLOCATED_BRUSH_COOLDOWN || (_contactMode != ContactMode.NORMAL && _minHandDistance <= 0.0f))
            {
                desiredContactMode = ContactMode.SOFT;
            }

            if (_contactMode != desiredContactMode)
            {
                _contactMode = desiredContactMode;
                updateLayer();
            }

            Assert.IsTrue((_contactMode == ContactMode.GRASPED) == base.IsBeingGrasped);
        }
Пример #5
0
    protected void updateContactMode() {
      ContactMode desiredContactMode = ContactMode.NORMAL;
      if (base.IsBeingGrasped) {
        desiredContactMode = ContactMode.GRASPED;
      } else if (_dislocatedBrushCounter < DISLOCATED_BRUSH_COOLDOWN || (_contactMode != ContactMode.NORMAL && _minHandDistance <= 0.0f)) {
        desiredContactMode = ContactMode.SOFT;
      }

      if (_contactMode != desiredContactMode) {
        _contactMode = desiredContactMode;
        updateLayer();
      }

      Assert.IsTrue((_contactMode == ContactMode.GRASPED) == base.IsBeingGrasped);
    }
Пример #6
0
    protected override void OnUnregistered() {
      base.OnUnregistered();

      Assert.IsTrue(UntrackedHandCount == 0);

      // Ditch this object in the layer that doesn't collide with brushes in case they are still embedded.
      _contactMode = ContactMode.SOFT;
      updateLayer();

      _warper.Dispose();
      _warper = null;

      revertRigidbodyState();
    }
Пример #7
0
    protected override void OnRegistered() {
      base.OnRegistered();

      _controllers = new ControllerContainer(this, _material);

      _materialReplacer = new PhysicMaterialReplacer(transform, _material);
      _warper = new RigidbodyWarper(_manager, transform, _rigidbody, _material.GraphicalReturnTime);

      _childrenArray = GetComponentsInChildren<Transform>(true);

      _contactMode = ContactMode.NORMAL;
      updateLayer();
    }
Пример #8
0
 public Coordination(string account, string content, string result, BusinessType type, ContactMode mode)
     : this(account, content, result, type, mode, DateTime.Now, OrderRole.Platform)
 {
 }
Пример #9
0
 public Coordination(string account, string content, string result, BusinessType type, ContactMode mode, DateTime time, OrderRole role)
 {
     this.Account   = account;
     this.Content   = content;
     this.Result    = result;
     this.Type      = type;
     this.Mode      = mode;
     this.Time      = time;
     this.OrderRole = role;
 }