Example #1
0
 // Start is called before the first frame update
 void Start()
 {
     CameraController = CameraUtils.FetchCameraController();
     HighLightUi      = Instantiate(highLightUiModel, this.transform.position, this.transform.rotation);
     HighLightUi.SetActive(false);
     currentTargetSelectionIndex = DEFAULT_SELECTION_INDEX;
 }
Example #2
0
    public void EnableSelection(Vector3 initialPosition, List <GameObject> targetSelectionList, Action <GameObject, GameObject> actionForSelection = null, GameObject actionUser = null)
    {
        HighLightUi.transform.position = initialPosition;
        TargetList = targetSelectionList;
        HighLightUi.SetActive(true);
        GameObject targetSelection = TargetList[currentTargetSelectionIndex];

        CameraController.FocusOnPlayer(targetSelection.transform);
        IsActivated = true;

        if (actionForSelection != null)
        {
            this.actionSelection = actionForSelection;
        }

        if (actionUser != null)
        {
            this.actionUser = actionUser;
        }
    }
Example #3
0
 public void DisableSelection()
 {
     HighLightUi.SetActive(false);
     IsActivated = false;
     currentTargetSelectionIndex = DEFAULT_SELECTION_INDEX;
 }