void CheckForChangeFormation() { if (formation != lastFormation) { lastFormation = formation; ChangeFormation(formation); } }
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; } }
void ChangeFormation(FormationMode newForm) { if (newForm == FormationMode.FOLLOW_CURSOR) { ClearLine(); } else if (newForm == FormationMode.LINE) { if (isLineHead) { SetupFollower(); } } }
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(); }