Exemplo n.º 1
0
        /// <summary>
        /// Adds a rigidbody to the world if it doesn't already exist.
        /// </summary>
        /// <param name="_body"></param>
        public void AddRigidBody(ABRigidBody _body)
        {
            if (RigidBodies.Contains(_body))
            {
                Debug.LogWarning("Can't add duplicate rigid body!");
                return;
            }

            RigidBodies.Add(_body);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Removes a rigidbody from the world if it exists.
        /// </summary>
        /// <param name="_body"></param>
        public void RemoveBody(ABRigidBody _body)
        {
            if (RigidBodies.Contains(_body))
            {
                RigidBodies.Remove(_body);
                return;
            }

            Debug.LogWarning("Attempted to remove a body from world that didn't exist.");
        }