Exemple #1
0
    public void SleepWork(int num)
    {
        for (int i = 0; i < Constants.MINE_COUNT; i++)
        {
            if (GameController.Instance.HaveMine[i] > 0)
            {
                GameController.Instance.AddFromMine[i] += (mAddGem * (int)(GameController.Instance.TimeLag / (mTime * mTimePeriod)) * num);
                mElementList[i].ShowAmount(GameController.Instance.AddFromMine[i]);

                SleepUIElement Sleepelement = Instantiate(mSleepElementPrefab, mSleepElementArea);
                Sleepelement.Init(mIconArr[i], mTextInfoArr[i].Title, mTextInfoArr[i].GemName, UnitSetter.GetUnitStr((mAddGem * (int)(GameController.Instance.TimeLag / (mTime * mTimePeriod)) * num)));


                mSleepElementList.Add(Sleepelement);
            }
        }
    }
Exemple #2
0
    public void SleepJob(int num)
    {
        for (int i = 0; i < mInfoArr.Length; i++)
        {
            if (mCoworkerArr[i].gameObject.activeInHierarchy)
            {
                double AddAmount = mInfoArr[i].ValueCurrent;
                GameController.Instance.AddAmoutGem_O[i] += AddAmount * (int)((GameController.Instance.TimeLag / (mInfoArr[i].PeriodCurrent * mTimePeriod))) * num;
                GemSellController.Instance.RefreshGemData();

                SleepUIElement Sleepelement = Instantiate(mSleepElementPrefab, mSleepElementArea);
                Sleepelement.Init(mIconArr[i], mTextInfoArr[i].Title, mTextInfoArr[i].GemName, UnitSetter.GetUnitStr(AddAmount * (int)((GameController.Instance.TimeLag / (mInfoArr[i].PeriodCurrent * mTimePeriod))) * num));


                mSleepElementList.Add(Sleepelement);
            }
        }
    }