예제 #1
0
    //副程式(按鈕):決定畫面僱用
    public void Set_Decision_Accept()
    {
        //播放Buy音效
        MainState.Buy_Button_Sounds_Play();

        //播放持有金錢變更動畫
        Own_Money_Change_Animation.Play();

        switch (Now_Number)
        {
        //經理
        case 1:
            //扣除持有金錢
            MainState.SUB_OwnMoney(MainState.Manage[Now_Select_Manage_Number].GetHireSalary(), OwnMoney_Text);
            //設為僱用中
            MainState.Manage[Now_Select_Manage_Number].SetHire(true);
            break;

        //警衛
        case 2:
            //扣除持有金錢
            MainState.SUB_OwnMoney(MainState.Security[Now_Select_Security_Number].GetHireSalary(), OwnMoney_Text);
            //設為僱用中
            MainState.Security[Now_Select_Security_Number].SetHire(true);
            break;

        //顧問
        case 3:
            //扣除持有金錢
            MainState.SUB_OwnMoney(MainState.Consultant[Now_Select_Consultant_Number].GetHireSalary(), OwnMoney_Text);
            //設為僱用中
            MainState.Consultant[Now_Select_Consultant_Number].SetHire(true);
            break;
        }        //switch

        //隱藏決定畫面
        Decision.SetActive(false);
        //經理頁面按鈕設為能用
        ManageButton.interactable = true;
        //警衛頁面按鈕設為能用
        SecurityButton.interactable = true;
        //顧問頁面按鈕設為能用
        ConsultantButton.interactable = true;
        //離開按鈕設為能用
        ExitButton.interactable = true;
        //僱用按鈕設為能用
        HireButton.interactable = true;
        //變更狀態為不是決定畫面
        DecisionBool = false;
        //向上按鈕設為能用
        PreviousButton.interactable = true;
        //向下按鈕設為能用
        NextButton.interactable = true;
        //設定頁面按鈕
        Set_Now_Number(Now_Number);
    }
예제 #2
0
    //副程式(按鈕):決定畫面僱用
    public void Set_Decision_Accept()
    {
        //播放Buy音效
        MainState.Buy_Button_Sounds_Play();

        //播放持有金錢變更動畫
        Own_Money_Change_Animation.Play();

        switch (Manage_Area_Number)
        {
        //麵包師傅
        case 0:
            //如果本來沒有任何一間店
            if (MainState.BreadArea.GetStoreNumber() == 0)
            {
                MainState.BreadArea.SetManage(true);
            }
            //扣除持有金錢
            MainState.SUB_OwnMoney(MainState.BreadStore[Now_Select_Number].GetBuyPrice(), OwnMoney_Text);
            //設為已購買
            MainState.BreadStore[Now_Select_Number].SetOwnBool(true);
            //增加店鋪數
            MainState.BreadArea.SetStoreNumber(MainState.BreadArea.GetStoreNumber() + 1);
            //設麵包師傅按鈕為不可用
            Bread_Button.interactable = false;
            //音樂人按鈕為可用
            Music_Button.interactable = true;
            //科技新貴按鈕為可用
            Technology_Button.interactable = true;
            //機工按鈕為可用
            Factory_Button.interactable = true;
            //銀行家按鈕為可用
            Bank_Button.interactable = true;
            break;

        //音樂人
        case 1:
            //如果本來沒有任何一間店
            if (MainState.MusicArea.GetStoreNumber() == 0)
            {
                MainState.MusicArea.SetManage(true);
            }
            //扣除持有金錢
            MainState.SUB_OwnMoney(MainState.MusicStore[Now_Select_Number].GetBuyPrice(), OwnMoney_Text);
            //設為已購買
            MainState.MusicStore[Now_Select_Number].SetOwnBool(true);
            //增加店鋪數
            MainState.MusicArea.SetStoreNumber(MainState.MusicArea.GetStoreNumber() + 1);
            //設麵包師傅按鈕為可用
            Bread_Button.interactable = true;
            //音樂人按鈕為不可用
            Music_Button.interactable = false;
            //科技新貴按鈕為可用
            Technology_Button.interactable = true;
            //機工按鈕為可用
            Factory_Button.interactable = true;
            //銀行家按鈕為可用
            Bank_Button.interactable = true;
            break;

        //科技新貴
        case 2:
            //如果本來沒有任何一間店
            if (MainState.TehcnologyArea.GetStoreNumber() == 0)
            {
                MainState.TehcnologyArea.SetManage(true);
            }
            //扣除持有金錢
            MainState.SUB_OwnMoney(MainState.TehcnologyStore[Now_Select_Number].GetBuyPrice(), OwnMoney_Text);
            //設為已購買
            MainState.TehcnologyStore[Now_Select_Number].SetOwnBool(true);
            //增加店鋪數
            MainState.TehcnologyArea.SetStoreNumber(MainState.TehcnologyArea.GetStoreNumber() + 1);
            //設麵包師傅按鈕為可用
            Bread_Button.interactable = true;
            //音樂人按鈕為可用
            Music_Button.interactable = true;
            //科技新貴按鈕為不可用
            Technology_Button.interactable = false;
            //機工按鈕為可用
            Factory_Button.interactable = true;
            //銀行家按鈕為可用
            Bank_Button.interactable = true;
            break;

        //機工
        case 3:
            //如果本來沒有任何一間店
            if (MainState.FactoryArea.GetStoreNumber() == 0)
            {
                MainState.FactoryArea.SetManage(true);
            }
            //扣除持有金錢
            MainState.SUB_OwnMoney(MainState.FactoryStore[Now_Select_Number].GetBuyPrice(), OwnMoney_Text);
            //設為已購買
            MainState.FactoryStore[Now_Select_Number].SetOwnBool(true);
            //增加店鋪數
            MainState.FactoryArea.SetStoreNumber(MainState.FactoryArea.GetStoreNumber() + 1);
            //設麵包師傅按鈕為可用
            Bread_Button.interactable = true;
            //音樂人按鈕為可用
            Music_Button.interactable = true;
            //科技新貴按鈕為可用
            Technology_Button.interactable = true;
            //機工按鈕為不可用
            Factory_Button.interactable = false;
            //銀行家按鈕為可用
            Bank_Button.interactable = true;
            break;

        //銀行家
        case 4:
            //如果本來沒有任何一間店
            if (MainState.EconomicArea.GetStoreNumber() == 0)
            {
                MainState.EconomicArea.SetManage(true);
            }
            //扣除持有金錢
            MainState.SUB_OwnMoney(MainState.EconomicStore[Now_Select_Number].GetBuyPrice(), OwnMoney_Text);
            //設為已購買
            MainState.EconomicStore[Now_Select_Number].SetOwnBool(true);
            //增加店鋪數
            MainState.EconomicArea.SetStoreNumber(MainState.EconomicArea.GetStoreNumber() + 1);
            //設麵包師傅按鈕為可用
            Bread_Button.interactable = true;
            //音樂人按鈕為可用
            Music_Button.interactable = true;
            //科技新貴按鈕為可用
            Technology_Button.interactable = true;
            //機工按鈕為可用
            Factory_Button.interactable = true;
            //銀行家按鈕為不可用
            Bank_Button.interactable = false;
            break;
        }        //switch

        //隱藏決定畫面
        Decision.SetActive(false);
        //離開按鈕設為能用
        ExitButton.interactable = true;
        //置產按鈕設為能用
        ManageButton.interactable = true;
        //變更狀態為不是決定畫面
        DecisionBool = false;
        //向上按鈕設為能用
        PreviousButton.interactable = true;
        //向下按鈕設為能用
        NextButton.interactable = true;
    }