Esempio n. 1
0
 void Start()
 {
     _prevActionsToTrack = prevActionsToTrack;
     prevActions         = new List <string>();
     instance            = this;
     pd.Tick();
 }
Esempio n. 2
0
    // Update is called once per frame
    void Update()
    {
        tree.Reset();
        tree.Tick();

        Debug.DrawLine(transform.position, transform.position + transform.up, Color.white, 0.1f);
    }
Esempio n. 3
0
    // 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;
    }
Esempio n. 4
0
    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();
    }
Esempio n. 5
0
    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;
    }
Esempio n. 6
0
 private void Update()
 {
     //pbTree.Reset();
     pbTree.Tick();
 }
 private void Update()
 {
     GenerateSquareCorners();        // Create and visualize the box around the ball
     pandaBT.Reset();
     pandaBT.Tick();
 }
 private void Update()
 {
     pandaBT.Reset();
     pandaBT.Tick();
 }
Esempio n. 9
0
 private void Update()
 {
     myPandaBT.Reset();
     myPandaBT.Tick();
 }