PlayerAction.SubmitResourceTileSelection C# (CSharp) Méthode

SubmitResourceTileSelection() protected méthode

Submits the resource tile selection.
NOTE: This may need a more sophisticated implementation if e.g., player action changes before server responds.
protected SubmitResourceTileSelection ( ResourceTileSelection, selection ) : void
selection ResourceTileSelection, /// The resource tile selection. ///
Résultat void
	protected void SubmitResourceTileSelection(ResourceTileSelection selection)
	{
		if (selection.Count() == 0) {
			GameGUIManager.use.SetErrorMessage("No tiles selected.");
			return;
		}
		if (isActionInProgress) {
			GameGUIManager.use.PlayInvalidActionSound();
			return;
		}
		
		//Check Resources
		/*
		if (!DoResourceCalculations(selection)) {
			return;
		}*/
		
		// if there is no API point, use the god mode implementation
		if (!hasServerAPIPoint) {
			StartCoroutine(Put(selection));
		}
		// otherwise use the api point on the server
		else {
			StartCoroutine(SubmitResourceTileSelectionToServerAPI(selection));
		}
	}