Exemplo n.º 1
0
    static void OnPowerupCollect(Powerup powerup)
    {
        var colorizer = powerup.GetComponent <Colorizer>();

        if (colorizer != null)
        {
            PowerupColorDisplay.AddColor(colorizer.Color);
        }
    }
Exemplo n.º 2
0
    private void Update()
    {
        if (Input.GetKeyDown(KeyCode.Space))
        {
            if (collector.CollectorEnabled)
            {
                if (collector.HeldPowerups.Count > 0)
                {
                    PowerupColorDisplay.Clear();
                }
                collector.Execute();
            }
            else
            {
                singleCollector.Execute();
            }
        }

        if (Input.GetKeyDown(KeyCode.Escape))
        {
            Application.Quit();
        }
    }
Exemplo n.º 3
0
 private void Awake()
 {
     rectT    = GetComponent <RectTransform>();
     Instance = this;
 }