private new void Start() { base.Start(); manager = GameObject.Find("GameManager").GetComponent <GameManager>(); igmenu = GameObject.Find("IGMenu"); igmenu.SetActive(false); scontinue = GameObject.Find("Continue_script").GetComponent <SelectContinue>(); }
/** * Initializes the player controller by buffering * all needed components */ void Start() { body2D = GetComponent <Rigidbody2D>(); polygonCollider2D = GetComponent <PolygonCollider2D>(); inputController = GetComponent <PlayerInputController>(); Panimator = GetComponentInChildren <PlayerAnimator>(); particleSystem = GetComponentInChildren <ParticleSystem>(); particleSystem.GetComponent <Renderer>().sortingLayerName = "UI"; screenshake = GetComponent <ScreenShake>(); paused = false; playerJustStartedToMove = false; playerJustStoppedToMove = true; musicPlayer = GameObject.Find("MusicPlayer"); StartCoroutine("InvincibleBlinking"); scontinue = GameObject.Find("Continue_script").GetComponent <SelectContinue>(); }