コード例 #1
0
ファイル: Test.cs プロジェクト: wishes2018/UnityGame
 // Use this for initialization
 void Start()
 {
     tree     = GetComponent <BehaviorTree> ();
     hasEnemy = (SharedBool)tree.GetVariable("hasEnemy");
     enemy    = (SharedGameObject)tree.GetVariable("enemy");
     hp       = (SharedFloat)tree.GetVariable("hp");
 }
コード例 #2
0
ファイル: Hurt.cs プロジェクト: wishes2018/UnityGame
 public override void OnStart()
 {
     GetComponent<Animator> ().Play ("hurt");
     animator = GetComponent<Animator> ();
     tree = GetComponent<BehaviorTree> ();
     hurted = (SharedBool)tree.GetVariable ("hurted");
 }
コード例 #3
0
 public virtual void OnReset()
 {
     this.speed          = (SharedFloat)10f;
     this.angularSpeed   = (SharedFloat)120f;
     this.arriveDistance = (SharedFloat)1f;
     this.stopOnTaskEnd  = (SharedBool)true;
 }
コード例 #4
0
 public override void OnReset()
 {
     target            = null;
     rotationDampening = 10;
     rotateWeapon      = true;
     aimThreshold      = 0.4f;
 }
コード例 #5
0
 public override void OnReset()
 {
     // Reset the public properties back to their original values
     successProbability = 0.5f;
     seed = 0;
     useSeed = false;
 }
コード例 #6
0
 public override void OnReset()
 {
     to           = 0;
     time         = 0;
     snap         = false;
     storeTweener = null;
 }
コード例 #7
0
 /// <summary>
 /// Resets the objects back to their default values.
 /// </summary>
 public override void OnReset()
 {
     m_TargetGameObject    = null;
     m_EffectType          = string.Empty;
     m_Start               = true;
     m_AlwaysReturnSuccess = true;
 }
コード例 #8
0
ファイル: TaskGuard.cs プロジェクト: dev-celvin/DK
 public override void OnReset()
 {
     // Reset the public properties back to their original values
     maxTaskAccessCount = null;
     linkedTaskGuards = null;
     waitUntilTaskAvailable = true;
 }
コード例 #9
0
ファイル: StopBehaviorTree.cs プロジェクト: dev-celvin/DK
 public override void OnReset()
 {
     // Reset the properties back to their original values
     behaviorGameObject = null;
     group = 0;
     pauseBehavior = false;
 }
コード例 #10
0
ファイル: MyPatrol.cs プロジェクト: Fuyaocc/JungleWar
 // Reset the public variables
 public override void OnReset()
 {
     base.OnReset();
     randomPatrol          = false;
     waypointPauseDuration = 0;
     waypoints             = null;
 }
コード例 #11
0
        public override void OnReset()
        {
            base.OnReset();

            separation = new Vector2(2, 2);
            fill       = false;
        }
コード例 #12
0
 public override void OnReset()
 {
     // Reset the public properties back to their original values
     maxTaskAccessCount     = null;
     linkedTaskGuards       = null;
     waitUntilTaskAvailable = true;
 }
コード例 #13
0
ファイル: Wait.cs プロジェクト: nowcoder001/dragonnest_src
 public override void OnReset()
 {
     this.waitTime      = 1f;
     this.randomWait    = false;
     this.randomWaitMin = 1f;
     this.randomWaitMax = 1f;
 }
コード例 #14
0
ファイル: Patrol.cs プロジェクト: request-time-out/A-Scripts
 public override void OnReset()
 {
     base.OnReset();
     this.randomPatrol          = (SharedBool)false;
     this.waypointPauseDuration = (SharedFloat)0.0f;
     this.waypoints             = (SharedGameObjectList)null;
 }
コード例 #15
0
    public override TaskStatus OnUpdate()
    {
        //Debug.Log("transform.localEulerAngles.y:" + transform.localEulerAngles.y);
        if (transform.position.z < doorZ)//房间A
        {
            if (transform.position.x <= (waitLine + 5))
            {
                isAEmpty = (SharedBool)GlobalVariables.Instance.GetVariable("isRoomAEmpty");
                if (isAEmpty.Value)
                {
                    return(TaskStatus.Failure);
                }
                else
                {
                    if (transform.position.x > doorX)
                    {
                        if (transform.localEulerAngles.y < 180)//出门
                        {
                            Debug.Log("出门");
                            return(TaskStatus.Failure);
                        }
                        else
                        {
                            Debug.Log("等待");
                            return(TaskStatus.Success);
                        }
                    }
                }
            }
        }
        else//房间B
        {
            if (transform.position.x <= (waitLine + 5))
            {
                isBEmpty = (SharedBool)GlobalVariables.Instance.GetVariable("isRoomBEmpty");
                if (isBEmpty.Value)
                {
                    return(TaskStatus.Failure);
                }
                else
                {
                    if (transform.position.x > doorX)
                    {
                        if (transform.localEulerAngles.y < 180)//出门
                        {
                            Debug.Log("出门");
                            return(TaskStatus.Failure);
                        }
                        else
                        {
                            Debug.Log("等待");
                            return(TaskStatus.Success);
                        }
                    }
                }
            }
        }

        return(TaskStatus.Failure);
    }
コード例 #16
0
ファイル: Test.cs プロジェクト: wishes2018/UnityGame
 // Use this for initialization
 void Start()
 {
     tree = GetComponent<BehaviorTree> ();
     hasEnemy = (SharedBool)tree.GetVariable ("hasEnemy");
     enemy = (SharedGameObject)tree.GetVariable ("enemy");
     hp = (SharedFloat)tree.GetVariable ("hp");
 }
コード例 #17
0
ファイル: Hurt.cs プロジェクト: wishes2018/UnityGame
 public override void OnStart()
 {
     GetComponent <Animator> ().Play("hurt");
     animator = GetComponent <Animator> ();
     tree     = GetComponent <BehaviorTree> ();
     hurted   = (SharedBool)tree.GetVariable("hurted");
 }
コード例 #18
0
 public virtual void OnReset()
 {
     this.behaviorGameObject = (SharedGameObject)null;
     this.group                = (SharedInt)0;
     this.waitForCompletion    = (SharedBool)false;
     this.synchronizeVariables = (SharedBool)false;
 }
コード例 #19
0
ファイル: Wait.cs プロジェクト: request-time-out/A-Scripts
 public virtual void OnReset()
 {
     this.waitTime      = (SharedFloat)1f;
     this.randomWait    = (SharedBool)false;
     this.randomWaitMin = (SharedFloat)1f;
     this.randomWaitMax = (SharedFloat)1f;
 }
コード例 #20
0
 public override void OnReset()
 {
     // Reset the properties back to their original values
     text     = "";
     logError = false;
     logTime  = false;
 }
コード例 #21
0
 public override void OnReset()
 {
     // Reset the public properties back to their original values
     successProbability = 0.5f;
     seed    = 0;
     useSeed = false;
 }
コード例 #22
0
 public override void OnReset()
 {
     // Reset the properties back to their original values.
     behaviorGameObject = null;
     group = 0;
     waitForCompletion = false;
 }
コード例 #23
0
 /// <summary>
 /// Reset the values back to their defaults.
 /// </summary>
 public override void OnReset()
 {
     speed          = 10;
     angularSpeed   = 120;
     arriveDistance = 1;
     stopOnTaskEnd  = true;
 }
コード例 #24
0
 public override void OnReset()
 {
     // Reset the properties back to their original values.
     behaviorGameObject = null;
     group             = 0;
     waitForCompletion = false;
 }
コード例 #25
0
 public override void OnReset()
 {
     this.behaviorGameObject = null;
     this.group                = 0;
     this.waitForCompletion    = false;
     this.synchronizeVariables = false;
 }
コード例 #26
0
ファイル: Arc.cs プロジェクト: cbutton01/unity-test-project
        public override void OnReset()
        {
            base.OnReset();

            radius  = 5;
            concave = true;
        }
コード例 #27
0
 public override void OnReset()
 {
     // Reset the properties back to their original values
     behaviorGameObject = null;
     group         = 0;
     pauseBehavior = false;
 }
コード例 #28
0
ファイル: SetIsEnabled.cs プロジェクト: wishes2018/UnityGame
 public override void OnReset()
 {
     if (specifiedObject != null) {
         specifiedObject.Value = null;
     }
     enabled = false;
 }
コード例 #29
0
ファイル: Diamond.cs プロジェクト: zk213/Ecosystem
        public override void OnReset()
        {
            base.OnReset();

            separation         = new Vector2(2, 2);
            backPositionOffset = false;
        }
コード例 #30
0
 protected override void OnReset()
 {
     duration      = 1;
     randomWait    = false;
     randomWaitMin = 1;
     randomWaitMax = 1;
 }
コード例 #31
0
        public override void OnReset()
        {
            base.OnReset();

            separation = 2;
            right      = false;
        }
コード例 #32
0
 /// <summary>
 /// Resets the objects back to their default values.
 /// </summary>
 public override void OnReset()
 {
     m_TargetGameObject    = null;
     m_AbilityType         = string.Empty;
     m_PriorityIndex       = -1;
     m_Start               = true;
     m_AlwaysReturnSuccess = false;
 }
コード例 #33
0
 public override void OnReset()
 {
     firstObject  = null;
     secondObject = null;
     threshold    = 2;
     isAbove      = null;
     difference   = null;
 }
コード例 #34
0
ファイル: Wait.cs プロジェクト: wishes2018/UnityGame
 public override void OnReset()
 {
     // Reset the public properties back to their original values
     waitTime = 1;
     randomWait = false;
     randomWaitMin = 1;
     randomWaitMax = 1;
 }
コード例 #35
0
 public override void OnReset()
 {
     targetGameObject = null;
     targetObject = null;
     targetPosition = Vector3.zero;
     ignoreHeight = true;
     storeValue = 0;
 }
コード例 #36
0
ファイル: Patrol.cs プロジェクト: emccrckn/DadSimulator
        // Reset the public variables
        public override void OnReset()
        {
            base.OnReset();

            randomPatrol = false;
            waypointPauseDuration = 0;
            waypoints = null;
        }
コード例 #37
0
 public override void OnReset()
 {
     if (this.specifiedObject != null)
     {
         this.specifiedObject.Value = null;
     }
     this.enabled = false;
 }
コード例 #38
0
 public override void OnReset()
 {
     thisGameObject = null;
     targetObject   = null;
     targetPosition = Vector3.zero;
     ignoreHeight   = true;
     storeValue     = 0;
 }
コード例 #39
0
 public override void OnReset()
 {
     start = Vector3.zero;
     end = Vector3.zero;
     color = Color.white;
     duration = 0f;
     depthTest = true;
 }
コード例 #40
0
 public override void OnReset()
 {
     // Reset the public properties back to their original values
     waitTime      = 1;
     randomWait    = false;
     randomWaitMin = 1;
     randomWaitMax = 1;
 }
コード例 #41
0
 public override void OnReset()
 {
     if (specifiedObject != null)
     {
         specifiedObject.Value = null;
     }
     enabled = false;
 }
コード例 #42
0
 // Reset the public variables
 public override void OnReset()
 {
     usePhysics2D = false;
     rotationEpsilon = 0.5f;
     maxLookAtRotationDelta = 1f;
     onlyY = false;
     target = null;
     targetRotation = Vector3.zero;
 }
コード例 #43
0
 public override void OnReset()
 {
     // Reset the properties back to their original values
     textFormat = string.Empty;
     logError = false;
     arg0 = null;
     arg1 = null;
     arg2 = null;
     arg3 = null;
 }
コード例 #44
0
    public override TaskStatus OnUpdate()
    {
        isAttacked = (SharedBool)GlobalVariables.Instance.GetVariable("IsAttacked");

        if (isAttacked.Value)
        {
            return TaskStatus.Success;
        }

        return TaskStatus.Failure;
    }
コード例 #45
0
ファイル: Search.cs プロジェクト: emccrckn/DadSimulator
        // Reset the public variables
        public override void OnReset()
        {
            base.OnReset();

            wanderDistance = 10;
            wanderRate = 1;
            fieldOfViewAngle = 90;
            viewDistance = 30;
            senseAudio = true;
            hearingRadius = 30;
            audibilityThreshold = 0.05f;
        }
コード例 #46
0
ファイル: SetMute.cs プロジェクト: HaoYunSun/TEMPORAIRE
 public override void OnReset()
 {
     targetGameObject = null;
     mute = false;
 }
コード例 #47
0
ファイル: SetSharedBool.cs プロジェクト: HaoYunSun/TEMPORAIRE
 public override void OnReset()
 {
     targetValue = false;
     targetVariable = false;
 }
コード例 #48
0
 public override void OnReset()
 {
     show = false;
     window = null;
 }
コード例 #49
0
ファイル: Log.cs プロジェクト: dev-celvin/DK
 public override void OnReset()
 {
     // Reset the properties back to their original values
     text = "";
     logError = false;
 }
コード例 #50
0
 public override void OnReset()
 {
     variable = false;
     compareTo = false;
 }
コード例 #51
0
ファイル: Repeater.cs プロジェクト: warboy123/goap
 public override void OnReset()
 {
     // Reset the public properties back to their original values.
     count = 0;
     endOnFailure = true;
 }
コード例 #52
0
ファイル: GetKey.cs プロジェクト: dev-celvin/DK
 public override void OnReset()
 {
     key = KeyCode.None;
     storeResult = false;
 }
コード例 #53
0
 public override void OnReset()
 {
     targetGameObject = null;
     storeValue = false;
 }
コード例 #54
0
 public override void OnReset()
 {
     blueprintID = 0;
     learned = false;
 }
コード例 #55
0
ファイル: Cover.cs プロジェクト: BiteMeInc/bite-me
        // Reset the public variables
        public override void OnReset()
        {
            base.OnReset();

            maxCoverDistance = 1000;
            maxRaycasts = 100;
            rayStep = 1;
            coverOffset = 2;
            lookAtCoverPoint = false;
            rotationEpsilon = 0.5f;
        }
コード例 #56
0
ファイル: SetFixedAngle.cs プロジェクト: HaoYunSun/TEMPORAIRE
 public override void OnReset()
 {
     targetGameObject = null;
     fixedAngle = false;
 }
コード例 #57
0
ファイル: GetButton.cs プロジェクト: dev-celvin/DK
 public override void OnReset()
 {
     buttonName = "Fire1";
     storeResult = false;
 }
コード例 #58
0
ファイル: SetApplyRootMotion.cs プロジェクト: dev-celvin/DK
 public override void OnReset()
 {
     targetGameObject = null;
     rootMotion = false;
 }
コード例 #59
0
 public override void OnReset()
 {
     targetGameObject = null;
     ignoreListenerPause = false;
 }
コード例 #60
0
ファイル: PerformInterruption.cs プロジェクト: dev-celvin/DK
 public override void OnReset()
 {
     // Reset the properties back to their original values.
     interruptTasks = null;
     interruptSuccess = false;
 }