예제 #1
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (_deadBody != null)
         {
             _deadBody.Dispose();
             _deadBody = null;
         }
         if (_gravity != null)
         {
             _gravity.Dispose();
             _gravity = null;
         }
     }
     base.Dispose(disposing);
 }
예제 #2
0
            public AnimationController(GameObject deadObject, TimeSpan delay, float jumpForce)
            {
                _deadObject = deadObject;
                _delay = delay;
                _jumpForce = jumpForce;

                _deadBody = new RigidBody { Object = deadObject };
                _gravity = new Gravity { Object = _deadObject, RigidBody = _deadBody };
            }