Ejemplo n.º 1
0
        public bool IsMatchCurrentTree(Merchant.ActionType _mode)
        {
            MerchantBehaviorTree merchantBehaviorTree = (MerchantBehaviorTree)null;

            this.behaviorTreeTable.TryGetValue(_mode, out merchantBehaviorTree);
            return(Object.op_Equality((Object)this.currentTree, (Object)merchantBehaviorTree));
        }
Ejemplo n.º 2
0
        public void ChangeMode(Merchant.ActionType _mode)
        {
            MerchantBehaviorTree merchantBehaviorTree = (MerchantBehaviorTree)null;

            if (!this.behaviorTreeTable.TryGetValue(_mode, out merchantBehaviorTree) || Object.op_Equality((Object)merchantBehaviorTree, (Object)null))
            {
                return;
            }
            this.Mode = _mode;
            if (this.currentTree != null)
            {
                this.currentTree.DisableBehavior(false);
            }
            merchantBehaviorTree.DisableBehavior(false);
            this.currentTree = merchantBehaviorTree;
            ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>((IObservable <M0>)Observable.NextFrame((FrameCountType)0), (Func <M0, bool>)(_ => ((Behaviour)this).get_isActiveAndEnabled())), (System.Action <M0>)(_ => this.currentTree.EnableBehavior()));
        }
Ejemplo n.º 3
0
        public MerchantBehaviorTree GetBehaviorTree(Merchant.ActionType _mode)
        {
            MerchantBehaviorTree merchantBehaviorTree = (MerchantBehaviorTree)null;

            return(this.behaviorTreeTable.TryGetValue(_mode, out merchantBehaviorTree) ? merchantBehaviorTree : (MerchantBehaviorTree)null);
        }