public float deathLevel; // Sets the Deathlevel of the map // Use this for initialization void Start() { sparken = GameObject.FindGameObjectWithTag("Player"); rocklet = GameObject.Find("Rocklet"); dialogueManager = GameObject.Find("Dialogue").GetComponent <DialogueManager>(); cutsceneDialogue = new CutsceneDialogueScript(); deathLevel = -4; // If the player exited in the middle of the first cutscene, roll it back if (GameControllerScript.gameController.getCutsceneTrigger(0) == 1) { GameControllerScript.gameController.setCutsceneTrigger(0, 0); } // If the player finished the cutscene with the rocklet, set it to hostile if (GameControllerScript.gameController.getCutsceneTrigger(1) == 3) { rocklet.GetComponent <RockletController>().hostile = true; } // If the player has already defeated the Rocklet, don't spawn another. else if (GameControllerScript.gameController.getCutsceneTrigger(1) == 4) { rocklet.SetActive(false); } GameControllerScript.gameController.setDeathLevel(deathLevel); }
public float deathLevel; // sets the deathlevel // Use this for initialization void Start() { sparken = GameObject.FindGameObjectWithTag("Player"); dialogueManager = GameObject.Find("Dialogue").GetComponent <DialogueManager>(); cutsceneDialogue = new CutsceneDialogueScript(); deathLevel = GetComponent <Renderer>().bounds.min.y; GameControllerScript.gameController.setDeathLevel(deathLevel); }
// Use this for initialization void Start() { sparken = GameObject.FindGameObjectWithTag("Player"); rockin = GameObject.Find("Rockin"); dialogueManager = GameObject.Find("Dialogue").GetComponent <DialogueManager>(); cutsceneDialogue = new CutsceneDialogueScript(); stonewallcontrollers = transform.GetComponentsInChildren <StoneWallControllerScript>(); deathLevel = GetComponent <Renderer>().bounds.min.y; GameControllerScript.gameController.setDeathLevel(deathLevel); // Sets the level at which the player dies in the level rockin.GetComponent <RockinControllerScript>().hostile = false; // Sets the Rockin to be unhostile at first if (GameControllerScript.gameController.getCutsceneTrigger(6) == 6) { GameObject.Find("Rockin").SetActive(false); } }