IEnumerator RespawnStop() { TopDownCharacterMover ScriptPj1 = Player1.GetComponent <TopDownCharacterMover>(); ScriptPj1.CanMove = false; yield return(new WaitForSeconds(Duration)); ScriptPj1.CanMove = true; ActivateMove = false; }
IEnumerator EfecctHermes() { TopDownCharacterMover ScriptPj1 = Player1.GetComponent <TopDownCharacterMover>(); ScriptPj1.WalkSpeed *= VelocityOb; gameObject.transform.localScale = Vector3.zero; //Instantiate(DS_Hermes, transform.position, transform.rotation); yield return(new WaitForSeconds(EffectDuration)); ScriptPj1.WalkSpeed *= VelocityOb; Destroy(gameObject); ActivateMove = false; }
IEnumerator EfecctRayo2() { TopDownCharacterMover ScriptPj1 = Player1.GetComponent <TopDownCharacterMover>(); if (x == 2) { ScriptPj1.CanMove = false; gameObject.transform.localScale = Vector3.zero; ScriptPj1.AnimMov.SetTrigger("InjuredT"); yield return(new WaitForSeconds(EffectDuration)); ScriptPj1.CanMove = true; Destroy(gameObject); ActivateMove2 = false; } }
private void Start() { tp = GameObject.FindGameObjectWithTag("Player1").GetComponent <TopDownCharacterMover>(); }