Beispiel #1
0
 private void OnItemSelect(UILevelObject obj)
 {
     if (obj != this)
     {
         selectToogle.isOn = false;
     }
 }
Beispiel #2
0
 // this toogle got changed
 public void SelectClick(Toggle t)
 {
     if (!UIObjectPreferences.menuOpen)
     {
         if (owned && t.isOn)
         {
             t.isOn = true;
             //selectToogle.interactable = false;
             LevelEditor.editorMode = LevelEditor.EditorMode.place;
             SoundManager.PlayLightWobble();
             currentSelectedObject = this;
             onItemSelect.Invoke(this);
         }
         else if (!t.isOn && currentSelectedObject.selectToogle == t)
         {
             if (LevelEditor.editorMode == LevelEditor.EditorMode.place)
             {
                 SoundManager.PlayLightWobble(0.6F);
             }
             LevelEditor.editorMode = LevelEditor.EditorMode.select;
         }
         Debug.Log("editormode: " + LevelEditor.editorMode);
     }
 }