コード例 #1
0
        protected override void Start()
        {
            base.Start();

            _closeButtonUI        = EntityManager.Find("closeButton").FindComponent <ButtonUI>();
            _closeButtonUI.Click += OnButtonCloseClicked;

            _goPlayButton          = EntityManager.Find("goPlayButton");
            _goPlayButtonUI        = _goPlayButton.FindComponent <ButtonUI>();
            _goPlayButtonUI.Click += OnButtonGoPlayClicked;

            _goRouletteButton          = EntityManager.Find("goRouletteButton");
            _goRouletteButtonUI        = _goRouletteButton.FindComponent <ButtonUI>();
            _goRouletteButtonUI.Click += OnButtonGoRouletteClicked;

            _onePlayerToggleButtonUI        = EntityManager.Find("onePlayerToggleButton").FindComponent <ToggleButtonUI>();
            _onePlayerToggleButtonUI.Click += OnPlayerToggleButtonClicked;

            _twoPlayersPlayToggleButton          = EntityManager.Find("twoPlayersPlayToggleButton");
            _twoPlayersPlayToggleButtonUI        = _twoPlayersPlayToggleButton.FindComponent <ToggleButtonUI>();
            _twoPlayersPlayToggleButtonUI.Click += OnPlayersToggleButtonClicked;

            _twoPlayersRouletteToggleButton          = EntityManager.Find("twoPlayersRouletteToggleButton");
            _twoPlayersRouletteToggleButtonUI        = _twoPlayersRouletteToggleButton.FindComponent <ToggleButtonUI>();
            _twoPlayersRouletteToggleButtonUI.Click += OnPlayersToggleButtonClicked;

            _touchWarningText = EntityManager.Find("touchWarningText");
        }
コード例 #2
0
        protected override void Start()
        {
            base.Start();

            _playButtonUI            = EntityManager.Find("playButton").FindComponent <ButtonUI>();
            _playButtonUI.Click     += OnPlayButtonClicked;
            _rouletteButtonUI        = EntityManager.Find("rouletteButton").FindComponent <ButtonUI>();
            _rouletteButtonUI.Click += OnRouletteButtonClicked;
            _rulesButtonUI           = EntityManager.Find("rulesButton").FindComponent <ButtonUI>();
            _rulesButtonUI.Click    += OnRulesButtonClicked;

            _musicToggleButtonUI           = EntityManager.Find("musicToggleButton").FindComponent <ToggleButtonUI>();
            _musicToggleButtonUI.IsChecked = _gameStorage.IsMusicEnabled;
            _musicToggleButtonUI.Check    += OnMusicToggleButtonChecked;
            _musicToggleButtonUI.Uncheck  += OnMusicToggleButtonUnchecked;

            _soundToggleButtonUI           = EntityManager.Find("soundToggleButton").FindComponent <ToggleButtonUI>();
            _soundToggleButtonUI.IsChecked = _gameStorage.AreSoundsEnabled;
            _soundToggleButtonUI.Check    += OnSoundToggleButtonChecked;
            _soundToggleButtonUI.Uncheck  += OnSoundToggleButtonUnchecked;
        }