Ejemplo n.º 1
0
    public override void Think(ArwingThinker arwingThinker)
    {
        m_foxForceFour    = arwingThinker.Remember <bool>("foxForceFour");
        m_horizontalSplit = arwingThinker.Remember <bool>("horizontalSplit");
        m_groupUp         = arwingThinker.Remember <bool>("groupUp");

        if (m_foxForceFour)
        {
            Vector3 foxForceFourTacticNodePosition = arwingThinker.foxForceFourTacticNode.transform.localPosition;
            Vector3 arwingPosition = arwingThinker.GetComponent <Transform>().transform.localPosition;
            Vector3 diff           = foxForceFourTacticNodePosition - arwingPosition;
            h = diff.x;
            v = diff.y;
        }
        else if (m_horizontalSplit)
        {
            Vector3 horizontalSplitTacticNodePosition = arwingThinker.horizontalSplitTacticNode.transform.localPosition;
            Vector3 arwingPosition = arwingThinker.GetComponent <Transform>().transform.localPosition;
            Vector3 diff           = horizontalSplitTacticNodePosition - arwingPosition;
            h = diff.x;
            v = diff.y;
        }
        else if (m_groupUp)
        {
            Vector3 postTacticNodePosition = arwingThinker.postTacticNode.transform.localPosition;
            Vector3 arwingPosition         = arwingThinker.GetComponent <Transform>().transform.localPosition;
            Vector3 diff = postTacticNodePosition - arwingPosition;
            h = diff.x;
            v = diff.y;
        }
    }
Ejemplo n.º 2
0
    public override void Think(ArwingThinker arwingThinker)
    {
        arwingThinker.Remember("asdf", "asdf");
        // Debug.Log("Yo");
        // var movement = arwingThinker.GetComponent<TankMovement>();

        // movement.Steer(Input.GetAxis(m_MovementAxisName), Input.GetAxis(m_TurnAxisName));

        // var shooting = arwingThinker.GetComponent<TankShooting>();

        // if (Input.GetButton(m_FireButton))
        //     shooting.BeginChargingShot();
        // else
        //     shooting.FireChargedShot();
    }
Ejemplo n.º 3
0
    public override void Move(ArwingThinker arwingThinker)
    {
        var movement = arwingThinker.GetComponent <ArwingMovement>();

        movement.LocalMove(h, v, movement.xySpeed);
        movement.RotationLook(h, v, movement.lookSpeed);
        movement.HorizontalLean(h, 80, .1f);
        if (arwingThinker.collidedWith)
        {
            if (arwingThinker.collidedWith.name.Contains("Ring") || arwingThinker.collidedWith.name.Contains("RingCenter"))
            {
                movement.QuickSpin(-1);
                arwingThinker.collidedWith = null;
            }
        }
    }
Ejemplo n.º 4
0
    public override void Move(ArwingThinker arwingThinker)
    {
        var   movement = arwingThinker.GetComponent <ArwingMovement>();
        float h        = movement.joystick ? Input.GetAxis("Horizontal") : Input.GetAxis("Mouse X");
        float v        = movement.joystick ? Input.GetAxis("Vertical") : Input.GetAxis("Mouse Y");

        movement.LocalMove(h, v, movement.xySpeed);
        movement.RotationLook(h, v, movement.lookSpeed);
        movement.HorizontalLean(h, 80, .1f);

        if (Input.GetButtonDown("Action"))
        {
            movement.Boost(true);
        }

        if (Input.GetButtonUp("Action"))
        {
            movement.Boost(false);
        }

        if (Input.GetButtonDown("Fire3"))
        {
            movement.Break(true);
        }

        if (Input.GetButtonUp("Fire3"))
        {
            movement.Break(false);
        }

        if (Input.GetButtonDown("TriggerL") || Input.GetButtonDown("TriggerR"))
        {
            int dir = Input.GetButtonDown("TriggerL") ? -1 : 1;
            movement.QuickSpin(dir);
        }
    }
Ejemplo n.º 5
0
 public override void Initialize(ArwingThinker arwing)
 {
     h = 0;
     v = 0;
 }
Ejemplo n.º 6
0
 public abstract void Move(ArwingThinker arwing);
Ejemplo n.º 7
0
 public abstract void Think(ArwingThinker arwing);
Ejemplo n.º 8
0
 public virtual void Initialize(ArwingThinker arwing)
 {
 }