private void OnFocusSelected(FocusSelectedEvent e)
 {
     Debug.Log("FocusSelectedEvent received.");
     CleanupOldState();
     // changing state split like this to accomodate old condition where the previous focus needed
     // to be told it was no longer the focus before we lost the reference to it
     focusTransform = e.FocusTransform;
     InitializeNewState(CameraState.Focused);
 }
Exemple #2
0
    private void OnFocusSelected(FocusSelectedEvent e)
    {
        Debug.Log("FocusSelectedEvent received.");
        CleanupOldState();
        // changing state split like this to accomodate old condition where the previous focus needed
        // to be told it was no longer the focus before we lost the reference to it
        focusTransform = e.FocusTransform;
        InitializeNewState(CameraState.Focused);

        // IMPROVE Another approach to selecting a focus object: routinely ray or sphere cast to check for new (non dummy)
        // targets (perhaps if mouse is moving with no button pressed?), keeping target continually updated. If a
        // middle button click occurs, and the current target is not a dummy target, then make the current target the focus.
    }
    private void OnFocusSelected(FocusSelectedEvent e) {
        Debug.Log("FocusSelectedEvent received.");
        CleanupOldState();
        // changing state split like this to accomodate old condition where the previous focus needed
        // to be told it was no longer the focus before we lost the reference to it
        focusTransform = e.FocusTransform;
        InitializeNewState(CameraState.Focused);

        // IMPROVE Another approach to selecting a focus object: routinely ray or sphere cast to check for new (non dummy)
        // targets (perhaps if mouse is moving with no button pressed?), keeping target continually updated. If a 
        // middle button click occurs, and the current target is not a dummy target, then make the current target the focus.
    }
 private void OnFocusSelected(FocusSelectedEvent e) {
     Debug.Log("FocusSelectedEvent received.");
     CleanupOldState();
     // changing state split like this to accomodate old condition where the previous focus needed
     // to be told it was no longer the focus before we lost the reference to it
     focusTransform = e.FocusTransform;
     InitializeNewState(CameraState.Focused);
 }