// Login
    public static void ToLogin(CClientActionData Data)
    {
        LogMgr.DebugLog("[ClientAction.ToLogin]");
        // 先把 Login 面版關閉
        GameUtility.HideUI(Const.Panel_Login);
        // 記錄帳號 (Memory)
        string Account = Data.m_dictProtocol["Account"].ToString();

        PlayerAttr.Account = Account;
        // 記錄 AccountID
        int AccountID = System.Convert.ToInt32(Data.m_dictProtocol["AccountID"].ToString());

        PlayerAttr.AccountID = AccountID;
        // 記錄 PlayerID
        int PlayerID = System.Convert.ToInt32(Data.m_dictProtocol["PlayerID"].ToString());

        PlayerAttr.PlayerID = PlayerID;
        // 記錄 SessionKey
        string SessionKey = Data.m_dictProtocol["SessionKey"].ToString();

        PlayerAttr.SessionKey = SessionKey;
        // 記錄密碼
        ClientSaveMgr.SetString(Const.Input_Account, Account);
        ClientSaveMgr.SetString(Const.Input_Password, Data.m_dictProtocol["Password"].ToString());
        // 拉出 Panel
        GameUtility.ShowUI(Const.Panel_Main);
        // 從網路要資料
        ClientService.Player_GetAttr();
    }
예제 #2
0
    void Update()
    {
        // 存檔功能
        ClientSaveMgr.Update();
        // 網路功能
        ClientService.instance().Update();
        // 如果是單機版本就掛上更新
#if NOT_NETWORK
        GameServer.instance().Update();
#endif
    }
예제 #3
0
    void Awake()
    {
#if DanDan
        LogMgr.DebugLog("[Test] Global Macro");
#endif
        LogMgr.DebugLog("[PanelLogin] Awake");
        // 把帳號密碼給塞進去
        //ClientSaveMgr.SetString (Const.Input_Account, "dandan");
        //ClientSaveMgr.SetString (Const.Input_Password, "silver");
        GameUtility.SetInputText(Const.Input_Account, ClientSaveMgr.GetString(Const.Input_Account));
        GameUtility.SetInputText(Const.Input_Password, ClientSaveMgr.GetString(Const.Input_Password));
    }
예제 #4
0
 void Update()
 {
     // 呼叫該呼叫的 Update
     ClientSaveMgr.Update();
 }