/// <summary> /// 是否为玩家 /// </summary> /// <param name="nation"></param> /// <returns></returns> private bool IsPlayerCtrl(BaseUnit unit) { if (unit == null) { return(false); } if (!unit.IsPlayerCtrl()) { return(false); } return(true); }
//是否进入AI托管(进入AI托管,不一定AI会操作) public bool IsAIHosting(BaseUnit unit) { return((IsAIHosting() && unit.IsPlayerCtrl()) || unit.IsAI()); }