Exemple #1
0
 public override void OnEnable()
 {
     base.OnEnable();
     Sents.Clear();
     ChangeRelationShipCD.Clear();
     Provocative.Clear();
 }
Exemple #2
0
        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();
        }
Exemple #3
0
 protected void LoadSent(List <string> db)
 {
     if (db == null)
     {
         return;
     }
     Sents.Clear();
     db.ForEach(x => Sents.Add(GetEntity <TUnit>(x)));
 }