/// <summary> /// Finishes the fire blow. Blow out animation /// </summary> public void FinishFireBlow() { animator.SetTrigger("FireBlowOut"); animator.SetBool("IsFireBlowIn", false); fireScript.Play(); }
/// <summary> /// Finishes the fire blow. Blow out animation /// </summary> public void FinishFireBlow() { animator.SetTrigger("FireBlowOut"); animator.SetBool("IsFireBlowIn", false); // spawn the particle effect ImmutableDataSkill curSkill = DataLoaderSkills.GetFlameAtLevel((int)LevelLogic.Instance.CurrentLevel); string flameResourceString = curSkill.FlameResource; GameObject flamePrefab = Resources.Load(flameResourceString) as GameObject; GameObject flameObject = Instantiate(flamePrefab, new Vector3(0, 0, 0), flamePrefab.transform.rotation) as GameObject; // parent it to the right position flameObject.transform.parent = fireBlowPosition.transform; flameObject.transform.localPosition = new Vector3(0, 0, 0); // actually kick off the effect fireScript = flameObject.GetComponent <FireBlowParticleController>(); fireScript.Play(); }