// Start is called before the first frame update void Start() { audioSource = GetComponent <AudioSource>(); starSystemSpawner = FindObjectOfType <StarSystemSpawner>(); MoonText.text = ""; ShotText.text = ""; StartCoroutine(AnimateTitle()); rocket = FindObjectOfType <Rocket>(); InGameUi.SetActive(false); LevelCompleteUI.SetActive(false); TitlePanel.SetActive(true); }
void Start() { mouseController = gameObject.AddComponent <MouseDragRelease>(); starSystemSpawner = FindObjectOfType <StarSystemSpawner>(); mySpriteRenderer = GetComponent <SpriteRenderer>(); myColor = mySpriteRenderer.color; myBody = GetComponent <Rigidbody2D>(); myCollider2D = GetComponent <Collider2D>(); myTrailRender = GetComponent <TrailRenderer>(); animateUi = FindObjectOfType <AnimateUI>(); myTrailRender.autodestruct = false; trailTime = myTrailRender.time; myTrailRender.time = 0; StartCoroutine(InitAttractorList()); }