示例#1
0
    void Awake()
    {
        _powerup        = GetComponent <Powerup>();
        _amountCurrent  = 0;
        _amount         = 0;
        AmountText.text = "0";

        Color acolor = Consts.GET_COLOR_BY_ID(_powerup.GetColor());

        Filler.color    = acolor;
        acolor.r        = Mathf.Max(0, acolor.r - 0.6f);
        acolor.g        = Mathf.Max(0, acolor.g - 0.6f);
        acolor.b        = Mathf.Max(0, acolor.b - 0.6f);
        BackImage.color = acolor;
    }