private int accessKey; //Needed if the user needs to select a tile to clarify //Requests naki handling. Returns false if busy, true if request accepted public bool RequestService(List <Naki> naki, NakiHandler cb, int playerNumber, int handAccessKey) { if (busy) { return(false); } if (naki == null || naki.Count == 0) { //We can handle an empty service request immediately cb(new Naki() { type = NakiType.Nashi }); return(true); } //Set up the call canvas to handle the request callback = cb; calls = naki; //player = naki[0].requestor; playerNum = playerNumber; handAccessKey = accessKey; CallCanvas.gameObject.SetActive(true); SetOptions(); busy = true; return(true); //says that the request has been accepted and will be handled }
//Shuts down the service private void FinalizeService() { PonButton.gameObject.SetActive(false); ChiiButton.gameObject.SetActive(false); KanButton.gameObject.SetActive(false); RonButton.gameObject.SetActive(false); TsumoButton.gameObject.SetActive(false); ContinueButton.gameObject.SetActive(false); CallCanvas.gameObject.SetActive(false); callback = null; //player = null; calls = null; busy = false; }