示例#1
0
    private void Start()
    {
        targetStats = target.GetCharacterStats();
        targetStats.OnHealthChanged += HandleHealthChanged;

        thumb.sprite = target.GetThumb();
        targetName.SetText(target.GetCharacterName());

        if (isEnemy)
        {
            foreground.color  = redBar[0];
            foreground2.color = redBar[1];
        }
        else
        {
            foreground.color  = greenBar[0];
            foreground2.color = greenBar[1];
        }

        foreground.fillAmount  = 1;
        foreground2.fillAmount = 1;
    }