IEnumerator RespawnStop2() { TopDownCharacterMover2 ScriptPj2 = Player2.GetComponent <TopDownCharacterMover2>(); ScriptPj2.CanMove = false; yield return(new WaitForSeconds(Duration)); ScriptPj2.CanMove = true; ActivateMove2 = false; }
IEnumerator EfecctHermes2() { TopDownCharacterMover2 ScriptPj2 = Player2.GetComponent <TopDownCharacterMover2>(); ScriptPj2.WalkSpeed *= VelocityOb; gameObject.transform.localScale = Vector3.zero; //Instantiate(DS_Hermes, transform.position, transform.rotation); yield return(new WaitForSeconds(EffectDuration)); ScriptPj2.WalkSpeed *= VelocityOb; Destroy(gameObject); ActivateMove2 = false; }
IEnumerator EfecctRayo() { TopDownCharacterMover2 ScriptPj2 = Player2.GetComponent <TopDownCharacterMover2>(); if (x == 1) { ScriptPj2.CanMove = false; gameObject.transform.localScale = Vector3.zero; ScriptPj2.AnimMov.SetTrigger("InjuredT"); yield return(new WaitForSeconds(EffectDuration)); ScriptPj2.CanMove = true; Destroy(gameObject); ActivateMove = false; } }
private void Start() { tp = GameObject.FindGameObjectWithTag("Player2").GetComponent <TopDownCharacterMover2>(); }