Ejemplo n.º 1
0
    /// <summary>
    /// 回到起始点
    /// </summary>
    void BackToStart()
    {
        float yPosOffset = Random.Range(3, 20) * 0.1f; //随机高度偏移
        float xPosOffset = Random.Range(5, 15) * 0.1f; //随机水平偏移

        groundTranform.position = start.position + new Vector3(xPosOffset, yPosOffset, 0);

        // 随机生成金币
        CoinCreator.RandomCreate(groundTranform.position);
    }