示例#1
0
 IEnumerator SendToStorage ( TempResourceButton button)
 {
     yield return new WaitForSeconds(timeToMoveToCollected);
     button.transform.SetParent ( storageTransform );
     resourceList.Add(button);
     button.GetComponent<Button>().interactable = true;
     button.myState = TempResourceButton.ResourceState.Collected;
 }
示例#2
0
 public void HandleButtonClick ( TempResourceButton button )
 {
     if ( button.myState == TempResourceButton.ResourceState.Spawned)
     {
         button.GetComponent<Button>().interactable = false;
         spawnedList.Remove(button);
         StartCoroutine(SendToStorage(button));
     }
     else
     {
         currentResource = button;
     }
 }