コード例 #1
0
    private void Start()
    {
        SceneManager.sceneUnloaded += SceneUnloaded;

        starsText.text = STARS_TEXT + mainMap.GetGameManager().User.LevelProgressManager.GetStarsAccumulated();
        coinsText.text = COINS_TEXT + mainMap.GetGameManager().User.Currency;
        mainMap.GetGameManager().User.OnCurrencyChanged += CurrencyChangedHandler;

        _settingsPopup = FindObjectOfType <SettingsPopup>();
    }
コード例 #2
0
 void Update()
 {
     if (Input.GetButtonDown("Pause") && !_settingsPopup)
     {
         _settingsPopup = Instantiate(settingsPopup);
         _settingsPopup.ShowToMenuButton();
     }
     else if (Input.GetButtonDown("Pause") && _settingsPopup)
     {
         Destroy(_settingsPopup.gameObject);
     }
 }
コード例 #3
0
        public void DrawButton(Rect rect)
        {
            if (Value == null)
            {
                throw new InvalidOperationException("Can't draw: Settings object is null.");
            }

            if (GUI.Button(rect, "S"))
            {
                var context = new SettingsPopup(Value);
                PopupWindow.Show(rect, context);
            }
        }
コード例 #4
0
        public void OnHandwritingSettings()
        {
            var mypane = new HandwritingSettingsFlyout {
                Width = SettingsWidth, Height = WindowBounds.Height
            };

            SettingsPopup.Child = mypane;

            SettingsPopup.SetValue(Canvas.LeftProperty,
                                   SettingsPane.Edge == SettingsEdgeLocation.Right
                                        ? (WindowBounds.Width - SettingsWidth)
                                        : 0);
            SettingsPopup.SetValue(Canvas.TopProperty, 0);
            SettingsPopup.IsOpen = true;
        }
コード例 #5
0
        public void OnEditAutocorrectorList()
        {
            var mypane = new EditAutoCorrectorListFlyout {
                Width = SettingsWidth, Height = WindowBounds.Height
            };

            SettingsPopup.Child = mypane;

            SettingsPopup.SetValue(Canvas.LeftProperty,
                                   SettingsPane.Edge == SettingsEdgeLocation.Right
                                        ? (WindowBounds.Width - SettingsWidth)
                                        : 0);
            SettingsPopup.SetValue(Canvas.TopProperty, 0);
            SettingsPopup.IsOpen = true;
        }
コード例 #6
0
    void Awake()
    {
        _thisCanvas = GetComponent <Canvas> ();
        var panels = GetComponentsInChildren <HorizontalLayoutGroup>();

        _skillsButtonPanel = panels.FirstOrDefault(i => i.tag == "LvlSkillPanel");
        _availablesPanel   = panels.FirstOrDefault(i => i.tag == "AvailablesPanel");
        _minionSkillPanel  = panels.FirstOrDefault(i => i.tag == "MinionSkillPanel");

        //_dragAndDropSystem = GetComponentInChildren<DragAndDropSystem>();
        //_timerBtn = GetComponentsInChildren<Button>().FirstOrDefault(i => i.tag == "BuildSquadTimer");
        //_timerText = _timerBtn.GetComponentInChildren<Text>();
        //_timerBtn.onClick.AddListener(() => OnTimerButtonClicked());

        levelTimerFillBar.fillAmount = 1;
        //_levelLives = _levelLivesBG.GetComponentInChildren<Text>();

        _settingsPopup = FindObjectOfType <SettingsPopup>();
        _cameraMove    = Camera.main.GetComponentInParent <CameraMovement> ();

        _initPointBarColor = levelPointBar.color;
    }
コード例 #7
0
 private void Awake()
 {
     loadingScreen.transform.parent.gameObject.SetActive(false);
     _settingsPopup = FindObjectOfType <SettingsPopup>();
 }
コード例 #8
0
 void Awake()
 {
     Instance = this; base.Awake();
 }
コード例 #9
0
 private void btnSettings_MouseUp(object sender, MouseButtonEventArgs e)
 {
     SettingsPopup.IsOpen = true;
     SettingsPopup.Focus();
 }
コード例 #10
0
 private void Start()
 {
     _moneyRef         = _money;
     _upgradePopupRef  = _upgradePopup;
     _settingspopupRef = _settingsPopup;
 }
コード例 #11
0
 // Use this for initialization
 void Start()
 {
     Current = this;
     gameObject.SetActive(false);
 }
コード例 #12
0
 void showSettings()
 {
     GameObject    parent = UICamera.first.transform.parent.gameObject;
     GameObject    obj    = NGUITools.AddChild(parent, settingsPrefab);
     SettingsPopup popup  = obj.GetComponent <SettingsPopup>();
 }