/// <summary> /// Returns true if the character can latch on to this box. /// </summary> public bool CanLatch(PushablePullableBox newBox) { if ((Input.GetKey (latchKey) || latchKey == KeyCode.None) && currentBox == null || currentBox == newBox) { currentBox = newBox; return true; } return false; }
/// <summary> /// Returns true if the character can latch on to this box. /// </summary> public bool CanLatch(PushablePullableBox newBox) { if ((Input.GetKey(latchKey) || latchKey == KeyCode.None) && currentBox == null || currentBox == newBox) { currentBox = newBox; return(true); } return(false); }
/// <summary> /// Release (UnLatch) from the current box. /// </summary> public void ReleaseBox() { currentBox = null; }
/// <summary> /// Release (UnLatch) from the current box. /// </summary> public void ReleaseBox () { currentBox = null; }