public override void OnEnable() { base.OnEnable(); Sents.Clear(); ChangeRelationShipCD.Clear(); Provocative.Clear(); }
public override void OnGameLogicTurn() { base.OnGameLogicTurn(); //调整关系 foreach (var item in ChangeRelationShipCD) { item.Value.Update(); } //挑衅 List <TUnit> clearProvocative = new List <TUnit>(); foreach (var item in Provocative) { item.Value.Update(); if (item.Value.IsOver()) { clearProvocative.Add(item.Key); } } foreach (var item in clearProvocative) { Provocative.Remove(item); } Sents.Clear(); CalcNeighbor(); }
protected void LoadSent(List <string> db) { if (db == null) { return; } Sents.Clear(); db.ForEach(x => Sents.Add(GetEntity <TUnit>(x))); }