Esempio n. 1
0
    // find a nearby resource to gather from
    void FindNewResource()
    {
        ResourceSource resourceToGet = playerAI.GetClosestResource(transform.position);

        if (resourceToGet != null)
        {
            unit.GatherResource(resourceToGet, UnitMover.GetUnitDestinationAroundResource(resourceToGet.transform.position));
        }
        else
        {
            PursueEnemy();
        }
    }