예제 #1
0
    // Use this for initialization
    void Start()
    {
        _frogACount = ResultCounter.GetFrogAResult();
        _frogBCount = ResultCounter.GetFrogBResult();

        if (_frogACount > _frogBCount)
        {
            Instantiate(FrogAWin, transform.position, transform.rotation);
        }
        else if (_frogACount < _frogBCount)
        {
            Instantiate(FrogBWin, transform.position, transform.rotation);
        }
        else
        {
            if (Random.Range(0, 2) == 0)
            {
                Instantiate(FrogAWin, transform.position, transform.rotation);
            }
            else
            {
                Instantiate(FrogBWin, transform.position, transform.rotation);
            }
        }
    }
예제 #2
0
 // Use this for initialization
 void Start()
 {
     _result      = GetComponent <Text>();
     _result.text = ResultCounter.GetFrogAResult().ToString();
 }