Exemplo n.º 1
0
    public bool Absorb(EnergyInfo energy)
    {
        AbsorbedEnergy.Add(energy.Color);

        for (int i = 0; i < ColorSequence.Length; i++)
        {
            if (i == AbsorbedEnergy.Count)
            {
                Debug.Log("Not enough energy yet");
                return(true);
            }

            if (ColorSequence[i] != AbsorbedEnergy[i])
            {
                Debug.Log("Energy signature did not match (expected " + ColorSequence[i] + ", got " + AbsorbedEnergy[i] + ")");
                Empty();
                return(false);
            }
            // Else, accept
            PartDestOpacity[i] = 64 / 255f;
        }

        Debug.Log("Energy sequence is complete!");

        AbsorbedEnergy.Clear();
        Pico.CycleLevels(NextLevel);
        return(true);
    }
Exemplo n.º 2
0
    void Awake()
    {
        Pico.ProjectorTemplate   = ProjectorTemplate;
        Pico.EmitterTemplate     = EmitterTemplate;
        Pico.AccumulatorTemplate = AccumulatorTemplate;
        Pico.ReceiverTemplate    = ReceiverTemplate;
        Pico.EnergyTemplate      = EnergyTemplate;

        Pico.CycleLevels(WorldMap);
    }