コード例 #1
0
    public void Fire()
    {
        //lets set the balls target and the target position. When the white ball hits the first ball we will set the ball to point at the target.
        Pools.CueBall.setTarget(m_targetBall, m_targetPos);
        float powerScalar = m_powerScalar;

        if (GameManager.Rules.firstRound && GameManager.GType != GameType.Mission)
        {
            powerScalar *= Random.Range(.8f, 1.5f);
        }
        Pools.CueBall.fireBall(powerScalar, m_FirePoint.forward, GetHitPoint());
        m_state           = State.ROLL;
        m_CueTrans.parent = null;
        GameStatistics.MarkShot(1);
    }