Exemplo n.º 1
0
    /// <summary>
    /// 创建开始发球界面
    /// </summary>
    internal void CreateStartFireBall(SSGlobalData.PlayerEnum indexPlayer)
    {
        int index = (int)indexPlayer + 1;

        if (index < 1)
        {
            return;
        }

        string     prefabPath   = "GUI/DaoJiShi/StartGame/StartFireBallP" + index;
        GameObject gmDataPrefab = (GameObject)Resources.Load(prefabPath);

        if (gmDataPrefab != null)
        {
            //SSDebug.Log("CreateStartFireBall......................................................");
            GameObject    obj = (GameObject)Instantiate(gmDataPrefab, m_GameUIData.PanelCenterTr);
            SSStartGameGo com = obj.GetComponent <SSStartGameGo>();
            if (com != null)
            {
                IsCreateStartFireBall = true;
                com.Init();
            }
        }
        else
        {
            SSDebug.LogWarning("CreateStartFireBall -> gmDataPrefab was null! prefabPath == " + prefabPath);
        }
    }
Exemplo n.º 2
0
    /// <summary>
    /// 创建游戏倒计时
    /// </summary>
    void CreateStartGameGo()
    {
        if (IsCreateStartGameGo == true)
        {
            return;
        }

        string     prefabPath   = "GUI/DaoJiShi/StartGame/StartGameGo";
        GameObject gmDataPrefab = (GameObject)Resources.Load(prefabPath);

        if (gmDataPrefab != null)
        {
            //SSDebug.Log("CreateStartGameGo......................................................");
            GameObject    obj = (GameObject)Instantiate(gmDataPrefab, m_GameUIData.PanelCenterTr);
            SSStartGameGo com = obj.GetComponent <SSStartGameGo>();
            if (com != null)
            {
                IsCreateStartGameGo = true;
                com.Init();
            }
        }
        else
        {
            SSDebug.LogWarning("CreateStartGameGo -> gmDataPrefab was null! prefabPath == " + prefabPath);
        }
    }