Beispiel #1
0
	public void Catch(){
		if (mode == IDLE && !inMoveThread &&!isMoving && Mathf.Abs(dir.x+dir.y)==1 ) {
			IntVector2 actionPos = pos + dir;
			List<Character> charList = Map.Seek (actionPos);
			foreach (Character c in charList) {
				// If there's a totem in front of Player
				if (c is Totem) {
					//Debug.Log("Caught");
					caughtTotem = (Totem)c;
					caughtTotem.CaughtByPlayer ();
					SetIdle(false);
					break;
				}
			}
		}
		else if(mode == CATCH && !inMoveThread && !isMoving) {
			//Debug.Log("Dismiss");
			SetIdle(true);
		}
	}