Beispiel #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);
    }
Beispiel #3
0
 private void Start()
 {
     _textMeshProUGUI = GetComponent <TextMeshProUGUI>();
     _textSmack       = GetComponent <TextSmack>();
 }
Beispiel #4
0
 private void Awake()
 {
     _textSmack = GetComponent <TextSmack>();
 }
 private void Awake()
 {
     _label            = GetComponent <TextMeshProUGUI>();
     _smack            = GetComponent <TextSmack>();
     _multiSoundPlayer = GetComponent <MultiSoundPlayer>();
 }
Beispiel #6
0
 private void Start()
 {
     //start smack animation on start
     _smack = GetComponent <TextSmack>();
     _smack.Smack();
 }
Beispiel #7
0
 void Start()
 {
     _inventory = Commons.Inventory;
     _textSmack = Text.GetComponent <TextSmack>();
     SetItemImageFill(0);
 }