internal void UserConfirmTransaction() { confirmationWindowObj.SetActiveRecursively(false); if(currentSessionIndex.SessionType == TabMenuState.clothes) { Dressing.CanEquipClothe_list.Add(currentSessionIndex.SessionIndex); this.CheckingCanEquipmentClothe(currentSessionIndex.SessionIndex); /// Deductions AvailableMoney and Redraw GUI identity. Mz_StorageManage.AvailableMoney -= (int)arr_priceOfClothesData[currentSessionIndex.SessionIndex]; sceneController.ReFreshAvailableMoney(); this.CalculateObjectsToDisplay(); } else if(currentSessionIndex.SessionType == TabMenuState.hat) { Dressing.CanEquipHat_list.Add(currentSessionIndex.SessionIndex); this.CheckingCanEquipHat(currentSessionIndex.SessionIndex); /// Deductions AvailableMoney and Redraw GUI identity. Mz_StorageManage.AvailableMoney -= (int)arr_HatPriceData[currentSessionIndex.SessionIndex]; sceneController.ReFreshAvailableMoney(); this.CalculateObjectsToDisplay(); } currentSessionIndex = null; }
private void CheckingCanEquipmentClothe(int index) { if (Dressing.CanEquipClothe_list.Contains(index)) { if (index < CharacterCustomization.AvailableClothesNumber) { sceneController.PlayGreatEffect(); sceneController.RandomPlayAppreciateClip(); } characterCustomization.ChangeClotheAtRuntime(index); } else { if (index < CharacterCustomization.AvailableClothesNumber) { /// To buy Costume. if (Mz_StorageManage.AvailableMoney >= (int)arr_priceOfClothesData[index]) { /// if user have available money more than item price. /// System display confirmation window for asking user for buy current target costume. confirmationWindowObj.SetActiveRecursively(true); sceneController.audioEffect.PlayOnecWithOutStop(sceneController.audioEffect.calc_clip); currentSessionIndex = new ESessionIndex() { SessionType = TabMenuState.clothes, SessionIndex = index }; } else { sceneController.PlaySoundWarning(); sceneController.TK_animationManager.PlayEyeAnimation(CharacterAnimationManager.NameAnimationsList.agape); } } else { characterCustomization.ChangeClotheAtRuntime(index); } } }
internal void UserCancleTransaction() { confirmationWindowObj.SetActiveRecursively(false); currentSessionIndex = null; }