Esempio n. 1
0
        public static void GrowTree(Vector position, BaseTree tree, int?heightOffset = null)
        {
            int offset;

            if (heightOffset is null)
            {
                offset = new Random().Next(-2, 2);
            }
            else
            {
                offset = (int)heightOffset;
            }
            tree.GenerateTree(position, offset);
        }