Exemple #1
0
    //This function was added to fix a error with having a button calling InstantLand
    public IEnumerator InstantLandOnStart(float delay)
    {
        yield return(new WaitForSeconds(delay));

        for (int i = 0; i < _thisT.childCount; i++)
        {
            if (_thisT.GetChild(i).GetComponent <LandingSpot>() != null)
            {
                LandingSpot spot = _thisT.GetChild(i).GetComponent <LandingSpot>();
                spot.InstantLand();
            }
        }
    }
    public IEnumerator InstantLand(float delay)
    {
        yield return(new WaitForSeconds(delay));

        for (int i = 0; i < this._thisT.childCount; i++)
        {
            if (this._thisT.GetChild(i).GetComponent <LandingSpot>() != null)
            {
                LandingSpot component = this._thisT.GetChild(i).GetComponent <LandingSpot>();
                component.InstantLand();
            }
        }
        yield break;
    }