protected override void OnTouchDown() { if (foodInstance == null && food == null) { animatedSprite.Play(); animatedSprite.animationCompleteDelegate = delegate(tk2dAnimatedSprite sprite, int clipId) { foodInstance = Instantiate(Resources.Load("Goods/Hot_greenTea", typeof(GameObject))) as GameObject; foodInstance.transform.position = instancePosition; foodInstance.name = GoodDataStore.FoodMenuList.Hot_greenTea.ToString(); food = foodInstance.GetComponent<GoodsBeh>(); food.costs = stageManager.goodDataStore.FoodDatabase_list[(int)GoodDataStore.FoodMenuList.Hot_greenTea].costs; food._canDragaable = true; food.GoodsBeh_putObjectOnTray_Event = Handle_putObjectOnTrayEvent; food.ObjectsBeh_destroyObj_Event = Handle_destroyObjectEvent; if(MainMenu._HasNewGameEvent) { foodInstance.transform.position += Vector3.back * 7; this.transform.position += Vector3.forward * 7; stageManager.SetActivateTotorObject(false); stageManager.CreateDragGoodsToTrayTutorEvent(); } }; // Play sound effect. baseScene.audioEffect.PlayOnecSound(baseScene.soundEffect_clips[4]); } base.OnTouchDown (); }
protected override void OnTouchDown() { if (instance == null && food == null) { instance = Instantiate(Resources.Load(PATH_OF_INSTANCE_PREFAB, typeof(GameObject))) as GameObject; instance.transform.position = instancePosition; instance.gameObject.name = GoodDataStore.FoodMenuList.Iced_greenTea.ToString(); baseScene.audioEffect.PlayOnecWithOutStop(baseScene.soundEffect_clips[2]); animatedInstance = instance.GetComponent<tk2dAnimatedSprite>(); animatedInstance.Play(); food = instance.GetComponent<GoodsBeh>(); food.offsetPos = Vector3.up * 4; food.costs = stageManager.goodDataStore.FoodDatabase_list[(int)GoodDataStore.FoodMenuList.Iced_greenTea].costs; food.GoodsBeh_putObjectOnTray_Event = Handle_putObjectOnTray_Event; food.ObjectsBeh_destroyObj_Event = Handle_destroyObj_Event; animatedInstance.animationCompleteDelegate = delegate(tk2dAnimatedSprite sprite, int clipId) { food._canDragaable = true; }; } base.OnTouchDown(); }
protected override void OnTouchDown() { base.OnTouchDown (); if(instance == null) { base.animatedSprite.Play(); base.animatedSprite.animationCompleteDelegate = delegate(tk2dAnimatedSprite sprite, int clipId) { animatedSprite.spriteId = 0; instance = Instantiate(Resources.Load("Goods/CaliforniaMaki", typeof(GameObject))) as GameObject; instance.transform.position = instancePosition; instance.name = GoodDataStore.FoodMenuList.California_maki.ToString(); food = instance.GetComponent<GoodsBeh>(); food.costs = stageManager.goodDataStore.FoodDatabase_list[(int)GoodDataStore.FoodMenuList.California_maki].costs; food.originalPosition = instancePosition; food.offsetPos = Vector3.up * 4; food._canDragaable = true; food.GoodsBeh_putObjectOnTray_Event = Handle_putObjectOnTray_Event; food.ObjectsBeh_destroyObj_Event = Handle_destroyObj_Event; }; // Play sound effect. baseScene.audioEffect.PlayOnecWithOutStop(baseScene.soundEffect_clips[3]); } }
protected override void OnTouchDown() { if (soup_instance == null && soup == null) { soup_instance = Instantiate(Resources.Load(PATH_OF_SOUP_INSTANCE, typeof(GameObject))) as GameObject; soup_instance.transform.position = instancePosition; soup_instance.gameObject.name = GoodDataStore.FoodMenuList.Miso_soup.ToString(); animatedInstance = soup_instance.GetComponent<tk2dAnimatedSprite>(); animatedInstance.Play(); soup = soup_instance.GetComponent<GoodsBeh>(); soup.costs = stageManager.goodDataStore.FoodDatabase_list[(int)GoodDataStore.FoodMenuList.Miso_soup].costs; soup.offsetPos = Vector3.up * 4.5f; soup.GoodsBeh_putObjectOnTray_Event = Handle_putObjectOnTray_Event; soup.ObjectsBeh_destroyObj_Event = Handle_destroyObj_Event; animatedInstance.animationCompleteDelegate = delegate(tk2dAnimatedSprite sprite, int clipId) { soup._canDragaable = true; }; // Play sound effect. baseScene.audioEffect.PlayOnecWithOutStop(baseScene.soundEffect_clips[4]); } base.OnTouchDown(); }
void icecreamBeh_putObjectOnTray_Event(object sender, GoodsBeh.PutGoodsToTrayEventArgs e) { GoodsBeh obj = sender as GoodsBeh; if (stageManager.foodTrayBeh.goodsOnTray_List.Contains (obj) == false && stageManager.foodTrayBeh.goodsOnTray_List.Count<FoodTrayBeh.MaxGoodsCapacity) { stageManager.foodTrayBeh.goodsOnTray_List.Add (obj); stageManager.foodTrayBeh.ReCalculatatePositionOfGoods(); //<!-- Setting original position. obj.originalPosition = obj.transform.position; icecreamBeh = null; icecream_Instance = null; } else { Debug.LogWarning("Goods on tray have to max capacity."); obj.transform.position = obj.originalPosition; } }
internal IEnumerator Create_InstantFoodObject() { yield return new WaitForFixedUpdate(); if (SushiShop.NumberOfCansellItem.Contains((int)GoodDataStore.FoodMenuList.Kimji)) { if (kimjiInstance == null && kimji == null) { kimjiInstance = Instantiate(Resources.Load("Goods/Kimji", typeof(GameObject))) as GameObject; kimjiInstance.transform.position = new Vector3(-59.8f, 11, 7); kimjiInstance.name = GoodDataStore.FoodMenuList.Kimji.ToString(); kimji = kimjiInstance.GetComponent<GoodsBeh>(); kimji.costs = stageManager.goodDataStore.FoodDatabase_list[(int)GoodDataStore.FoodMenuList.Kimji].costs; kimji._canDragaable = true; kimji.GoodsBeh_putObjectOnTray_Event = InstantFood_putObjectOnTray_Event; kimji.ObjectsBeh_destroyObj_Event = InstantFood_destroyObj_Event; } } }
protected override void OnTouchDown() { if(icecream_Instance == null) { this.animatedSprite.Play(); animatedSprite.animationCompleteDelegate = delegate(tk2dAnimatedSprite sprite, int clipId) { icecream_Instance = Instantiate(Resources.Load(Icecream_ResourcePath, typeof(GameObject))) as GameObject; icecream_Instance.transform.position = icecreamPos; icecream_Instance.gameObject.name = GoodDataStore.FoodMenuList.GreenTea_icecream.ToString(); icecreamBeh = icecream_Instance.GetComponent<GoodsBeh>(); icecreamBeh.costs = stageManager.goodDataStore.FoodDatabase_list[(int)GoodDataStore.FoodMenuList.GreenTea_icecream].costs; icecreamBeh._canDragaable = true; icecreamBeh.GoodsBeh_putObjectOnTray_Event = icecreamBeh_putObjectOnTray_Event; icecreamBeh.ObjectsBeh_destroyObj_Event = icecreamBeh_destroyObj_Event; }; // Play sound effect. baseScene.audioEffect.PlayOnecWithOutStop(baseScene.soundEffect_clips[1]); } base.OnTouchDown(); }
private void InstantFood_putObjectOnTray_Event(object sender, GoodsBeh.PutGoodsToTrayEventArgs e) { GoodsBeh obj = sender as GoodsBeh; if (stageManager.foodTrayBeh.goodsOnTray_List.Contains(obj) == false && stageManager.foodTrayBeh.goodsOnTray_List.Count < FoodTrayBeh.MaxGoodsCapacity) { stageManager.foodTrayBeh.goodsOnTray_List.Add(obj); stageManager.foodTrayBeh.ReCalculatatePositionOfGoods(); if(e.foodInstance.name == kimjiInstance.name) { kimji = null; kimjiInstance = null; } StartCoroutine_Auto(this.Create_InstantFoodObject()); } else { Debug.LogWarning("Goods on tray have to max capacity."); obj.transform.position = obj.originalPosition; } }
internal void HandleOnInput(ref string nameInput) { if(nameInput == string.Empty) return; if (nameInput == this.name) { if(foodInstance == null) this.ActiveBeltMachinePopup(); else return; } else if (nameInput == Ramen_UI) { this.DeActiveBeltMachinePopup(); string foodName = GoodDataStore.FoodMenuList.Ramen.ToString(); foodInstance = Instantiate(Resources.Load(PATH_OF_INSTANT_FOOD, typeof(GameObject))) as GameObject; foodInstance.transform.position = ramen_transform.position + Vector3.back; foodInstance.name = foodName; food = foodInstance.GetComponent<GoodsBeh>(); food.costs = stageManager.goodDataStore.FoodDatabase_list[(int)GoodDataStore.FoodMenuList.Ramen].costs; food.sprite.spriteId = food.sprite.GetSpriteIdByName(foodName); food._canDragaable = true; food.GoodsBeh_putObjectOnTray_Event = food_putObjectOnTray_Event; food.ObjectsBeh_destroyObj_Event = food_destroyObj_Event; } else if (nameInput == CurryWithRice_UI) { this.DeActiveBeltMachinePopup(); string foodName = GoodDataStore.FoodMenuList.Curry_with_rice.ToString(); foodInstance = Instantiate(Resources.Load(PATH_OF_INSTANT_FOOD, typeof(GameObject))) as GameObject; foodInstance.transform.position = curryWithRice_transform.position + Vector3.back; foodInstance.name = foodName; food = foodInstance.GetComponent<GoodsBeh>(); food.costs = stageManager.goodDataStore.FoodDatabase_list[(int)GoodDataStore.FoodMenuList.Curry_with_rice].costs; food.sprite.spriteId = food.sprite.GetSpriteIdByName(foodName); food._canDragaable = true; food.GoodsBeh_putObjectOnTray_Event = food_putObjectOnTray_Event; food.ObjectsBeh_destroyObj_Event = food_destroyObj_Event; } else if (nameInput == Tempura_UI) { this.DeActiveBeltMachinePopup(); string foodName = GoodDataStore.FoodMenuList.Tempura.ToString(); foodInstance = Instantiate(Resources.Load(PATH_OF_INSTANT_FOOD, typeof(GameObject))) as GameObject; foodInstance.transform.position = tempura_transform.position + Vector3.back; foodInstance.name = foodName; food = foodInstance.GetComponent<GoodsBeh>(); food.costs = stageManager.goodDataStore.FoodDatabase_list[(int)GoodDataStore.FoodMenuList.Tempura].costs; food.sprite.spriteId = food.sprite.GetSpriteIdByName(foodName); food._canDragaable = true; food.GoodsBeh_putObjectOnTray_Event = food_putObjectOnTray_Event; food.ObjectsBeh_destroyObj_Event = food_destroyObj_Event; } else if (nameInput == YakiSoba_UI) { this.DeActiveBeltMachinePopup(); string foodName = GoodDataStore.FoodMenuList.Yaki_soba.ToString(); foodInstance = Instantiate(Resources.Load(PATH_OF_INSTANT_FOOD, typeof(GameObject))) as GameObject; foodInstance.transform.position = yakisoba_transform.position + Vector3.back; foodInstance.name = foodName; food = foodInstance.GetComponent<GoodsBeh>(); food.costs = stageManager.goodDataStore.FoodDatabase_list[(int)GoodDataStore.FoodMenuList.Yaki_soba].costs; food.sprite.spriteId = food.sprite.GetSpriteIdByName(foodName); food._canDragaable = true; food.GoodsBeh_putObjectOnTray_Event = food_putObjectOnTray_Event; food.ObjectsBeh_destroyObj_Event = food_destroyObj_Event; } else if (nameInput == ZaruSoba_UI) { this.DeActiveBeltMachinePopup(); string foodName = GoodDataStore.FoodMenuList.Zaru_soba.ToString(); foodInstance = Instantiate(Resources.Load(PATH_OF_INSTANT_FOOD, typeof(GameObject))) as GameObject; foodInstance.transform.position = zarusoba_transform.position + Vector3.back; foodInstance.name = foodName; food = foodInstance.GetComponent<GoodsBeh>(); food.costs = stageManager.goodDataStore.FoodDatabase_list[(int)GoodDataStore.FoodMenuList.Zaru_soba].costs; food.sprite.spriteId = food.sprite.GetSpriteIdByName(foodName); food._canDragaable = true; food.GoodsBeh_putObjectOnTray_Event = food_putObjectOnTray_Event; food.ObjectsBeh_destroyObj_Event = food_destroyObj_Event; } }
// Update is called once per frame // new void Update () { } private void Handle_SushiBeh_putObjectOnTray_Event(object sender, EventArgs e) { GoodsBeh obj = sender as GoodsBeh; if (stageManager.foodTrayBeh.goodsOnTray_List.Contains(obj) == false && stageManager.foodTrayBeh.goodsOnTray_List.Count < FoodTrayBeh.MaxGoodsCapacity) { stageManager.foodTrayBeh.goodsOnTray_List.Add(obj); stageManager.foodTrayBeh.ReCalculatatePositionOfGoods(); sushi = null; this.currentProductionState = ProductionState.None; } else { Debug.LogWarning("Goods on tray have to max capacity."); obj.transform.position = obj.originalPosition; } }
public void OnInput(ref string nameInput) { if(nameInput == SushiIngredientTray) { this.InitializeSushiPopupWindows(); } else if(nameInput == ClosePopup) { this.sushiPopup.gameObject.SetActiveRecursively(false); } else if(nameInput == BucketOfRice) { if(sushiRice == null && sushi_rice_solution == null && sushi == null) { stageManager.choppingBlock_sprite.spriteId = stageManager.choppingBlock_sprite.GetSpriteIdByName("choppingBlock"); this.currentProductionState = ProductionState.CreateSushiRice; sushi_rice_solution = Instantiate(Resources.Load("FoodSolution/" + Sushi_rice_anim, typeof(GameObject))) as GameObject; sushi_rice_solution.transform.position = new Vector3(0, -25, -2); tk2dAnimatedSprite sushi_rice_anim = sushi_rice_solution.GetComponent<tk2dAnimatedSprite>(); sushi_rice_anim.animationCompleteDelegate = delegate(tk2dAnimatedSprite sprite, int clipId) { Destroy(sushi_rice_solution); GameObject sushiRiceInstance = Instantiate(Resources.Load("FoodSolution/Sushi_rice", typeof(GameObject))) as GameObject; sushiRiceInstance.transform.position = sushiRice_Pos; sushiRice = sushiRiceInstance.GetComponent<ObjectsBeh>(); sushiRice._canDragaable = true; sushiRice.originalPosition = sushiRice_Pos; sushiRice.ObjectsBeh_destroyObj_Event = delegate(object sender, System.EventArgs e) { Destroy(sushiRice.gameObject); this.currentProductionState = ProductionState.None; Mz_StorageManage.AvailableMoney -= 1; stageManager.CreateDeductionsCoin(1); stageManager.ReFreshAvailableMoney(); }; this.currentProductionState = ProductionState.WaitForSushiIngredient; }; // Play sound effect. baseScene.audioEffect.PlayOnecSound(baseScene.soundEffect_clips[3]); } } else if(nameInput == Alga) { if(this.currentProductionState == ProductionState.None) { this.currentProductionState = ProductionState.WaitForMakiIngredient; stageManager.choppingBlock_sprite.spriteId = stageManager.choppingBlock_sprite.GetSpriteIdByName("choppingBlock_maki"); } } else if(nameInput == Pickles) { if(this.currentProductionState == ProductionState.WaitForMakiIngredient) { if(sushi_rice_solution == null && sushi == null) { sushi_rice_solution = Instantiate(Resources.Load("FoodSolution/" + "PicklingCucumberFilledMaki_anim", typeof(GameObject))) as GameObject; sushi_rice_solution.transform.position = stageManager.choppingBlock_sprite.transform.position; stageManager.choppingBlock_sprite.gameObject.active = false; tk2dAnimatedSprite new_maki_anim = sushi_rice_solution.GetComponent<tk2dAnimatedSprite>(); new_maki_anim.animationCompleteDelegate = delegate(tk2dAnimatedSprite sprite, int clipId) { Destroy(sushi_rice_solution); stageManager.choppingBlock_sprite.gameObject.active = true; stageManager.choppingBlock_sprite.spriteId = stageManager.choppingBlock_sprite.GetSpriteIdByName("choppingBlock"); GameObject maki_product_obj = Instantiate(Resources.Load(PATH_OF_Sushi_product, typeof(GameObject))) as GameObject; maki_product_obj.transform.position = new Vector3(0, -44, -2); maki_product_obj.name = GoodDataStore.FoodMenuList.Pickling_cucumber_filled_maki.ToString(); sushi = maki_product_obj.GetComponent<GoodsBeh>(); sushi.costs = stageManager.goodDataStore.FoodDatabase_list[(int)GoodDataStore.FoodMenuList.Pickling_cucumber_filled_maki].costs; sushi._canDragaable = true; sushi.sprite.spriteId = sushi.sprite.GetSpriteIdByName(GoodDataStore.FoodMenuList.Pickling_cucumber_filled_maki.ToString()); sushi.GoodsBeh_putObjectOnTray_Event = Handle_SushiBeh_putObjectOnTray_Event; sushi.ObjectsBeh_destroyObj_Event = Handle_SushiBeh_destroyObj_Event; this.currentProductionState = ProductionState.CompleteProduction; }; // Play sound effect. baseScene.audioEffect.PlayOnecSound(baseScene.soundEffect_clips[6]); } } else { stageManager.WarningPlayerToSeeManual(); } } else if(nameInput == FlyingFishRoe) { if(this.currentProductionState == ProductionState.WaitForMakiIngredient) { if (sushi_rice_solution == null && sushi == null) { sushi_rice_solution = Instantiate(Resources.Load("FoodSolution/" + "PrawnBrownMaki_anim", typeof(GameObject))) as GameObject; sushi_rice_solution.transform.position = stageManager.choppingBlock_sprite.transform.position; stageManager.choppingBlock_sprite.gameObject.active = false; tk2dAnimatedSprite new_maki_anim = sushi_rice_solution.GetComponent<tk2dAnimatedSprite>(); new_maki_anim.animationCompleteDelegate = delegate(tk2dAnimatedSprite sprite, int clipId) { Destroy(sushi_rice_solution); stageManager.choppingBlock_sprite.gameObject.active = true; stageManager.choppingBlock_sprite.spriteId = stageManager.choppingBlock_sprite.GetSpriteIdByName("choppingBlock"); GameObject maki_product_obj = Instantiate(Resources.Load(PATH_OF_Sushi_product, typeof(GameObject))) as GameObject; maki_product_obj.transform.position = new Vector3(0, -44, -2); maki_product_obj.name = GoodDataStore.FoodMenuList.Prawn_brown_maki.ToString(); sushi = maki_product_obj.GetComponent<GoodsBeh>(); sushi.costs = stageManager.goodDataStore.FoodDatabase_list[(int)GoodDataStore.FoodMenuList.Prawn_brown_maki].costs; sushi._canDragaable = true; sushi.sprite.spriteId = sushi.sprite.GetSpriteIdByName(GoodDataStore.FoodMenuList.Prawn_brown_maki.ToString()); sushi.GoodsBeh_putObjectOnTray_Event = Handle_SushiBeh_putObjectOnTray_Event; sushi.ObjectsBeh_destroyObj_Event = Handle_SushiBeh_destroyObj_Event; this.currentProductionState = ProductionState.CompleteProduction; }; // Play sound effect. baseScene.audioEffect.PlayOnecSound(baseScene.soundEffect_clips[6]); } } else { stageManager.WarningPlayerToSeeManual(); } } else if(nameInput == Roe) { if (this.currentProductionState == ProductionState.WaitForMakiIngredient) { if (sushi_rice_solution == null && sushi == null) { sushi_rice_solution = Instantiate(Resources.Load("FoodSolution/" + "RoeMaki_anim", typeof(GameObject))) as GameObject; sushi_rice_solution.transform.position = stageManager.choppingBlock_sprite.transform.position; stageManager.choppingBlock_sprite.gameObject.active = false; tk2dAnimatedSprite new_maki_anim = sushi_rice_solution.GetComponent<tk2dAnimatedSprite>(); new_maki_anim.animationCompleteDelegate = delegate(tk2dAnimatedSprite sprite, int clipId) { Destroy(sushi_rice_solution); stageManager.choppingBlock_sprite.gameObject.active = true; stageManager.choppingBlock_sprite.spriteId = stageManager.choppingBlock_sprite.GetSpriteIdByName("choppingBlock"); GameObject maki_product_obj = Instantiate(Resources.Load(PATH_OF_Sushi_product, typeof(GameObject))) as GameObject; maki_product_obj.transform.position = new Vector3(0, -44, -2); maki_product_obj.name = GoodDataStore.FoodMenuList.Roe_maki.ToString(); sushi = maki_product_obj.GetComponent<GoodsBeh>(); sushi.costs = stageManager.goodDataStore.FoodDatabase_list[(int)GoodDataStore.FoodMenuList.Roe_maki].costs; sushi._canDragaable = true; sushi.sprite.spriteId = sushi.sprite.GetSpriteIdByName(GoodDataStore.FoodMenuList.Roe_maki.ToString()); sushi.GoodsBeh_putObjectOnTray_Event = Handle_SushiBeh_putObjectOnTray_Event; sushi.ObjectsBeh_destroyObj_Event = Handle_SushiBeh_destroyObj_Event; this.currentProductionState = ProductionState.CompleteProduction; }; // Play sound effect. baseScene.audioEffect.PlayOnecSound(baseScene.soundEffect_clips[6]); } } else { stageManager.WarningPlayerToSeeManual(); } } if(nameInput == Crab_sushi_face) { #region <!-- Crab_sushi_face. if (this.currentProductionState == ProductionState.WaitForSushiIngredient) { if (sushi_rice_solution == null && sushi == null) { this.currentProductionState = ProductionState.CompleteProduction; this.sushiPopup.gameObject.SetActiveRecursively(false); Destroy(sushiRice.gameObject); sushi_rice_solution = Instantiate(Resources.Load("FoodSolution/" + CrabSushi_anim, typeof(GameObject))) as GameObject; sushi_rice_solution.transform.position = new Vector3(0, -25, -2); tk2dAnimatedSprite sushi_rice_anim = sushi_rice_solution.GetComponent<tk2dAnimatedSprite>(); sushi_rice_anim.animationCompleteDelegate = delegate(tk2dAnimatedSprite sprite, int clipId) { Destroy(sushi_rice_solution); GameObject sushi_product_obj = Instantiate(Resources.Load(PATH_OF_Sushi_product, typeof(GameObject))) as GameObject; sushi_product_obj.transform.position = new Vector3(0, -44, -2); sushi_product_obj.name = GoodDataStore.FoodMenuList.Crab_sushi.ToString(); sushi = sushi_product_obj.GetComponent<GoodsBeh>(); sushi.costs = stageManager.goodDataStore.FoodDatabase_list[(int)GoodDataStore.FoodMenuList.Crab_sushi].costs; sushi._canDragaable = true; sushi.sprite.spriteId = sushi.sprite.GetSpriteIdByName(GoodDataStore.FoodMenuList.Crab_sushi.ToString()); sushi.GoodsBeh_putObjectOnTray_Event = Handle_SushiBeh_putObjectOnTray_Event; sushi.ObjectsBeh_destroyObj_Event = Handle_SushiBeh_destroyObj_Event; }; // Play sound effect. baseScene.audioEffect.PlayOnecSound(baseScene.soundEffect_clips[3]); } } else { stageManager.WarningPlayerToSeeManual(); this.sushiPopup.SetActiveRecursively(false); } #endregion } else if(nameInput == Eel_sushi_face) { #region <!-- Eel_sushi_face. if (this.currentProductionState == ProductionState.WaitForSushiIngredient) { if(sushi_rice_solution == null && sushi == null) { this.currentProductionState = ProductionState.CompleteProduction; this.sushiPopup.gameObject.SetActiveRecursively(false); Destroy(sushiRice.gameObject); sushi_rice_solution = Instantiate(Resources.Load("FoodSolution/" + Eel_sushi_anim, typeof(GameObject))) as GameObject; sushi_rice_solution.transform.position = new Vector3(0, -25, -2); tk2dAnimatedSprite sushi_rice_anim = sushi_rice_solution.GetComponent<tk2dAnimatedSprite>(); sushi_rice_anim.animationCompleteDelegate = delegate(tk2dAnimatedSprite sprite, int clipId) { Destroy(sushi_rice_solution); GameObject sushi_product_obj = Instantiate(Resources.Load(PATH_OF_Sushi_product, typeof(GameObject))) as GameObject; sushi_product_obj.transform.position = new Vector3(0, -44, -2); sushi_product_obj.name = GoodDataStore.FoodMenuList.Eel_sushi.ToString(); sushi = sushi_product_obj.GetComponent<GoodsBeh>(); sushi.costs = stageManager.goodDataStore.FoodDatabase_list[(int)GoodDataStore.FoodMenuList.Eel_sushi].costs; sushi._canDragaable = true; sushi.sprite.spriteId = sushi.sprite.GetSpriteIdByName(GoodDataStore.FoodMenuList.Eel_sushi.ToString()); sushi.GoodsBeh_putObjectOnTray_Event = Handle_SushiBeh_putObjectOnTray_Event; sushi.ObjectsBeh_destroyObj_Event = Handle_SushiBeh_destroyObj_Event; }; // Play sound effect. baseScene.audioEffect.PlayOnecSound(baseScene.soundEffect_clips[3]); } } else { stageManager.WarningPlayerToSeeManual(); this.sushiPopup.SetActiveRecursively(false); } #endregion } else if (nameInput == Fatty_tuna_sushi_face) { #region <!-- Fatty_tuna_sushi_face. if (this.currentProductionState == ProductionState.WaitForSushiIngredient) { if (sushi_rice_solution == null && sushi == null) { this.currentProductionState = ProductionState.CompleteProduction; this.sushiPopup.gameObject.SetActiveRecursively(false); Destroy(sushiRice.gameObject); sushi_rice_solution = Instantiate(Resources.Load("FoodSolution/" + Fatty_tuna_anim, typeof(GameObject))) as GameObject; sushi_rice_solution.transform.position = new Vector3(0, -25, -2); tk2dAnimatedSprite sushi_rice_anim = sushi_rice_solution.GetComponent<tk2dAnimatedSprite>(); sushi_rice_anim.animationCompleteDelegate = delegate(tk2dAnimatedSprite sprite, int clipId) { Destroy(sushi_rice_solution); GameObject sushi_product_obj = Instantiate(Resources.Load(PATH_OF_Sushi_product, typeof(GameObject))) as GameObject; sushi_product_obj.transform.position = new Vector3(0, -44, -2); sushi_product_obj.name = GoodDataStore.FoodMenuList.Fatty_tuna_sushi.ToString(); sushi = sushi_product_obj.GetComponent<GoodsBeh>(); sushi.costs = stageManager.goodDataStore.FoodDatabase_list[(int)GoodDataStore.FoodMenuList.Fatty_tuna_sushi].costs; sushi._canDragaable = true; sushi.sprite.spriteId = sushi.sprite.GetSpriteIdByName(GoodDataStore.FoodMenuList.Fatty_tuna_sushi.ToString()); sushi.GoodsBeh_putObjectOnTray_Event = Handle_SushiBeh_putObjectOnTray_Event; sushi.ObjectsBeh_destroyObj_Event = Handle_SushiBeh_destroyObj_Event; }; // Play sound effect. baseScene.audioEffect.PlayOnecSound(baseScene.soundEffect_clips[3]); } } else { stageManager.WarningPlayerToSeeManual(); this.sushiPopup.SetActiveRecursively(false); } #endregion } else if (nameInput == Octopus_sushi_face) { #region <!-- Octopus_sushi_face. if (this.currentProductionState == ProductionState.WaitForSushiIngredient) { if (sushi_rice_solution == null && sushi == null) { this.currentProductionState = ProductionState.CompleteProduction; this.sushiPopup.gameObject.SetActiveRecursively(false); Destroy(sushiRice.gameObject); sushi_rice_solution = Instantiate(Resources.Load("FoodSolution/" + Octopus_sushi_anim, typeof(GameObject))) as GameObject; sushi_rice_solution.transform.position = new Vector3(0, -25, -2); tk2dAnimatedSprite sushi_rice_anim = sushi_rice_solution.GetComponent<tk2dAnimatedSprite>(); sushi_rice_anim.animationCompleteDelegate = delegate(tk2dAnimatedSprite sprite, int clipId) { Destroy(sushi_rice_solution); GameObject sushi_product_obj = Instantiate(Resources.Load(PATH_OF_Sushi_product, typeof(GameObject))) as GameObject; sushi_product_obj.transform.position = new Vector3(0, -44, -2); sushi_product_obj.name = GoodDataStore.FoodMenuList.Octopus_sushi.ToString(); sushi = sushi_product_obj.GetComponent<GoodsBeh>(); sushi.costs = stageManager.goodDataStore.FoodDatabase_list[(int)GoodDataStore.FoodMenuList.Octopus_sushi].costs; sushi._canDragaable = true; sushi.sprite.spriteId = sushi.sprite.GetSpriteIdByName(GoodDataStore.FoodMenuList.Octopus_sushi.ToString()); sushi.GoodsBeh_putObjectOnTray_Event = Handle_SushiBeh_putObjectOnTray_Event; sushi.ObjectsBeh_destroyObj_Event = Handle_SushiBeh_destroyObj_Event; }; // Play sound effect. baseScene.audioEffect.PlayOnecSound(baseScene.soundEffect_clips[3]); } } else { stageManager.WarningPlayerToSeeManual(); this.sushiPopup.SetActiveRecursively(false); } #endregion } else if (nameInput == Prawn_sushi_face) { #region <!-- Prawn_sushi_face. if (this.currentProductionState == ProductionState.WaitForSushiIngredient) { if (sushi_rice_solution == null && sushi == null) { this.currentProductionState = ProductionState.CompleteProduction; this.sushiPopup.gameObject.SetActiveRecursively(false); Destroy(sushiRice.gameObject); sushi_rice_solution = Instantiate(Resources.Load("FoodSolution/" + Prawn_sushi_anim, typeof(GameObject))) as GameObject; sushi_rice_solution.transform.position = new Vector3(0, -25, -2); tk2dAnimatedSprite sushi_rice_anim = sushi_rice_solution.GetComponent<tk2dAnimatedSprite>(); sushi_rice_anim.animationCompleteDelegate = delegate(tk2dAnimatedSprite sprite, int clipId) { Destroy(sushi_rice_solution); GameObject sushi_product_obj = Instantiate(Resources.Load(PATH_OF_Sushi_product, typeof(GameObject))) as GameObject; sushi_product_obj.transform.position = new Vector3(0, -44, -2); sushi_product_obj.name = GoodDataStore.FoodMenuList.Prawn_sushi.ToString(); sushi = sushi_product_obj.GetComponent<GoodsBeh>(); sushi.costs = stageManager.goodDataStore.FoodDatabase_list[(int)GoodDataStore.FoodMenuList.Prawn_sushi].costs; sushi._canDragaable = true; sushi.sprite.spriteId = sushi.sprite.GetSpriteIdByName(GoodDataStore.FoodMenuList.Prawn_sushi.ToString()); sushi.GoodsBeh_putObjectOnTray_Event = Handle_SushiBeh_putObjectOnTray_Event; sushi.ObjectsBeh_destroyObj_Event = Handle_SushiBeh_destroyObj_Event; }; // Play sound effect. baseScene.audioEffect.PlayOnecSound(baseScene.soundEffect_clips[3]); } } else { stageManager.WarningPlayerToSeeManual(); this.sushiPopup.SetActiveRecursively(false); } #endregion } else if (nameInput == Salmon_sushi_face) { #region <!-- Salmon_sushi_face. if (this.currentProductionState == ProductionState.WaitForSushiIngredient) { if (sushi_rice_solution == null && sushi == null) { this.currentProductionState = ProductionState.CompleteProduction; this.sushiPopup.gameObject.SetActiveRecursively(false); Destroy(sushiRice.gameObject); sushi_rice_solution = Instantiate(Resources.Load("FoodSolution/" + Salmon_sushi_anim, typeof(GameObject))) as GameObject; sushi_rice_solution.transform.position = new Vector3(0, -25, -2); tk2dAnimatedSprite sushi_rice_anim = sushi_rice_solution.GetComponent<tk2dAnimatedSprite>(); sushi_rice_anim.animationCompleteDelegate = delegate(tk2dAnimatedSprite sprite, int clipId) { Destroy(sushi_rice_solution); GameObject sushi_product_obj = Instantiate(Resources.Load(PATH_OF_Sushi_product, typeof(GameObject))) as GameObject; sushi_product_obj.transform.position = new Vector3(0, -44, -2); sushi_product_obj.name = GoodDataStore.FoodMenuList.Salmon_sushi.ToString(); sushi = sushi_product_obj.GetComponent<GoodsBeh>(); sushi.costs = stageManager.goodDataStore.FoodDatabase_list[(int)GoodDataStore.FoodMenuList.Salmon_sushi].costs; sushi._canDragaable = true; sushi.sprite.spriteId = sushi.sprite.GetSpriteIdByName(GoodDataStore.FoodMenuList.Salmon_sushi.ToString()); sushi.GoodsBeh_putObjectOnTray_Event = Handle_SushiBeh_putObjectOnTray_Event; sushi.ObjectsBeh_destroyObj_Event = Handle_SushiBeh_destroyObj_Event; }; // Play sound effect. baseScene.audioEffect.PlayOnecSound(baseScene.soundEffect_clips[3]); } } else { stageManager.WarningPlayerToSeeManual(); this.sushiPopup.SetActiveRecursively(false); } #endregion } else if (nameInput == Skipjack_tuna_sushi_face) { #region <!-- Skipjack_tuna_sushi_face. if (this.currentProductionState == ProductionState.WaitForSushiIngredient) { if (sushi_rice_solution == null && sushi == null) { this.currentProductionState = ProductionState.CompleteProduction; this.sushiPopup.gameObject.SetActiveRecursively(false); Destroy(sushiRice.gameObject); sushi_rice_solution = Instantiate(Resources.Load("FoodSolution/" + Skipjack_tuna_sushi_anim, typeof(GameObject))) as GameObject; sushi_rice_solution.transform.position = new Vector3(0, -25, -2); tk2dAnimatedSprite sushi_rice_anim = sushi_rice_solution.GetComponent<tk2dAnimatedSprite>(); sushi_rice_anim.animationCompleteDelegate = delegate(tk2dAnimatedSprite sprite, int clipId) { Destroy(sushi_rice_solution); GameObject sushi_product_obj = Instantiate(Resources.Load(PATH_OF_Sushi_product, typeof(GameObject))) as GameObject; sushi_product_obj.transform.position = new Vector3(0, -44, -2); sushi_product_obj.name = GoodDataStore.FoodMenuList.Skipjack_tuna_sushi.ToString(); sushi = sushi_product_obj.GetComponent<GoodsBeh>(); sushi.costs = stageManager.goodDataStore.FoodDatabase_list[(int)GoodDataStore.FoodMenuList.Skipjack_tuna_sushi].costs; sushi._canDragaable = true; sushi.sprite.spriteId = sushi.sprite.GetSpriteIdByName(GoodDataStore.FoodMenuList.Skipjack_tuna_sushi.ToString()); sushi.GoodsBeh_putObjectOnTray_Event = Handle_SushiBeh_putObjectOnTray_Event; sushi.ObjectsBeh_destroyObj_Event = Handle_SushiBeh_destroyObj_Event; }; // Play sound effect. baseScene.audioEffect.PlayOnecSound(baseScene.soundEffect_clips[3]); } } else { stageManager.WarningPlayerToSeeManual(); this.sushiPopup.SetActiveRecursively(false); } #endregion } else if (nameInput == Spicy_shell_sushi_face) { #region <!-- Spicy_shell_sushi_face. if (this.currentProductionState == ProductionState.WaitForSushiIngredient) { if (sushi_rice_solution == null && sushi == null) { this.currentProductionState = ProductionState.CompleteProduction; this.sushiPopup.gameObject.SetActiveRecursively(false); Destroy(sushiRice.gameObject); sushi_rice_solution = Instantiate(Resources.Load("FoodSolution/" + Spicy_shell_sushi_anim, typeof(GameObject))) as GameObject; sushi_rice_solution.transform.position = new Vector3(0, -25, -2); tk2dAnimatedSprite sushi_rice_anim = sushi_rice_solution.GetComponent<tk2dAnimatedSprite>(); sushi_rice_anim.animationCompleteDelegate = delegate(tk2dAnimatedSprite sprite, int clipId) { Destroy(sushi_rice_solution); GameObject sushi_product_obj = Instantiate(Resources.Load(PATH_OF_Sushi_product, typeof(GameObject))) as GameObject; sushi_product_obj.transform.position = new Vector3(0, -44, -2); sushi_product_obj.name = GoodDataStore.FoodMenuList.Spicy_shell_sushi.ToString(); sushi = sushi_product_obj.GetComponent<GoodsBeh>(); sushi.costs = stageManager.goodDataStore.FoodDatabase_list[(int)GoodDataStore.FoodMenuList.Spicy_shell_sushi].costs; sushi._canDragaable = true; sushi.sprite.spriteId = sushi.sprite.GetSpriteIdByName(GoodDataStore.FoodMenuList.Spicy_shell_sushi.ToString()); sushi.GoodsBeh_putObjectOnTray_Event = Handle_SushiBeh_putObjectOnTray_Event; sushi.ObjectsBeh_destroyObj_Event = Handle_SushiBeh_destroyObj_Event; }; // Play sound effect. baseScene.audioEffect.PlayOnecSound(baseScene.soundEffect_clips[3]); } } else { stageManager.WarningPlayerToSeeManual(); this.sushiPopup.SetActiveRecursively(false); } #endregion } else if (nameInput == Sweetened_egg_sushi_face) { #region <!-- Sweetened_egg_sushi_face. if (this.currentProductionState == ProductionState.WaitForSushiIngredient) { if (sushi_rice_solution == null && sushi == null) { this.currentProductionState = ProductionState.CompleteProduction; this.sushiPopup.gameObject.SetActiveRecursively(false); Destroy(sushiRice.gameObject); sushi_rice_solution = Instantiate(Resources.Load("FoodSolution/" + Sweetened_egg_anim, typeof(GameObject))) as GameObject; sushi_rice_solution.transform.position = new Vector3(0, -25, -2); tk2dAnimatedSprite sushi_rice_anim = sushi_rice_solution.GetComponent<tk2dAnimatedSprite>(); sushi_rice_anim.animationCompleteDelegate = delegate(tk2dAnimatedSprite sprite, int clipId) { Destroy(sushi_rice_solution); GameObject sushi_product_obj = Instantiate(Resources.Load(PATH_OF_Sushi_product, typeof(GameObject))) as GameObject; sushi_product_obj.transform.position = new Vector3(0, -44, -2); sushi_product_obj.name = GoodDataStore.FoodMenuList.Sweetened_egg_sushi.ToString(); sushi = sushi_product_obj.GetComponent<GoodsBeh>(); sushi.costs = stageManager.goodDataStore.FoodDatabase_list[(int)GoodDataStore.FoodMenuList.Sweetened_egg_sushi].costs; sushi._canDragaable = true; sushi.sprite.spriteId = sushi.sprite.GetSpriteIdByName(GoodDataStore.FoodMenuList.Sweetened_egg_sushi.ToString()); sushi.GoodsBeh_putObjectOnTray_Event = Handle_SushiBeh_putObjectOnTray_Event; sushi.ObjectsBeh_destroyObj_Event = Handle_SushiBeh_destroyObj_Event; }; // Play sound effect. baseScene.audioEffect.PlayOnecSound(baseScene.soundEffect_clips[3]); } } else { stageManager.WarningPlayerToSeeManual(); this.sushiPopup.SetActiveRecursively(false); } #endregion } }