public BehaveResult Tick(Behave.Runtime.Tree sender, bool init) { Debug.Log("Ticked Received by unhandled " + (BLWolf.IsAction(sender.ActiveID) ? "Action " : "Decorator ") + " ... " + (BLWolf.IsAction(sender.ActiveID) ? ((BLWolf.ActionType)sender.ActiveID).ToString() : ((BLWolf.DecoratorType)sender.ActiveID).ToString())); return(BehaveResult.Success); }
IEnumerator Start() { WS = GetComponent <WolfStats>(); nma = GetComponent <NavMeshAgent>(); m_Tree = BLWolf.InstantiateTree( BLWolf.TreeType.Wolf_Idle, this); while (Application.isPlaying && m_Tree != null) { yield return(new WaitForSeconds(1 / m_Tree.Frequency)); AIUpdate(); } }