Ejemplo n.º 1
0
 public void AddMyCop()
 {
     MainSystem.AddSlave(thisSlave.key, thisSlave.star, thisSlave.name, thisSlave.health, (int)thisSlave.stressBase, (int)thisSlave.loyaltyBase, thisSlave.pay, (int)thisSlave.workPowerBase);
     if (thisSlave.titleKey >= 5000)
     {
         MainSystem.Slaves[MainSystem.Slaves.Count - 1].titleKey = thisSlave.titleKey;
         MainSystem.Slaves[MainSystem.Slaves.Count - 1].title    = thisSlave.title;
     }
     MainSystem.UpdateSlave();
     statusPopup.enabled = false;
     gatChaplay.enabled  = false;
 }
Ejemplo n.º 2
0
 public void GetItem()
 {
     if (mainSystem.GetItem((int)items[selectId].price))
     {
         mainSystem.RemoveMoney((int)items[selectId].price);
         items[selectId].cnt++;
         mainSystem.maxSlaves = mainSystem.Items[0].cnt;
         mainSystem.UpdateSlave();
         BuyingPopup.SetActive(false);
         mainSystem.ErrorPopup("구매에 성공했습니다.");
     }
     else
     {
         BuyingPopup.SetActive(false);
         mainSystem.ErrorPopup("잔액이 부족합니다.");
     }
 }
Ejemplo n.º 3
0
    public void Load()
    {
        mainSystem.SetMoney(PlayerPrefs.GetString("CopMoney"));
        mainSystem.maxSlaves         = PlayerPrefs.GetInt("ItemCnt_0");
        mainSystem.dateManager.year  = PlayerPrefs.GetInt("Year");
        mainSystem.dateManager.month = PlayerPrefs.GetInt("Month");
        mainSystem.dateManager.day   = PlayerPrefs.GetInt("Day");

        mainSystem.chief.workPower    = PlayerPrefs.GetInt("ChiefPower");
        mainSystem.chief.wpCost       = PlayerPrefs.GetInt("ChiefPC");
        mainSystem.chief.workCritical = PlayerPrefs.GetInt("ChiefCri");
        mainSystem.chief.wcCost       = PlayerPrefs.GetInt("ChiefCC");
        mainSystem.chief.handsCnt     = PlayerPrefs.GetInt("ChiefHands");
        mainSystem.chief.handsCost    = PlayerPrefs.GetInt("ChiefHC");

        for (int i = 0; i < PlayerPrefs.GetInt("SlaveCnt"); i++)
        {
            mainSystem.AddSlave(
                PlayerPrefs.GetString("SlaveKey_" + i),
                PlayerPrefs.GetInt("SlaveStar_" + i),
                PlayerPrefs.GetString("SlaveName_" + i),
                PlayerPrefs.GetInt("SlaveHealth_" + i),
                PlayerPrefs.GetInt("SlaveStress_", +i),
                PlayerPrefs.GetInt("SlaveLoyal_" + i),
                PlayerPrefs.GetInt("SlavePay_" + i),
                PlayerPrefs.GetInt("SlavePower_" + i)
                );
            mainSystem.Slaves[i].titleKey = PlayerPrefs.GetInt("SlaveTitle_" + i);
        }
        mainSystem.UpdateSlave();
        for (int i = 0; i < PlayerPrefs.GetInt("WorkCnt"); i++)
        {
            mainSystem.Works.Add(mainSystem.workQuest.GetComponent <WorkManager>().work[int.Parse(PlayerPrefs.GetString("WorkKey_" + i)) - 1]);
            mainSystem.Works[i].workCheckPoint = PlayerPrefs.GetInt("WorkCP_" + i);
        }
        for (int i = 0; i < PlayerPrefs.GetInt("ItemCnt"); i++)
        {
            mainSystem.Items[i].cnt = PlayerPrefs.GetInt("ItemCnt_" + i);
        }

        mainSystem.skillMaster.UpdateAll();
        mainSystem.ErrorPopup("불러오기 완료");
    }
Ejemplo n.º 4
0
 public void AddTitle()
 {
     if (personalTitle)
     {
         mainSystem.ErrorPopup("전용 타이틀은 교체가 불가능합니다.");
     }
     else
     {
         Slave s = mainSystem.Slaves[slavePos];
         s.title    = Name.text;
         s.titleKey = this.titleKey;
         if (s.titleKey != 5002)
         {
             s.runAngle = true;
         }
         mainSystem.UpdateSlave();
         TitleList.enabled  = false;
         TitlePopup.enabled = false;
         mainSystem.ErrorPopup("타이틀이 적용되었습니다.");
     }
 }