/// <summary> /// Right click on an object /// </summary> /// <param name="location">The location this occured</param> public void RightClick(LocationStruct location) { if (walkableTiles.Contains(Board.GetTileFromLocation(location))) { currentPath = Board.GetPathToLocation(boardLocation.location, location, stepsLeft); boardLocation.SetLocation(location.row, location.column); stepsLeft -= currentPath.Count; } else if (attackableTiles.Contains(Board.GetTileFromLocation(location))) { TileControl target = Board.GetTileControlFromLocation(location); GameObject targetObject = target.occupyingObject; if (targetObject == null) { return; } targetObject.SendMessage("Damage", Damage, SendMessageOptions.DontRequireReceiver); Debug.Log("Sentmessage"); attacksLeft--; stepsLeft = 0; } SetWalkableTilesHighlight(false); UpdateWalkableObjects(); }