void UnitClicked(UnitClickedEvent e) { // always clear clickable tiles ClearActiveTiles(); if(e.Unit == transform){ if(curState == UnitState.Waiting){ // nothing? }else if(curState == UnitState.RecievingOrders){ // display order UI orderUI.SetActive(true); // set what can be clicked on CommandsInteractable(false); OrdersInteractable(true); // show the order indicators ShowIndicators(true); }else if(curState == UnitState.DoingOrderOne){ // nothing? }else if(curState == UnitState.ChoosingOrderTwo){ // show orders/start process }else if(curState == UnitState.DoingOrderTwo){ // nothing? } }else{ // different unit was selected, remove UI orderUI.SetActive(false); // hide the indicators ShowIndicators(false); } }
// what to do when a unit is clicked void UnitClicked(UnitClickedEvent e) { }