示例#1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="agent">The agend this action belongs to</param>
        /// <param name="delay">The amount of delay for this action (0f-1f)</param>
        public GoapAction(GoapAgent agent, float delay = 1f)
        {
            childs        = new List <GoapAction>();
            preconditions = new Dictionary <string, bool>();
            effects       = new Dictionary <string, bool>();

            this.agent = agent;
            this.delay = delay;

            GenerateNewGUID();
        }
示例#2
0
 void OnEnable()
 {
     agent = (GoapAgent)target;
 }