protected void AddModel(T label, IModel model) { if (!_modelsDic.ContainsKey(label)) { _modelsDic.Add(label, model); } else { DebugMsg.LogError("缓存中未找到,未对该Model对象进行初始化,标签:" + label); } }
protected void AddView(IFsmState <T> state) { T key = state.Label; if (_viewDic.ContainsKey(key)) { DebugMsg.LogError("已包含当前键值"); } else { _viewDic.Add(key, state); } }
private SpecialDeadAniControl InitSpecial(GameObject prefab) { SpecialDeadAniControl control = null; GameObject dead = GameObject.Instantiate(prefab); if (dead != null) { control = dead.AddComponent <SpecialDeadAniControl>(); control.Init(_self.position); } else { DebugMsg.LogError("动画预制未找到"); } return(control); }