Example #1
0
    //副程式:用人員按鈕設定經理 警衛 顧問Text
    void Set_Manage_Security_Consultant_Text()
    {
        switch (Now_Number)
        {
        case 1:
            //經理名稱
            Name_Text.text = MainState.Manage [Now_Select_Manage_Number].GetName() + "";

            //經理能力階級
            ManageNumber_Text.text = MainState.Manage [Now_Select_Manage_Number].GetAbility() + "";

            //經理薪水
            MainState.SetText_Pricey(MainState.Manage [Now_Select_Manage_Number].GetSalary(), Manage_Security_Salary_Text);

            //經理僱用薪水
            MainState.SetText_Pricey(MainState.Manage [Now_Select_Manage_Number].GetHireSalary(), Manage_Security_HireSalary_Text);

            //經理自我介紹
            Introduce_Text.text = MainState.Manage [Now_Select_Manage_Number].GetIntroduce() + "";

            //經理圖片
            PeopleImage.sprite = (Sprite)Resources.Load <Sprite> (MainState.Manage_Image_String [Now_Select_Manage_Number]);

            //經理能力階級圖片
            ManageNumber_Image.fillAmount = MainState.Manage [Now_Select_Manage_Number].GetAbility() / 5.0f;
            break;

        case 2:
            //警衛名稱
            Name_Text.text = MainState.Security [Now_Select_Security_Number].GetName() + "";

            //警衛能力階級
            ManageNumber_Text.text = MainState.Security [Now_Select_Security_Number].GetAbility() + "";

            //警衛薪水
            MainState.SetText_Pricey(MainState.Security [Now_Select_Security_Number].GetSalary(), Manage_Security_Salary_Text);

            //警衛僱用薪水
            MainState.SetText_Pricey(MainState.Security [Now_Select_Security_Number].GetHireSalary(), Manage_Security_HireSalary_Text);

            //警衛自我介紹
            Introduce_Text.text = MainState.Security [Now_Select_Security_Number].GetIntroduce() + "";

            //警衛圖片
            PeopleImage.sprite = (Sprite)Resources.Load <Sprite> (MainState.Security_Image_String [Now_Select_Security_Number]);

            //警衛能力階級圖片
            ManageNumber_Image.fillAmount = MainState.Security [Now_Select_Security_Number].GetAbility() / 5.0f;
            break;

        case 3:
            //顧問名稱
            Name_Text.text = MainState.Consultant [Now_Select_Consultant_Number].GetName() + "";

            //顧問能力階級
            ManageNumber_Text.text = MainState.Consultant [Now_Select_Consultant_Number].GetAbility() + "";
            //顧問能力階級圖片
            ManageNumber_Image.fillAmount = MainState.Consultant [Now_Select_Consultant_Number].GetAbility() / 5.0f;

            //支援能力
            MainState.Consultant_Advantage(MainState.Consultant [Now_Select_Consultant_Number].GetFoodNumber(), AdvantageNumber1_Text);
            MainState.Consultant_Advantage(MainState.Consultant [Now_Select_Consultant_Number].GetMusicNumber(), AdvantageNumber2_Text);
            MainState.Consultant_Advantage(MainState.Consultant [Now_Select_Consultant_Number].GetTechnologyNumber(), AdvantageNumber3_Text);
            MainState.Consultant_Advantage(MainState.Consultant [Now_Select_Consultant_Number].GetFactoryNumber(), AdvantageNumber4_Text);
            MainState.Consultant_Advantage(MainState.Consultant [Now_Select_Consultant_Number].GetEconomicNumber(), AdvantageNumber5_Text);

            //顧問薪水
            MainState.SetText_Pricey(MainState.Consultant [Now_Select_Consultant_Number].GetSalary(), Consultant_Salary_Text);

            //顧問僱用薪水
            MainState.SetText_Pricey(MainState.Consultant [Now_Select_Consultant_Number].GetHireSalary(), Consultant_HireSalary_Text);

            //顧問自我介紹
            Introduce_Text.text = MainState.Consultant [Now_Select_Consultant_Number].GetIntroduce() + "";

            //顧問圖片
            PeopleImage.sprite = (Sprite)Resources.Load <Sprite> (MainState.Consultant_Image_String [Now_Select_Consultant_Number]);
            break;
        }        //switch
    }
Example #2
0
    //副程式:用人員按鈕設定經理 警衛 顧問Text
    void Set_Manage_Security_Consultant_Text()
    {
        //經理名稱
        ManageName_Text.text = MainState.Manage [Now_Select_Manage_Number].GetName() + "";

        //經理能力階級
        ManageNumber_Text.text = MainState.Manage[Now_Select_Manage_Number].GetAbility() + "";

        //經理薪水
        MainState.SetText_Pricey(MainState.Manage[Now_Select_Manage_Number].GetSalary(), ManageSalary_Text);

        //經理自我介紹
        ManageIntroduce_Text.text = MainState.Manage[Now_Select_Manage_Number].GetIntroduce() + "";

        //經理圖片
        Manage_Image.sprite = (Sprite)Resources.Load <Sprite>(MainState.Manage_Image_String[Now_Select_Manage_Number]);

        //經理能力階級圖片
        ManageNumber_Image.fillAmount = MainState.Manage[Now_Select_Manage_Number].GetAbility() / 5.0f;

        //警衛名稱
        SecurityName_Text.text = MainState.Security [Now_Select_Security_Number].GetName() + "";

        //警衛能力階級
        SecurityNumber_Text.text = MainState.Security[Now_Select_Security_Number].GetAbility() + "";

        //警衛薪水
        MainState.SetText_Pricey(MainState.Security[Now_Select_Security_Number].GetSalary(), SecuritySalary_Text);

        //警衛自我介紹
        SecurityIntroduce_Text.text = MainState.Security[Now_Select_Security_Number].GetIntroduce() + "";

        //警衛圖片
        Security_Image.sprite = (Sprite)Resources.Load <Sprite>(MainState.Security_Image_String[Now_Select_Security_Number]);

        //警衛能力階級圖片
        SecurityManageNumber_Image.fillAmount = MainState.Security[Now_Select_Security_Number].GetAbility() / 5.0f;

        //顧問名稱
        ConsultantName_Text.text = MainState.Consultant [Now_Select_Consultant_Number].GetName() + "";

        //顧問能力階級
        ConsultantNumber_Text.text = MainState.Consultant[Now_Select_Consultant_Number].GetAbility() + "";

        //顧問能力階級圖片
        ConsultantManageNumber_Image.fillAmount = MainState.Consultant[Now_Select_Consultant_Number].GetAbility() / 5.0f;

        //顧問自我介紹
        ConsultantIntroduce_Text.text = MainState.Consultant[Now_Select_Consultant_Number].GetIntroduce() + "";

        //支援能力
        MainState.Consultant_Advantage(MainState.Consultant[Now_Select_Consultant_Number].GetFoodNumber(), AdvantageNumber1_Text);
        MainState.Consultant_Advantage(MainState.Consultant[Now_Select_Consultant_Number].GetMusicNumber(), AdvantageNumber2_Text);
        MainState.Consultant_Advantage(MainState.Consultant[Now_Select_Consultant_Number].GetTechnologyNumber(), AdvantageNumber3_Text);
        MainState.Consultant_Advantage(MainState.Consultant[Now_Select_Consultant_Number].GetFactoryNumber(), AdvantageNumber4_Text);
        MainState.Consultant_Advantage(MainState.Consultant[Now_Select_Consultant_Number].GetEconomicNumber(), AdvantageNumber5_Text);

        //薪水
        MainState.SetText_Pricey(MainState.Consultant[Now_Select_Consultant_Number].GetSalary(), ConsultantSalary_Text);

        //顧問圖片
        Consultant_Image.sprite = (Sprite)Resources.Load <Sprite>(MainState.Consultant_Image_String[Now_Select_Consultant_Number]);
    }