Exemplo n.º 1
0
    void SetLaserColorForMode(StateManagerMode mode)
    {
        Color newColor;

        switch (mode)
        {
        case StateManagerMode.Normal:
            newColor = Color.white;
            break;

        case StateManagerMode.Delete:
            newColor = Color.red;
            break;

        case StateManagerMode.CreateSite:
            newColor = Color.green;
            break;

        default:
            newColor = Color.magenta;
            break;
        }

        laser.GetComponent <GvrLaserVisual>().laserColor    = newColor;
        laser.GetComponent <GvrLaserVisual>().laserColorEnd = newColor;
    }
Exemplo n.º 2
0
    public void SwitchToCreateSiteMode()
    {
        currentMode = StateManagerMode.CreateSite;
        SetLaserColorForMode(currentMode);
        earthSphere.GetComponent <SphereInteraction>().globeDragEnabled = false;

        createSiteWindow.GetComponent <CreateSiteWindow>().OnEnterCreateSiteMode();
        createSiteWindow.SetActive(true);
    }
Exemplo n.º 3
0
    public void SwitchToNormalMode()
    {
        currentMode = StateManagerMode.Normal;
        SetLaserColorForMode(currentMode);

        earthSphere.GetComponent <SphereInteraction>().globeDragEnabled = true;

        keyboardManager.Hide();
        createSiteWindow.SetActive(false);
        createSiteWindow.GetComponent <CreateSiteWindow>().OnLeaveCreateSiteMode();
    }
Exemplo n.º 4
0
 public void SwitchToDeleteMode()
 {
     currentMode = StateManagerMode.Delete;
     SetLaserColorForMode(currentMode);
 }