Example #1
0
        internal void onClick(ClickEventData data)
        {
            if (data.keyPressed == mouseButtons.left_button)
            {
                form.SetRotateFormation(data.point);
                form.MoveFormation(data.point);
                Debug.Log("Clicked:" + data.point);
            }
            else if (data.keyPressed == mouseButtons.right_button)
            {
                form.SetRotateFormation(data.point);
                form.move_positions.Clear();

                angle = Utilities.GetAngle(form.Get_leader_coord(), data.point);

                Debug.Log("Clicked2:" + data.point + " angle=" + angle);
            }
        }
Example #2
0
 public void MoveFormation()
 {
     group_formation.MoveFormation(new Vector3(Random.Range(-100, 100), 0, Random.Range(-100, 100)));
 }