// Use this for initialization void Start() { done = false; title = GameObject.Find("/Canvas/TitlePanel").GetComponent <RectTransform>(); dialogueEngine = GameObject.Find("/Canvas/DialoguePanel").GetComponent <DialogueBehavior>(); Player_Movement.frozen = true; }
//private Transform groundCheck; // Use this for initialization void Start() { canInteract = false; interactor = null; animator = this.GetComponent <Animator>(); if (GameObject.Find("/Canvas/DialoguePanel")) { dialogueEngine = GameObject.Find("/Canvas/DialoguePanel").GetComponent <DialogueBehavior>(); } talkIndicator = GameObject.Find("Fish/Exclamation"); talkIndicator.GetComponent <Renderer>().enabled = false; }
//private Transform groundCheck; // Use this for initialization void Start() { jump = false; horiz = 0; canInteract = false; interactor = null; animator = this.GetComponent <Animator>(); if (GameObject.Find("/Canvas/DialoguePanel")) { dialogueEngine = GameObject.Find("/Canvas/DialoguePanel").GetComponent <DialogueBehavior>(); } talkIndicator = GameObject.Find("Fish/Exclamation"); talkIndicator.GetComponent <Renderer>().enabled = false; if (SceneManager.GetActiveScene().name == "Beach_Penguin" && !GlobalState.instance.talkedToPenguin) { interactor = GameObject.Find("Penguin"); dialogueEngine.Talk(interactor.GetComponent <Actor>()); } List <string> levels = new List <string>() { "Beach_Penguin", "Beach_Seagull", "Garden", "Desert" }; if (levels.Exists(x => x == SceneManager.GetActiveScene().name)) { if (GlobalState.instance.enterSide == GlobalState.ScreenSide.LEFT) { Vector3 pos = transform.position; pos.x = -20; transform.position = pos; } else if (GlobalState.instance.enterSide == GlobalState.ScreenSide.RIGHT) { Vector3 pos = transform.position; pos.x = 20; transform.position = pos; } } // TODO: Spawn on the correct side based on GlobalState.instance.enterSide }