コード例 #1
0
 public void ButtonClick(Button button)
 {
     if (button.name == "Macedonia")
     {
         SceneManager.LoadScene("MacedoniaPlayground");
     }
 }
コード例 #2
0
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.Experimental.UIElements.Button o;
         System.Action a1;
         LuaDelegation.checkDelegate(l, 2, out a1);
         o = new UnityEngine.Experimental.UIElements.Button(a1);
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
コード例 #3
0
        private void SetupPolygonChangeShapeWindowElements(VisualElement moduleView)
        {
            var sidesField = moduleView.Q <PropertyControl <long> >("labelIntegerField");

            sidesField.SetValueWithoutNotify(polygonSides);
            sidesField.OnValueChanged((evt) =>
            {
                polygonSides = (int)evt.newValue;
                ShowHideWarningMessage();
            });
            m_ChangeButton = moduleView.Q <UIElementButton>("changeButton");
            m_ChangeButton.RegisterCallback <MouseUpEvent>((e) =>
            {
                if (isSidesValid)
                {
                    GeneratePolygonOutline();
                    showChangeShapeWindow = false;
                }
            });
            m_WarningMessage = moduleView.Q("warning");
            ShowHideWarningMessage();
        }