public IEnumerator GetClicked(InGameFirstHand hand) { isClicked = true; handClicked = hand; yield return(new WaitForSeconds(1)); handClicked = null; isClicked = false; }
void Construction() { VRPlayerIndicator player = null; foreach (GameObject plays in GameObject.FindGameObjectsWithTag("Player")) { VRPlayerIndicator ind = plays.GetComponent <VRPlayerIndicator>(); if (ind.GetPlayerNumber() == stat.GetOwner()) { player = ind; } } for (int i = 0; i < buildUI.Length; i++) { if (buildUI[i].CheckClick() && player.GetEther() >= buildCost[i]) { InGameFirstHand hand = buildUI[i].GetHandClicked(); ConstructDummy dumNow = Instantiate(dummy[i], this.transform.position, this.transform.rotation) as ConstructDummy; dumNow.StartDummy(buildUnit[i].GetModel(), buildUnit[i], stat.GetOwner(), buildCost[i]); hand.SelectConstruction(dumNow); buildUI[i].SetClick(false); } } }