예제 #1
0
 private static void RemoveTreePlayer(TreePlayer player)
 {
     if (player.SharedTree == null)
     {
         return;
     }
     PlayersCache.Remove(player);
 }
예제 #2
0
 private static void AddTreePlayer(TreePlayer player)
 {
     if (player.SharedTree == null)
     {
         return;
     }
     PlayersCache.Add(player);
 }
예제 #3
0
        /// <summary> Set new behaviour tree asset in runtime </summary>
        public void Initialize(BehaviourTree tree)
        {
            Clear();
            _tree = tree;
            if (_tree == null)
            {
                return;
            }

            _treePlayer = new TreePlayer(_tree, _tree.Blackboard, _coroutineRunner, "Main");
        }