Skip to content

Instantly share code, notes, and snippets.

@AngryAnt
Created May 30, 2011 09:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AngryAnt/998665 to your computer and use it in GitHub Desktop.
Save AngryAnt/998665 to your computer and use it in GitHub Desktop.
Tree tick frequency.
using UnityEngine;
using System.Collections;
using Behave.Runtime;
using Tree = Behave.Runtime.Tree;
public class MyAgent : IAgent
{
private Tree myTree;
IEnumerator Start ()
{
myTree = BLMyLibrary.InstantiateTree (BLMyLibrary.TreeType.MyCollection_MyTree, this);
while (Application.isPlaying)
{
yield return new WaitForSeconds (1.0f / myTree.Frequency);
myTree.Tick ();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment