Ejemplo n.º 1
0
    /**
     *  Some actions need to use data from the world state to determine if they are able to run. These preconditions are called procedural preconditions.
     *  Need to check there is food available
     * **/
    public override bool checkProceduralPrecondition(GameObject agent)
    {
        // find the nearest chopping block that we can chop our wood at
        SuperMarketOne[] blocks = (SuperMarketOne[])UnityEngine.GameObject.FindObjectsOfType(typeof(SuperMarketOne));


        targetChoppingBlock = blocks[0];
        target = targetChoppingBlock.gameObject;


        return(blocks[0] != null);
    }
Ejemplo n.º 2
0
 public override void reset()
 {
     selledMilk          = false;
     targetChoppingBlock = null;
     startTime           = 0;
 }