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); }
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 }; }