Пример #1
0
 void CheckForChangeFormation()
 {
     if (formation != lastFormation)
     {
         lastFormation = formation;
         ChangeFormation(formation);
     }
 }
Пример #2
0
 public override void OnTrigger(OSCUnit unit)
 {
     if (unit.buttons[1])
     {
         mode = FormationMode.Ring;
     }
     else if (unit.buttons[2])
     {
         mode = FormationMode.Circle;
     }
     else if (unit.buttons[3])
     {
         mode = FormationMode.Wave;
     }
 }
Пример #3
0
    void ChangeFormation(FormationMode newForm)
    {
        if (newForm == FormationMode.FOLLOW_CURSOR)
        {
            ClearLine();
        }


        else if (newForm == FormationMode.LINE)
        {
            if (isLineHead)
            {
                SetupFollower();
            }
        }
    }
Пример #4
0
    void Update()
    {
        if (Input.GetMouseButton(0) && controlMode == "MOUSE" ||
            Input.GetButtonDown("A_1") && controlMode == "X360")
        {
            if (allowLine && tag == "Ally" || allowLine && tag == "Player")
            {
                formation = FormationMode.LINE;
            }
        }
        else
        {
            if (allowFollowCursor)
            {
                formation = FormationMode.FOLLOW_CURSOR;
            }
        }

        CheckForChangeFormation();
        DoFormation();
    }