Beispiel #1
0
    // Start is called before the first frame update
    void Start()
    {
        MainUIController.Instance.ShowGold(0);
        int id = Random.Range(0, GemController.MAX_GEM_COUNT);

        mGem.GetNewGem(id);
    }
Beispiel #2
0
    // Start is called before the first frame update
    void Start()
    {
        MainUIController.Instance.ShowGold(0);
        int id = UnityEngine.Random.Range(0, GemController.MAX_GEM_COUNT);

        mGem.GetNewGem(mPlayer.GemID);
    }
Beispiel #3
0
    // Start is called before the first frame update
    void Start()
    {
        // 2019.12.11 수요일 - 코드 추가
        // 조건을 두고서 새로운 보석을 가져와야 한다.
        int id = Random.Range(0, GemController.MAX_GEM_COUNT);

        mGem.GetNewGem(id);
    }
Beispiel #4
0
    public void Touch()
    {
        double touchPower = mTouchPower;

        float randVal = UnityEngine.Random.value;

        if (randVal <= mCriticalRate)
        {
            touchPower *= 1 + CriticalValue;
        }

        if (mGem.AddProgress(touchPower))
        {
            mPlayer.Stage++;
            mPlayer.GemID = UnityEngine.Random.Range(0, GemController.MAX_GEM_COUNT);
            mGem.GetNewGem(mPlayer.GemID);
        }
    }
    public void Touch()
    {
        // 2020.01.02 목요일 - 코드 추가
        double touchPower = mTouchPower;
        // 2020.01.02 목요일 - 코드 추가
        //float randVar = UnityEngine.Random.Range(0, 100f);
        // 0 ~ 1사이의 값이 나오도록 하는 함수이다.
        float randVar = UnityEngine.Random.value;

        if (randVar <= mCriticalRate)
        {
            // 크리티컬 확률이 들어왔으므로 크리티컬이 터져야 한다.
            touchPower *= (1 + mCriticalValue);
            Debug.Log("Critical" + "!!!!");
        }

        if (mGem.AddProgress(mTouchPower))
        {
            mPlayer.Stage++;
            mPlayer.GemID = UnityEngine.Random.Range(0, GemController.MAX_GEM_COUNT);
            mGem.GetNewGem(mPlayer.GemID);
        }
    }
    // Start is called before the first frame update
    void Start()
    {
        int id = Random.Range(0, GemController.MAX_GEM_COUNT);

        mGem.GetNewGem(id);
    }