Example #1
0
    /// <summary>
    /// 로비에서 게임화면으로 전환
    /// </summary>
    /// <param name="eGameName">Name of the e game.</param>
    public void LobbyToGame(eGameList eGameName)
    {
        SOUND.I.PlayStop(DEF.SND.lobby_bgm);

        loadGame           = eGameName;
        Main.I.CurrentView = eView.Game;

        string     prefabGameName = DEF.GetGamePrefabName(loadGame);
        GameObject obj            = BUNDLE.I.LoadAsset <GameObject>(prefabGameName);

        if (obj)
        {
            GameObject go = GameObject.Instantiate(obj);
            go.name = prefabGameName;
            go.transform.SetParent(this.gameObject.transform);
            SOUND.I.LoadAssetBundleAudioClipsPackage(DEF.GetGameBundleName(loadGame));

            GameMain        = go.gameObject.GetComponent <InGame>();
            GameMain.gameId = eGameName;
            GameMain.Init();

            Main.I.AppsFlyerEvent(AFInAppEvents.GAME, AFInAppEvents.GAME_SELECT, eGameName.ToString());
        }

        if (Lobby.I != null)
        {
            Lobby.I.LobbyToGame();
        }
        Coins.LobbyToGame();
        Game.LobbyToGame();
        BroadCast.LobbyToGame();
    }
Example #2
0
    void Start()
    {
        string gameName = DEF.GetGamePrefabName(InGame.I.gameId);

        _path = xLIB.xSystem.GetPlatformPath() + "/Assets/GameWorks/" + gameName + "/TestNetFiles/";
    }