Example #1
0
    IEnumerator Start()
    {
        enemyObject = GetComponent <Enemy>();

        _tree = BLStandardAI.InstantiateTree(BLStandardAI.TreeType.Enemies_BuzzSaw, this);

        while (Application.isPlaying && _tree != null)
        {
            AIUpdate();
            yield return(new WaitForSeconds(1 / _tree.Frequency));
        }
    }
Example #2
0
 public static BehaveResult UnhandlesID(int id)
 {
     if (BLStandardAI.IsAction(id))
     {
         Debug.LogError("Unhandled Action: " + ((BLStandardAI.ActionType)id).ToString());
     }
     else if (BLStandardAI.IsDecorator(id))
     {
         Debug.LogError("Unhandled decorator: " + ((BLStandardAI.DecoratorType)id).ToString());
     }
     else
     {
         Debug.LogError("Invalid ID: " + id);
     }
     return(BehaveResult.Success);
 }