Ejemplo n.º 1
0
	/// <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;
	}
Ejemplo n.º 2
0
 /// <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);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Release (UnLatch) from the current box.
 /// </summary>
 public void ReleaseBox()
 {
     currentBox = null;
 }
Ejemplo n.º 4
0
	/// <summary>
	/// Release (UnLatch) from the current box.
	/// </summary>
	public void ReleaseBox () {
		currentBox = null;
	}