コード例 #1
0
    public void RpcGameEnd(bool success)
    {
        // 게임을 종료상태로 만들어 입력을 막는다
        currentGameState = GameState.End;
        GameEndPanel gameEndPanel = PanelManager.GetPanel(typeof(GameEndPanel)) as GameEndPanel;

        gameEndPanel.ShowGameEnd(success);
    }
コード例 #2
0
ファイル: GameEndPanel.cs プロジェクト: AhrenLi/2048
 void Awake()
 {
     _instance = this;
 }
コード例 #3
0
ファイル: UIManager.cs プロジェクト: firerings/ski-proto-01
    void Awake()
    {
        AudioListener.volume = 0.0f;
        //DontDestroyOnLoad(this.gameObject);
        GameObject UIRoot = GameObject.Find("UI Root");
        

        AccountPanel = NGUITools.AddChild(UIRoot, Resources.Load("Prefabs/UI/AccountPanel") as GameObject);
        GameReadyPanel = NGUITools.AddChild(UIRoot, Resources.Load("Prefabs/UI/GameReadyPanel") as GameObject);
        GameEndPanel = NGUITools.AddChild(UIRoot, Resources.Load("Prefabs/UI/GameEndPanel") as GameObject);
        GuildManagementPanel = NGUITools.AddChild(UIRoot, Resources.Load("Prefabs/UI/GuildManagementPanel") as GameObject);
        HeadHunterCenterPanel = NGUITools.AddChild(UIRoot, Resources.Load("Prefabs/UI/HeadHunterCenterPanel") as GameObject);
        LobbyPanel = NGUITools.AddChild(UIRoot, Resources.Load("Prefabs/UI/LobbyPanel") as GameObject);
        StageListPanel = NGUITools.AddChild(UIRoot, Resources.Load("Prefabs/UI/StageListPanel") as GameObject);
        ShopPanel = NGUITools.AddChild(UIRoot, Resources.Load("Prefabs/UI/ShopPanel") as GameObject);
        MuhanPanel = NGUITools.AddChild(UIRoot, Resources.Load("Prefabs/UI/MuhanPanel") as GameObject);
        SettingPanel = NGUITools.AddChild(UIRoot, Resources.Load("Prefabs/UI/SettingPanel") as GameObject);
        

        Account = AccountPanel.GetComponent<AccountPanel>();
        GameReady = GameReadyPanel.GetComponent<GameReadyPanel>();
        GameEnd = GameEndPanel.GetComponent<GameEndPanel>();
        GuildManagement = GuildManagementPanel.GetComponent<GuildManagementPanel>();
        HeadHunterCenter = HeadHunterCenterPanel.GetComponent<HeadHunterCenterPanel>();
        Lobby = LobbyPanel.GetComponent<LobbyPanel>();
        StageList = StageListPanel.GetComponent<StageListPanel>();
        Shop = ShopPanel.GetComponent<ShopPanel>();
        Muhan = MuhanPanel.GetComponent<MuhanPanel>();
        Setting = SettingPanel.GetComponent<SettingPanel>();

        //savedAccountData = new ClientSaveData();
        //savedAccountData.Save();

       
        if (!windows.ContainsKey(ID.ACCOUNT_INFO))
        {
            windows.Add(ID.ACCOUNT_INFO, Account);
            windows.Add(ID.GAME_READY, GameReady);
            windows.Add(ID.GAME_END, GameEnd);
            windows.Add(ID.GUILD_MANAGEMENT, GuildManagement);
            windows.Add(ID.HEADHUNTER_CENTER, HeadHunterCenter);
            windows.Add(ID.LOBBY, Lobby);
            windows.Add(ID.STAGE_LIST, StageList);
            windows.Add(ID.STORE, Shop);
            windows.Add(ID.MUHAN, Muhan);
            windows.Add(ID.CONFIG, Setting);
        }
        //Initialize temp;;
        
        if (!GameManager.firstInit)
        {
            GameObject.Find("GameManager").GetComponent<GameManager>().InitParty();
            GameManager.firstInit = true;
        }
        GuildManagement.Init();
        
        GameReady.Hide();
        GameEnd.Hide();
        GuildManagement.Hide();
        HeadHunterCenter.Hide();
        Lobby.Hide();
        StageList.Hide();
        Shop.Hide();
        Muhan.Hide();
        Setting.Hide();
        
        if(GameManager.lobbyin)
        {
            if (GameManager.quest_num == 1000)
            {
                gotoMuhan();
                GameManager.lobbyin = false;
            }
            else
            {
                gotoStagelist();
                GameManager.lobbyin = false;
            }
        }
        else
        {
            //ChangeScene(ID.LOBBY);
            gotoLobby();
        }
        AndroidAdmob.Get().Init();
    }