Exemplo n.º 1
0
 public override void OnAffterAwake()
 {
     base.OnAffterAwake();
     UnitType   = typeof(TUnit);
     ConfigType = typeof(TConfig);
     TDLuaMgr   = BaseLuaMgr.GetTDLuaMgr(ConfigType);
 }
Exemplo n.º 2
0
 public override void OnBeAdded(IMono mono)
 {
     base.OnBeAdded(mono);
     TDLuaMgr = BaseLuaMgr.GetTDLuaMgr(typeof(TData));
     UnitType = typeof(TData);
     if (IsGlobal)
     {
         BaseGlobal.BattleMgr.Callback_OnBattleLoaded   += OnBattleLoaded;
         BaseGlobal.BattleMgr.Callback_OnBattleUnLoaded += OnBattleUnLoaded;
     }
 }
Exemplo n.º 3
0
 public override void OnAffterAwake()
 {
     base.OnAffterAwake();
     TDLuaMgr = BaseLuaMgr.GetTDLuaMgr(typeof(TData));
     AllData.Clear();
     foreach (var item in TDLuaMgr.BaseDatas.Values)
     {
         var newData = item.Copy <TData>();
         newData.OnBeAdded(SelfUnit);
         AllData.Add(newData.TDID, newData);
     }
 }
Exemplo n.º 4
0
 public override void OnBeAdded(IMono mono)
 {
     base.OnBeAdded(mono);
     UnitType   = typeof(TUnit);
     ConfigType = typeof(TConfig);
     TDLuaMgr   = BaseLuaMgr.GetTDLuaMgr(ConfigType);
     if (IsGlobal)
     {
         BaseGlobal.BattleMgr.Callback_OnBattleUnLoaded    += OnBattleUnLoaded;
         BaseGlobal.BattleMgr.Callback_OnBattleLoadedScene += OnBattleLoadedScene;
         BaseGlobal.LoaderMgr.Callback_OnAllLoadEnd2       += OnAllLoadEnd2;
     }
 }
Exemplo n.º 5
0
 public override void OnAffterAwake()
 {
     base.OnAffterAwake();
     TDLuaMgr = BaseLuaMgr.GetTDLuaMgr(typeof(TData));
     foreach (var item in TDLuaMgr.ObjValues)
     {
         var data = item as TData;
         if (data.Type == AlertType.Continue)
         {
             TDContinueData.Add(data);
         }
     }
 }
Exemplo n.º 6
0
        protected virtual void OnConvert(WorkSheet sheet, string tableName)
        {
            int excludeRow = StartRowCount;
            var luaMgr     = BaseLuaMgr.GetTDLuaMgr(tableName);

            if (luaMgr != null)
            {
                IEnumerable <object> data;
                if (luaMgr.TableMapper != null)
                {
                    var map = luaMgr.TableMapper.Exclude(excludeRow);
                    map.SafeMode = true;
                    data         = sheet.Convert(map);
                }
                else
                {
                    data = sheet.Convert(luaMgr.DataType, excludeRow, true);
                }
                luaMgr.AddAlterRangeFromObj(data);
            }
        }
Exemplo n.º 7
0
 public override void OnAffterAwake()
 {
     base.OnAffterAwake();
     TDLuaMgr = BaseLuaMgr.GetTDLuaMgr(typeof(TArticleData));
 }