// Update is called once per frame protected override void Update() { base.Update(); if(stageManager == null) stageManager = baseScene.GetComponent<SushiShop>(); }
public Food() { //<@-- Customer call to random specific available foods in CanSellGoodsList. sceneManager = GameObject.FindGameObjectWithTag("GameController").GetComponent<SushiShop>(); if (sceneManager.currentCustomer.list_goodsBag.Count > 0) { int r = Random.Range(0, sceneManager.currentCustomer.list_goodsBag.Count); instance = sceneManager.currentCustomer.list_goodsBag[r]; this.name = instance.name; this.price = instance.price; sceneManager.currentCustomer.list_goodsBag.Remove(instance); Debug.Log("list_goodsBag.Count : " + sceneManager.currentCustomer.list_goodsBag.Count); } else { Debug.LogError("CustomerInstance.arr_goodsBag.Length == 0"); } }
// Use this for initialization protected override void Start() { base.Start (); stageManager = baseScene.GetComponent<SushiShop>(); beltMachinePopup_obj.transform.localScale = Vector3.one * 0.4f; beltMachinePopup_obj.SetActiveRecursively(false); scaleUp_hash.Add("scale", Vector3.one); scaleUp_hash.Add("time", 1f); scaleDown_hash.Add("scale", Vector3.one * 0.4f); scaleDown_hash.Add("time", 0.5f); scaleDown_hash.Add("easetype", iTween.EaseType.easeInSine); scaleDown_hash.Add("oncompletetarget", this.gameObject); scaleDown_hash.Add("oncomplete", OnScaleDownComplete); }
protected override void Awake() { base.Awake(); sceneManager = baseScene.GetComponent<SushiShop>(); }
// Use this for initialization protected override void Start() { base.Start(); stageManager = baseScene.GetComponent<SushiShop>(); }
// Use this for initialization void Start() { sceneManager = GameObject.FindGameObjectWithTag("GameController").GetComponent<SushiShop> (); StartCoroutine(RandomCustomerFace()); list_goodsBag = new List<Food>(sceneManager.CanSellGoodLists); // this.GenerateGoodOrder (); }
// Use this for initialization void Start() { Debug.Log("InstantFoodManager : Start"); stageManager = this.GetComponent<SushiShop>(); }
// Use this for initialization protected override void Start() { base.Start(); stageManager = baseScene.GetComponent<SushiShop>(); this.sushiPopup.gameObject.SetActiveRecursively(false); }
// Use this for initialization void Start() { GameObject stage = GameObject.FindGameObjectWithTag ("GameController"); stageManager = stage.GetComponent<SushiShop> (); }