// Start is called before the first frame update void Start() { pausable = FindObjectOfType <Pauseable>(); playerCamera = FindObjectOfType <CameraController>(); rectTransform = GetComponent <RectTransform>(); rectTransform.anchoredPosition = offScreenPosition; timer = 0.0f; }
IEnumerator matchStart() { AudioSource src = this.gameObject.AddComponent <AudioSource>(); src.clip = getReady; src.Play(); Pauseable.pauseGame(true); yield return(new WaitForSeconds(src.clip.length)); Invoke("endGame", GameTime); }