34 lines
665 B
C#
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();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|