public IEnumerator AfterMath(float waitTime, Vector2 pos, Trap trap) { Debug.Log(trap); yield return(new WaitForSeconds(waitTime)); foreach (GameObject col in trap.GetCollisions()) { col.GetComponent <Charater>().SetGoalPos(pos); } }
public IEnumerator AfterMath(float waitTime, Vector2 pos, Trap trap) { Debug.Log(trap); yield return(new WaitForSeconds(waitTime)); foreach (GameObject col in trap.GetCollisions()) { col.GetComponent <Charater>().SetGoalPos(pos); } }