示例#1
0
        protected override void Uninitialize(BepuPhysicsSystem system)
        {
            this.Transform.PositionChanged -= OnTransformPositionManuallyChanged;
            this.Transform.RotationChanged -= OnTransformRotationManuallyChanged;

            if (this.physicsEntity != null)
            {
                system.RemoveObject(this.physicsEntity);
            }
        }
示例#2
0
        protected override void Initialize(BepuPhysicsSystem system)
        {
            this.Transform.PositionChanged += OnTransformPositionManuallyChanged;
            this.Transform.RotationChanged += OnTransformRotationManuallyChanged;
            this.Transform.ScaleChanged    += OnTransformScaleManuallyChanged;

            this.system        = system;
            this.PhysicsEntity = InitPhysicsEntity();

            OnTransformPositionManuallyChanged(this.Transform.Position);
            OnTransformRotationManuallyChanged(this.Transform.Rotation);
        }
示例#3
0
 protected override void Initialize(BepuPhysicsSystem system)
 {
     base.Initialize(system);
     this.Transform.ScaleChanged += OnScaleChanged;
 }