Ejemplo n.º 1
0
    private void BoostFeedback(string boostedString)
    {
        GameObject boost = ObjectPooler.Instance.SpawnObject(_boostParticleTag, null, transform.position, transform.rotation);

        LeanTween.delayedCall(0.5f, () => { ObjectPooler.Instance.ReturnToPool(_boostParticleTag, boost); });
        ParticleBase particles = boost.GetComponent <ParticleBase>();

        switch (boostedString)
        {
        case "HP":
            particles.ChangeColor(_boostHPColor);
            break;

        case "Act":
            particles.ChangeColor(_boostActColor);
            break;

        case "Def":
            particles.ChangeColor(_boostDefColor);
            break;

        default:
            break;
        }
        particles.PlayComponents();
    }
Ejemplo n.º 2
0
 public void SpawnFeedback()
 {
     if (_spawnParticles)
     {
         _spawnParticles.PlayComponents();
     }
     Creature.Died += ClearCreatureState;
 }
Ejemplo n.º 3
0
 private void AttackAnimation()
 {
     LeanTween.move(gameObject, (_startingPosition + (2 * transform.forward)), 0.3f).setEaseInOutBack().setOnComplete(
         () => { LeanTween.move(gameObject, _startingPosition, 0.15f); });
     if (_attackParticles != null)
     {
         _attackParticles.PlayComponents();
     }
 }
    // particles use a switch statement because it'd be less wasteful to have particles active on the player than instantiate prefabs
    void AbilityFeedback()
    {
        switch (EquippedAbility.abilityName)
        {
        case "Radar":
            _radarParticles.PlayComponents();
            break;

        case "Cure":
            _cureParticles.transform.SetParent(CurrentTarget);
            _cureParticles.transform.position = CurrentTarget.position;
            _cureParticles.PlayComponents();
            break;

        case "Fireball":
            _fireParticles.PlayComponents();
            break;
        }
    }