Esempio n. 1
0
    public void SendTransmission(List <Symbols> symbols)
    {
        transmissionNumber++;
        Transmission newTransmission = ObjectPooler.Instance.GetPooledObject(ObjectPooler.Pools.Transmission.ToString()).GetComponent <Transmission>();

        newTransmission.Activate(TransmissionSpeed, TransmissionDuration, symbols);
        controller.AddTransmission();

        newTransmission.SetPlanetsToReach(GameManager.Instance.GetUnlockedPlanets());

        GameUI.SetBatteryPercent((float)(GameStats.Instance.NumTransmissionsBeforeEnd - transmissionNumber) / GameStats.Instance.NumTransmissionsBeforeEnd);

        Logger.LogEntry entry = Logger.AddLog(symbols.ToArray());
        newTransmission.SetLogEntry(entry);
        bool endGame = GameStats.Instance.SentTransmission();

        if (endGame)
        {
            newTransmission.EndAfterAllPlanetsReached();
        }
    }