void OnEnable() { //pppp = GameObject.FindGameObjectWithTag ("Player"); if (GameMaster.pppppp == null) { p = GameObject.FindGameObjectWithTag("Player").GetComponent <player1controllerwithjump> (); rb = GameObject.FindGameObjectWithTag("Player").GetComponent <Rigidbody2D> (); c = GameObject.FindGameObjectWithTag("Player").GetComponent <crouch> (); anim = GameObject.FindGameObjectWithTag("Player").GetComponent <Animator> (); } else { p = GameMaster.pppppp.GetComponent <player1controllerwithjump> (); rb = GameMaster.pppppp.GetComponent <Rigidbody2D> (); c = GameMaster.pppppp.GetComponent <crouch> (); anim = GameMaster.pppppp.GetComponent <Animator> (); } starttime = 0f; }
void OnEnable() { //StartCoroutine (Type ()); //can = GameObject.FindGameObjectWithTag ("canvas"); can.SetActive(true); textDisplay = GameObject.FindGameObjectWithTag("textmeshpro").GetComponent <TextMeshProUGUI>(); nameDisplay = GameObject.FindGameObjectWithTag("nametext").GetComponent <TextMeshProUGUI>(); background = GameObject.FindGameObjectWithTag("wordbackground").GetComponent <SpriteRenderer>(); nameground = GameObject.FindGameObjectWithTag("nametext").GetComponent <SpriteRenderer>(); portraitground = GameObject.FindGameObjectWithTag("portrait").GetComponent <SpriteRenderer>(); contin = GameObject.FindGameObjectWithTag("continue"); questionbox = GameObject.FindGameObjectWithTag("questions"); GameMaster.istalking = true; index = -1; didntdothisbefore = true; ppppp = GameObject.FindGameObjectWithTag("Player"); gm = GameObject.FindGameObjectWithTag("GameMaster").GetComponent <GameMaster>(); c = ppppp.GetComponent <crouch> (); }
void Awake() { rb = GetComponent <Rigidbody2D> (); c = GetComponent <crouch> (); }