/// <summary>
        /// Choose 2 Players.
        /// </summary>
        /// <param name="sender">The object that sends the event</param>
        /// <param name="e">The parameters of the event.</param>
        private void OnPlayersToggleButtonClicked(object sender, EventArgs e)
        {
            _soundManager.PlaySound(SimpleSoundService.SoundType.Button);

            _numberOfPlayers = NumberPlayerEnum.TwoPlayers;
            _onePlayerToggleButtonUI.IsChecked          = false;
            _twoPlayersPlayToggleButtonUI.IsChecked     = true;
            _twoPlayersRouletteToggleButtonUI.IsChecked = true;
        }
        public override void Resume()
        {
            base.Resume();

            IsVisible = true;

            ShowItems();

            ManageVisibility();

            _numberOfPlayers = NumberPlayerEnum.OnePlayer;
            _onePlayerToggleButtonUI.IsChecked          = true;
            _twoPlayersPlayToggleButtonUI.IsChecked     = false;
            _twoPlayersRouletteToggleButtonUI.IsChecked = false;
        }
        /// <summary>
        /// To Resolve Dependencies of Required Components
        /// </summary>
        protected override void ResolveDependencies()
        {
            _scene = Scene as PlayScene;

            _soundManager = WaveServices.GetService <SimpleSoundService>();

            _needleImage            = _scene.EntityManager.Find("needleImage");
            _needleImageRigidBody2D = _needleImage.FindComponent <RigidBody2D>();

            _movementsTextBlockText = _scene.EntityManager.Find("movementsTextBlock").FindComponent <TextComponent>();
            _noMovementsTextBlock   = _scene.EntityManager.Find("noMovementsTextBlock");

            Entity needlePin = _scene.EntityManager.Find("needlePin");

            _revoluteJoint = needlePin.FindComponent <RevoluteJoint2D>();

            _numberOfPlayers = _scene.NumberOfPlayers;
        }
Beispiel #4
0
 public PlayGameOverPopupScene(NumberPlayerEnum numberOfPlayers)
 {
     _numberOfPlayers = numberOfPlayers;
 }
Beispiel #5
0
 public PlayScene(NumberPlayerEnum numberOfPlayers)
 {
     NumberOfPlayers = numberOfPlayers;
 }
 public PlayRouletteScene(NumberPlayerEnum numberOfPlayers)
 {
     NumberOfPlayers = numberOfPlayers;
 }