public void ShootG12Blue() { //goToPosition(otherGoal, false, false); m_Drone.Move_vect(getInterceptAcc(ballPosition)); if (Vector3.Distance(ballPosition, otherGoal) < 3f) { Task.current.Succeed(); } else if (!ifGoodShootAngle()) { Task.current.Fail(); pbTree.Reset(); } }
// Update is called once per frame void Update() { tree.Reset(); tree.Tick(); Debug.DrawLine(transform.position, transform.position + transform.up, Color.white, 0.1f); }
protected override void Destroy(float delay = 0) { navAgent.enabled = false; isChasing = false; PandaBehaviour panda = GetComponent <PandaBehaviour>(); panda.Reset(); base.Destroy(delay); }
// Update is called once per frame void Update() { panda_bt.Reset(); panda_bt.Tick(); slider_attack.value = action_attack; slider_defend.value = action_defend; slider_dribble.value = action_dribble; slider_kick.value = action_kick; }
private void FixedUpdate() { float dt = Time.deltaTime; ball_velocity = -(ball_position - ball.transform.position) / dt; ball_position = ball.transform.position; manager.Update(m_Drone); //Debug.DrawLine(ball_position, ball_position + ball_velocity, Color.black); myPandaBT.Reset(); myPandaBT.Tick(); }
public virtual void FixedUpdate() { pandaBT.Reset(); pandaBT.Tick(); fieldOfView.SetOrigin(fovStartPoint.position); fieldOfView.SetAimDirection(aimDir); if (old_pos < transform.position.x || old_pos > transform.position.x) { isMoving = true; } else { isMoving = false; } if (isMoving) { animationHandler.WalkAnimation(); } else if (!isMoving && !isAttacking) { animationHandler.IdleAnimation(); } if (transform.position.x > old_pos && !facingRight) { Flip(); aimDir = new Vector3(1, 1f, 0f); } else if (transform.position.x < old_pos && facingRight) { Flip(); aimDir = new Vector3(-1, 1f, 0f); } old_pos = transform.position.x; }
private void Update() { GenerateSquareCorners(); // Create and visualize the box around the ball pandaBT.Reset(); pandaBT.Tick(); }
private void Update() { pandaBT.Reset(); pandaBT.Tick(); }
public void ShowText() { bt.enabled = true; bt.Reset(); }
private void Update() { myPandaBT.Reset(); myPandaBT.Tick(); }