// Use this for initialization void Start() { //Find the Text object and close it textBlock = GameObject.Find("Text"); textWall = GameObject.Find("TextBack"); buttons = GameObject.Find("Buttons"); dropdown = GameObject.Find("Dropdown"); closeText(); //get difficulty int diff = GameObject.Find("MetaController").GetComponent <meta_script>().getDifficulty(); //adjust variables based on difficulty lives = (int)(1.5 * diff); startTime = 12 * 3 + (diff * 12); //get Scripts clockScript = GameObject.Find("Clock").GetComponent <clock_movement>(); clockScript.enabled = true; livesHUD = GameObject.Find("lifeText").GetComponent <Text>(); clockScript.currentTime = startTime; updateHUD(); }
public void loseTime(int num) { clock_movement temp = GameObject.Find("Clock").GetComponent <clock_movement>(); temp.addTime(num); if (temp.timeLeft() <= 0) { GameObject.Find("Player").GetComponent <PCtoNPC>().startQuest("no time left"); } }
// Use this for initialization void Start() { //Find the Text object and close it textBlock = GameObject.Find("Text"); closeText(); //get difficulty int diff = GameObject.Find("MetaController").GetComponent<meta_script>().getDifficulty(); //adjust variables based on difficulty lives = (int)(1.5*diff); startTime = 12 * 3 + (diff * 12); //get Scripts clockScript = GameObject.Find("Clock").GetComponent<clock_movement>(); clockScript.enabled = true; livesHUD = GameObject.Find("lifeText").GetComponent<Text>(); updateHUD(); }