예제 #1
0
    public void Heal(int _amount)
    {
        hitable.Heal(_amount);
        audioSource.PlayOneShot(healClip);

        //TODO:effect
    }
예제 #2
0
    IEnumerator HealCoro()
    {
        WaitForSeconds _oneSec  = new WaitForSeconds(0.5f);
        float          _prewait = 1.5f;

        while (_prewait > 0)
        {
            _prewait -= 0.5f;
            yield return(_oneSec);
        }
        while (true)
        {
            Animator _effect = GCManager.Instantiate("Heal Effect", _position: _footPosition).GetComponent <Animator>();
            _effect.Play("heal");
            hitable.Heal(healAmount);
            yield return(_oneSec);
        }
    }