public void HideAll()
    {
        foreach (var s in registeredSelectables)
        {
            s.DoSetState(MySelectable.SelectableState.Hidden);
        }

        initialState = MySelectable.SelectableState.Hidden;
    }
    public void ResetAll()
    {
        foreach (var s in registeredSelectables)
        {
            s.DoSetState(MySelectable.SelectableState.Normal);
        }

        initialState = MySelectable.SelectableState.Normal;
    }
 private void OnNormal(MySelectable.SelectableState oldState)
 {
     doUpdate = false;
     if (objectRenderer != null)
     {
         var sharedmaterials = new List <Material>();
         objectRenderer.GetSharedMaterials(sharedmaterials);
         foreach (var mat in sharedmaterials)
         {
             mat.SetTexture("_EmissionMap", Texture2D.blackTexture);
         }
     }
 }
 private void OnSelect(MySelectable.SelectableState oldState)
 {
     doUpdate = true;
     if (objectRenderer != null && highlightTex != null)
     {
         var sharedmaterials = new List <Material>();
         objectRenderer.GetSharedMaterials(sharedmaterials);
         foreach (var mat in sharedmaterials)
         {
             mat.EnableKeyword("_EMISSION");
             mat.SetTexture("_EmissionMap", highlightTex);
             mat.SetColor("_EmissionColor", highColor);
         }
     }
 }
    public void Select(MySelectable selectable)
    {
        foreach (var s in registeredSelectables)
        {
            if (s != selectable)
            {
                s.DoSetState(MySelectable.SelectableState.Inactive);
            }
        }

        if (selectable != null)
        {
            selectable.DoSetState(MySelectable.SelectableState.Selected);
        }

        initialState = MySelectable.SelectableState.Inactive;
    }
Esempio n. 6
0
    private void OnHide(MySelectable.SelectableState oldState)
    {
        if (screenspacePOI == null)
        {
            return;
        }

        foreach (var go in screenspacePOI.showOnSelect)
        {
            go.SetActive(false);
        }

        foreach (var go in screenspacePOI.showOnNormal)
        {
            go.SetActive(false);
        }

        foreach (var go in screenspacePOI.showOnInactive)
        {
            go.SetActive(false);
        }
    }
Esempio n. 7
0
    private void OnSelect(MySelectable.SelectableState oldState)
    {
        if (screenspacePOI == null)
        {
            return;
        }

        foreach (var go in screenspacePOI.showOnInactive)
        {
            go.SetActive(false);
        }

        foreach (var go in screenspacePOI.showOnNormal)
        {
            go.SetActive(false);
        }

        foreach (var go in screenspacePOI.showOnSelect)
        {
            go.SetActive(true);
        }

        screenspacePOI.transform.SetAsLastSibling();
    }
Esempio n. 8
0
 private void OnSelectableStateChange(MySelectable.SelectableState oldState)
 {
     Signals.Get <ShowSelectableSubsystemsSignal>().Dispatch(showOnSelect);
     DoSetVisibility();
 }