Ejemplo n.º 1
0
 void Start()
 {
     menu         = GetComponent <Menu>();
     waiter       = GetComponent <CallForWaiter>();
     audioManager = GetComponent <AudioManager>();
     player       = GameObject.FindWithTag("Player").GetComponent <PlayerController>();
     pause        = GetComponent <PauseM>();
     player.transform.position = defaultPos.position;
     player.transform.rotation = defaultPos.rotation;
     cam = GameObject.FindWithTag("MainCamera").GetComponent <FirstPersonCamera>();
     assessmentPanel.SetActive(false);
     loadPanel.SetActive(false);
     assementText   = assessmentPanel.GetComponentInChildren <Text>();
     moneyText.text = currentCash.ToString("£0.00");
     AddToCurrent(GetMealIndex("Classic Burger"));
     tutPanel.SetActive(false);
     texts = new string[arrayLenth];
     StartCoroutine("Loading");
 }
 void Start() //setting references and defaults
 {
     menu         = GetComponent <Menu>();
     waiter       = GetComponent <CallForWaiter>();
     audioManager = GetComponent <AudioManager>();
     toMainButton.SetActive(false);
     player = GameObject.FindWithTag("Player").GetComponent <PlayerController>();
     player.transform.position = defaultPos.position;
     player.transform.rotation = defaultPos.rotation;
     secCam.transform.position = defaultPos.position;
     secCam.transform.rotation = Quaternion.identity;
     cam = GameObject.FindWithTag("MainCamera").GetComponent <FirstPersonCamera>();
     assessmentPanel.SetActive(false);
     loadPanel.SetActive(false);
     assementText   = assessmentPanel.GetComponentInChildren <Text>();
     moneyText.text = currentCash.ToString("£0.00");
     endOfDayPanel.SetActive(false);
     AddToCurrent(GetMealIndex("Hotdog"));
     AddToCurrent(GetMealIndex("Classic Burger"));
     //AddToCurrent(GetMealIndex("Bacon Cheese Burger"));
     //AddToCurrent(GetMealIndex("Sausage & Egg Bap"));
     //AddToCurrent(GetMealIndex("Sausage, Bacon & Egg Bap"));
     StartCoroutine("Loading");
 }