Ejemplo n.º 1
0
        /// <summary>
        /// 加载
        /// </summary>
        public void Load()
        {
            Player player = UnitManager.Instance.GetUnitByIdx(m_char_idx) as Player;

            if (player == null)
            {
                return;
            }

            SQLCounterHandle.QueryCounterList(m_char_idx, player.db_id, OnLoadedComplete);
        }
Ejemplo n.º 2
0
        public void Save()
        {
            Player player = UnitManager.Instance.GetUnitByIdx(m_char_idx) as Player;

            if (player == null)
            {
                return;
            }

            ByteArray by = DBUtils.AllocDBArray();

            this.Serialize(by);
            SQLCounterHandle.UpdateCounter(m_char_idx, player.db_id, by);

            m_last_save_time = Time.timeSinceStartup;
        }