Exemplo n.º 1
0
        public static bool ExecuteAI(Guid id, IAIContext context)
        {
            IUtilityAI aI = AIManager.GetAI(id);

            if (aI == null)
            {
                return(false);
            }
            return(aI.ExecuteOnce(context));
        }
Exemplo n.º 2
0
 void Apex.Serialization.IInitializeAfterDeserialization.Initialize(object rootObject)
 {
     if (!Application.isPlaying)
     {
         return;
     }
     this._linkedAI = AIManager.GetAI(this._aiId);
     if (this._linkedAI == null)
     {
         this._linkedAI = new AILinkAction.BrokenLink();
         Debug.LogWarning(string.Format("{0} : Failed to initialize a linked AI, the ID does not match an existing AI.", ((IUtilityAI)rootObject).name));
     }
 }