Пример #1
0
        private void DrawSubGoals(SpriteBatch spriteBatch, BaseGoal currentGoal, int depth)
        {
            _y += 24;
            var font = TextureStorage.Fonts["Font"];

            spriteBatch.DrawString(font, currentGoal.Name, new Vector2(smartEntity.Pos.X + depth * 6, smartEntity.Pos.Y + _y), currentGoal.State == Statusgoal.active ? Color.LawnGreen : Color.Black);

            var compositeGoal = currentGoal as CompositeGoal;

            if (compositeGoal?.SubGoals == null)
            {
                return;
            }

            foreach (var goal in compositeGoal.SubGoals)
            {
                DrawSubGoals(spriteBatch, goal, depth + 1);
            }
        }
Пример #2
0
 public virtual void AddSubGoal(BaseGoal goal)
 {
 }