示例#1
0
    private void Awake()
    {
        _label     = GetComponent <TextMeshProUGUI>();
        _textSmack = GetComponent <TextSmack>();

        _originalColor = _label.color;
    }
    void Start()
    {
        _healthBar     = transform.Find("HealthSlider");
        _healthBarText = transform.Find("HealthText").GetComponent <TextMeshPro>();
        _textSmack     = _healthBarText.GetComponent <TextSmack>();

        if (!_healthBar)
        {
            throw new Exception("Healthbar not found");
        }

        _healthBarLoaclScaleX = _healthBar.localScale.x;

        _lastHealth = Enemy.HealthController.Health;
        SetDisplayHealth(_lastHealth);
    }
示例#3
0
 private void Start()
 {
     _textMeshProUGUI = GetComponent <TextMeshProUGUI>();
     _textSmack       = GetComponent <TextSmack>();
 }
示例#4
0
 private void Awake()
 {
     _textSmack = GetComponent <TextSmack>();
 }
示例#5
0
 private void Awake()
 {
     _label            = GetComponent <TextMeshProUGUI>();
     _smack            = GetComponent <TextSmack>();
     _multiSoundPlayer = GetComponent <MultiSoundPlayer>();
 }
示例#6
0
 private void Start()
 {
     //start smack animation on start
     _smack = GetComponent <TextSmack>();
     _smack.Smack();
 }
示例#7
0
 void Start()
 {
     _inventory = Commons.Inventory;
     _textSmack = Text.GetComponent <TextSmack>();
     SetItemImageFill(0);
 }