void Start() { if (onConditionChanged == null) { onConditionChanged = new ConditionChangeEvent(); } }
void OnConditionChanged(ConditionChangeEvent arg) { string str = ""; if (arg.Type == AddRemoveType.Add) { str = _battleSystem.Helper.GetConditionAddedMessage(arg.Character, arg.Condition); } else { str = _battleSystem.Helper.GetConditionRemovedMessage(arg.Character, arg.Condition); } _battleSystem.Log(str); }
public void SendEvent(int id) { List <ConditionTableRecord> conditions; if (mDatas.TryGetValue(id, out conditions)) { { var __list1 = conditions; var __listCount1 = __list1.Count; for (var __i1 = 0; __i1 < __listCount1; ++__i1) { var record = __list1[__i1]; { var e = new ConditionChangeEvent(record.Id); EventDispatcher.Instance.DispatchEvent(e); } } } } }