/// <summary> /// Change the active behavior branch /// </summary> public void ChangeBranch(IBhvNode n, Npc a) { ResetTimers(); ResetNavAgent(a); SetActionReady(true); // if ( HubrisCore.Instance.Debug ) // LocalConsole.Instance.Log( $"{a.Name}: {nameof( ActiveBranch )} {ActiveBranch.GetType().Name} requested change due to status: {(int)Status}", true ); ActiveBranch = n; a.BhvBranch = n.GetType().Name; // if ( HubrisCore.Instance.Debug ) // LocalConsole.Instance.Log( $"{a.Name}: {nameof( ActiveBranch )} is now {ActiveBranch.GetType().Name}", true ); SetStatus(BhvStatus.RUNNING); }
///-------------------------------------------------------------------- /// BhvTree methods ///-------------------------------------------------------------------- public BhvTree(IBhvNode n) { _active = n; }