MWS_2021/Unity Project/Assets/Scripts/GrowMultipleTrees.cs
2021-05-06 01:27:44 +02:00

34 lines
665 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GrowMultipleTrees : MonoBehaviour
{
public TurtleEnvironment[] trees;
public int steps;
// Start is called before the first frame update
void Start()
{
foreach(TurtleEnvironment tree in trees)
{
tree.loadFile();
}
}
// Update is called once per frame
void Update()
{
}
public void step()
{
for(int i = 0; i<steps;i++)
{
foreach(TurtleEnvironment tree in trees)
{
tree.evaluateAndPresent();
}
}
}
}