Example #1
0
 public void ResetUI()
 {
     Text_Name.text        = "无";
     Text_Effect.text      = "————";
     Text_Progress.text    = "进度: ----";
     Text_SuccessRate.text = "成功率: ----";
     SuccessText.SetActive(false);
     FailText.SetActive(false);
 }
Example #2
0
    public void ResearchFinish()
    {
        float Posb = Random.Range(0.0f, 1.0f);

        if (Posb < SuccessRate + GC.ResearchSuccessRateExtra)
        {
            for (int i = 0; i < GC.PrC.CurrentProduct.Count; i++)
            {
                Product Cp = GC.PrC.CurrentProduct[i];
                if (Type == 1)
                {
                    Cp.Score[1] += 500;
                }
                else if (Type == 2)
                {
                    Cp.Score[1] += 300;
                    Cp.Score[2] += 300;
                }
                else if (Type == 3)
                {
                    for (int j = 0; j < 5; j++)
                    {
                        Cp.Profit[j] += 5;
                    }
                }
                else if (Type == 4)
                {
                    Cp.Score[0] += 500;
                    Cp.Score[1] += 500;
                    Cp.Score[2] += 500;
                    Cp.Score[3] += 500;
                }
                else if (Type == 5)
                {
                    Cp.Score[1] += 300;
                    Cp.Score[2] += 500;
                }
                else if (Type == 6)
                {
                    Cp.Score[1] += 200;
                }
                else if (Type == 7)
                {
                    for (int j = 0; j < 5; j++)
                    {
                        Cp.Profit[j] += 10;
                    }
                }
                else if (Type == 8)
                {
                    Cp.Score[0] += 400;
                    Cp.Score[1] += 300;
                }
                else if (Type == 9)
                {
                    for (int j = 0; j < 5; j++)
                    {
                        Cp.Profit[j] += 5;
                    }
                }
                else if (Type == 10)
                {
                    for (int j = 0; j < 5; j++)
                    {
                        Cp.Profit[j] += 10;
                    }
                }
                else if (Type == 11)
                {
                    Cp.Score[3] += 400;
                }
                else if (Type == 12)
                {
                    Cp.Score[1] += 1000;
                    Cp.Score[2] += 1000;
                    Cp.Score[3] += 1000;
                }
                else if (Type == 13)
                {
                    Cp.Score[2] += 2000;
                }
                else if (Type == 14)
                {
                    Cp.Score[0] += 1000;
                    Cp.Score[1] += 1000;
                    Cp.Score[3] -= 500;
                }

                Cp.CalcUser();
                Cp.UpdateUI();
            }
            SuccessText.SetActive(true);
        }
        else
        {
            FailText.SetActive(true);
        }
        DC.SurveyButton.interactable = true;
    }