//Is called if nobody takes the powerup
    void NobodyWantsPowerup()
    {
        //Update powerup target will null
        GameControl.instance.UpdatePowerupTarget(null);

        ui.ClearAndHideGetPowerupUI();
        ui.ClearAndHidePowerupUI();
    }
Example #2
0
    //Returns who gets the powerup
    public IEnumerator ChoosePowerupWinner(Powerup powerup)
    {
        //First set winner to null
        winner = null;

        //Choose method to use
        IEnumerator method = ChooseMethod();

        //Update UI with icon and text of method
        UpdateGetUI(powerup, method);

        //Invoke method
        yield return(StartCoroutine(method));

        //After there's a winner, hide the ui
        powerupUI.ClearAndHideGetPowerupUI();

        //return winner
        yield return(winner);
    }