Exemplo n.º 1
0
        private void OnElementOnClick(MouseEvent mouseEvent)
        {
            if (mouseEvent.srcElement.className.Contains("unit"))
            {
                GameObject unit = PhotonNetwork.GetPhotonView(int.Parse(mouseEvent.srcElement.id)).gameObject;
                cameraController.DeselectAllUnits();

                UnitSelectionComponent selection = unit.GetComponent <UnitSelectionComponent>();
                selection.SetSelect(false);

                MapScript.MoveCameraToPoint(unit.transform.position);
            }
        }