Esempio n. 1
0
        public void Execute(AICharacter character, IGoal goal)
        {
            Vector3 closestPoint = inspectable.ClosestPoint(character.Position);

            if ((closestPoint - character.Position).magnitude <= 1.0f)
            {
                character.Inspect(inspectable);
            }
            else
            {
                character.AddGoal(new Goal(new List <IRequirement> ()
                {
                    new AtPosition(closestPoint)
                }, goal));
            }
        }