コード例 #1
0
        //==================================
        private void  _onChangeFlyWingData(int oldId, int newId)
        {
            if (m_FlyWingDataDictionary.ContainsKey(oldId))
            {
                m_FlyWingDataDictionary.Remove(oldId);
                FlyWingData temFlyWingData = new FlyWingData();
                temFlyWingData.InitFlyWingData(newId);
                m_FlyWingDataDictionary.Add(newId, temFlyWingData);

                if (m_CurEquipFlyWingId == oldId)
                {
                    m_CurEquipFlyWingId = newId;
                }
                // 重新计算所有属性
                _onCaluAllPlayerProperty();

                if (FlyWingRoot.Instance())
                {
                    FlyWingRoot.Instance().UpdataFlyWingDataById(oldId, newId);
                }
            }
            else
            {
                LogModule.DebugLog("addFlyWingData falid ,Not have ~~", oldId);
            }
        }
コード例 #2
0
        // 获得
        public void addFlyWingData(int id)
        {
            if (m_FlyWingDataDictionary.ContainsKey(id))
            {
                LogModule.DebugLog("addFlyWingData falid ,Already have ~~", id);
                return;
            }

            FlyWingData flyWingData = new FlyWingData();

            flyWingData.InitFlyWingData(id);
            m_FlyWingDataDictionary.Add(id, flyWingData);
        }