public override void OnEnable() { base.OnEnable(); Sents.Clear(); ChangeRelationShipCD.Clear(); Provocative.Clear(); }
protected Dictionary <long, CD> GetChangeRelationShipCDDB() { Dictionary <long, CD> ret = new Dictionary <long, CD>(); ChangeRelationShipCD.ForEach((k, v) => ret.Add(k.ID, v)); return(ret); }
public int GetChangeRelationShipCD(TUnit other) { if (ChangeRelationShipCD.ContainsKey(other)) { return((int)ChangeRelationShipCD[other].CurCount); } return(0); }
protected void LoadChangeRelationShipCD(Dictionary <long, CD> db) { if (db == null) { return; } db.ForEach((k, v) => ChangeRelationShipCD.Add(GetEntity <TUnit>(k), v)); }
public void ResetChangeRelationCD(TUnit other, int cd) { if (!ChangeRelationShipCD.ContainsKey(other)) { ChangeRelationShipCD.Add(other, new CD()); } ChangeRelationShipCD[other].Reset(cd); }