Пример #1
0
    private void TrackSavedSouls(PlanetSoulsMatch match)
    {
        Debug.Log("Received match with souls : " + match.soulsAmount);

        if (!_allPlanets.Contains(match.linkedPlanet))
        {
            Debug.LogError("Could not find linked planet when unloading souls.");
            return;
        }

        match.linkedPlanet.OnSoulsSaved(match.soulsAmount);
    }
Пример #2
0
    private IEnumerator LoadingSouls()
    {
        PlanetSoulsMatch planetSoulsMatch = new PlanetSoulsMatch(0, planetInOrbit);

        while (planetInOrbit.CurrentSouls > 0 && currentCargo < cargoCapacity)
        {
            yield return(new WaitForSeconds(pickupSpeedInSeconds));

            int addedSouls = planetInOrbit.RemoveSoul(1);
            currentCargo += addedSouls;
            planetSoulsMatch.soulsAmount += addedSouls;
        }

        _allSoulsAndPlanets.Add(planetSoulsMatch);
        mM.PickupFinishedNotif(this);
    }