Beispiel #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;
        }
    }
Beispiel #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();
    }