void ReleaseDesignerOutlets()
        {
            if (PauseButton != null)
            {
                PauseButton.Dispose();
                PauseButton = null;
            }

            if (PlayButton != null)
            {
                PlayButton.Dispose();
                PlayButton = null;
            }

            if (StopButton != null)
            {
                StopButton.Dispose();
                StopButton = null;
            }

            if (TempoField != null)
            {
                TempoField.Dispose();
                TempoField = null;
            }

            if (LayerCollection != null)
            {
                LayerCollection.Dispose();
                LayerCollection = null;
            }
        }
 /// <summary> Disposes of the menu </summary>
 public override void Dispose()
 {
     base.Dispose();
     PlayButton?.Dispose();
     StoreButton?.Dispose();
     _Title.Dispose();
 }
Beispiel #3
0
        private void GameOnGameOver(object sender, EventArgs eventArgs)
        {
            AllGamesOver = (bc.Game.IsGameOver);
            if (!AllGamesOver)
            {
                return;
            }

            ShowAchievement("No more moves", "GAME OVER");

#if GOOGLE_ANALYTICS
            EasyTracker.GetTracker().SendEvent("GameOver" + bc.Game.GameDefinition.UniqueId, "Score", null, TotalScore);
            EasyTracker.GetTracker().SendEvent("GameOver" + bc.Game.GameDefinition.UniqueId, "Moves", null, bc.Game.Moves);
            if (TotalScore == bc.Game.GameData.BestScore)
            {
                EasyTracker.GetTracker().SendEvent("BestScore" + bc.Game.GameDefinition.UniqueId, "BestScore", null, bc.Game.GameData.BestScore);
            }
#endif

            ShowShare = true;
            PlayGrid.IsHitTestVisible = true;
            PlayGrid.AnimateAsync(new FadeInAnimation());
            PlayButton.IsHitTestVisible = true;
            PlayButton.AnimateAsync(new BounceInUpAnimation());

            bc.SaveData();
        }
Beispiel #4
0
 public override void Render()
 {
     base.Render();
     PlayButton.Render();
     QuitButton.Render();
     _title.Render();
 }
Beispiel #5
0
        protected override void LoadComplete()
        {
            changeBackground = new Bindable <bool>(true);
            changeBackground = config.GetBindable <bool>(StreamGameSettings.ChangeBackground);

            changeBackground.ValueChanged += change =>
            {
                if (!change.NewValue)
                {
                    backgroundStack.Push(new BackgroundScreenDefault());
                }
            };

            FileStream music = File.OpenRead(Directory + @"\level.ogg");
            PlayButton button;

            Add(button = new PlayButton(new TrackBass(music)
            {
                Looping = true
            })
            {
                Size   = new Vector2(30),
                Margin = new MarginPadding(10)
            });

            base.LoadComplete();
        }
        private void ShowTransportGrid()
        {
            InlineFrame.IsEnabled = false;

            if (InlineFrame.Content is IXboxInputPage)
            {
                ((IXboxInputPage)InlineFrame.Content).PreserveFocus();
            }

            //TransportControlGrid.Visibility = Visibility.Visible;

            transportGridAnimating = true;

            Storyboard storyboard = ((Storyboard)TransportControlGrid.Resources["EnterStoryboard"]);

            EventHandler <object> handler = null;

            handler = new EventHandler <object>((x, y) =>
            {
                storyboard.Completed  -= handler;
                transportGridAnimating = false;
                transportGridVisible   = true;

                TransportControlGrid.IsHitTestVisible = true;

                PlayButton.Focus(FocusState.Keyboard);
                ElementSoundPlayer.Play(ElementSoundKind.Show);
            });

            storyboard.Completed += handler;
            storyboard.Begin();
        }
Beispiel #7
0
 /// <summary>
 /// Event handler for when keydown is pressed with focus on the game form. Relevant for enter key.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void GameForm_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         PlayButton.PerformClick();
     }
 }
Beispiel #8
0
        public PreviewButton()
        {
            Height = 42;

            Children = new Drawable[]
            {
                bg = new Box
                {
                    RelativeSizeAxes = Axes.Both,
                    Colour           = Color4.Black.Opacity(0.25f),
                },
                new Container
                {
                    Anchor           = Anchor.BottomLeft,
                    Origin           = Anchor.BottomLeft,
                    RelativeSizeAxes = Axes.X,
                    Height           = 3,
                    Child            = progress = new Box
                    {
                        RelativeSizeAxes = Axes.Both,
                        Width            = 0f,
                        Alpha            = 0f,
                    },
                },
                playButton = new PlayButton
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre,
                    Size   = new Vector2(18),
                },
            };

            Action = () => playing.Value = !playing.Value;
            playing.ValueChanged += newValue => progress.FadeTo(newValue ? 1 : 0, 100);
        }
Beispiel #9
0
        private void Awake()
        {
#if !UNITY_EDITOR
            Camera.main.orthographicSize *= 2.0f;
#endif

            SpaceUtil.Init();

            SpaceLarge.Init();
            SpaceSmall.Init();

            PlayButton.Init();
            Title.Init();

            Title.PositionY = SpaceUtil.WorldMap.Top.y - Title.BoxMap.Height;

            Vector2 buttonSize     = PlayButton.ButtonSize;
            Vector2 buttonSizeHalf = buttonSize * 0.5f;

            PlayButton.PositionY    = SpaceUtil.WorldMap.Center.y + buttonSizeHalf.y + ButtonOffsetHalf;
            OptionsButton.PositionY = SpaceUtil.WorldMap.Center.y - buttonSizeHalf.y - ButtonOffsetHalf;

            PlayVeryEasy.PositionY = SpaceUtil.WorldMap.Center.y + ((buttonSize.y + ButtonOffset) * 2);
            PlayEasy.PositionY     = SpaceUtil.WorldMap.Center.y + (buttonSize.y + ButtonOffset);
            PlayMedium.PositionY   = SpaceUtil.WorldMap.Center.y;
            PlayHard.PositionY     = SpaceUtil.WorldMap.Center.y - (buttonSize.y + ButtonOffset);
            PlayVeryHard.PositionY = SpaceUtil.WorldMap.Center.y - ((buttonSize.y + ButtonOffset) * 2);

            SetPlayAndOptionButtonsEnabled(true);
            SetDifficultyButtonsEnabled(false);
        }
Beispiel #10
0
        void ReleaseDesignerOutlets()
        {
            if (AudioUnitTableView != null)
            {
                AudioUnitTableView.Dispose();
                AudioUnitTableView = null;
            }

            if (NoViewLabel != null)
            {
                NoViewLabel.Dispose();
                NoViewLabel = null;
            }

            if (PlayButton != null)
            {
                PlayButton.Dispose();
                PlayButton = null;
            }

            if (PresetTableView != null)
            {
                PresetTableView.Dispose();
                PresetTableView = null;
            }

            if (ViewContainer != null)
            {
                ViewContainer.Dispose();
                ViewContainer = null;
            }
        }
Beispiel #11
0
 //open screen
 private void StartButton_Click(object sender, EventArgs e)
 {
     StartButton.Hide();
     PlayButton.Show();
     numericUpDown1.Show();
     HowManyText.Text = "How Many Letters In The Word?";
 }
Beispiel #12
0
 void Start()
 {
     fws = fws.GetComponent <Light>();
     ShowMovesButton.GetComponent <Button> ();
     PlayButton.GetComponent <Button> ();
     ReplayButton.GetComponent <Button> ();
     PlayButtonText      = PlayButton.transform.Find("Text").GetComponent <Text>();
     ShowMovesButtonText = ShowMovesButton.transform.Find("Text").GetComponent <Text> ();
     keimenaki           = omilia.transform.Find("omilia").GetComponent <Text> ();
     tip1                    = tip01.transform.Find("tip1").GetComponent <Text> ();
     tip2                    = tip02.transform.Find("tip2").GetComponent <Text> ();
     next                    = tip02.transform.Find("Symbol-forward").GetComponent <Text> ();
     previous                = tip01.transform.Find("Symbol-back").GetComponent <Text> ();
     ButtonBasic.enabled     = false;
     ButtonTurn.enabled      = false;
     ButtonPromenade.enabled = false;
     ButtonNewYork.enabled   = false;
     start.enabled           = false;
     omilia.enabled          = false;
     odhgies.enabled         = false;
     replay.enabled          = false;
     play.enabled            = false;
     end.enabled             = false;
     StartCoroutine("talk");
     StartCoroutine("emfanish");
     tip2.text     = "";
     previous.text = "";
     v             = moves.transform.position.y;
 }
Beispiel #13
0
    private void Start()
    {
        isMuted = MusicHandler.Instance._audioSource.mute;
        if (_muteButton)
        {
            ChangeButtonSprite(_muteButton);
        }


        if (PlayButton == null)
        {
            return;
        }

        if (Application.platform == RuntimePlatform.Android ||
            Application.platform == RuntimePlatform.IPhonePlayer
            )

        {
            PlayButton.SetActive(false);
        }
        else
        {
            PlayButton.SetActive(true);
        }
    }
Beispiel #14
0
 private void Start()
 {
     playButton    = new PlayButton(playBtnObj);
     restartButton = new RestartButton(restartBtnObj);
     restartButton.SetActive(Button.ButtonActive.Disabled);
     Time.timeScale = 0;
 }
    public void PlayTraj()
    {
        PlayButton.SetActive(false);
        PauseButton.SetActive(true);


        FrameSlider.maxValue = framenum - 1;
        FrameSlider.minValue = 0;

        SpeedSlider.maxValue = 100;
        SpeedSlider.minValue = 0;
        SpeedSlider.value    = 25;


        //FrameSlider.GetComponent<SliderGestureControl>().SetSpan(0, framenum - 1);
        //SpeedSlider.GetComponent<SliderGestureControl>().SetSpan(0, 100);
        //SpeedSlider.GetComponent<SliderGestureControl>().SetSliderValue(25);s

        //Time.timeScale = 1;
        //GameObject.Find("PlayButton").AddComponent<PlayButton2>();

        // gets the total number of frames from Load
        //framenum = Manager.GetComponent<Load>().framenum;


        StartCoroutine("Traj");
    }
    /*
     * public void Update()
     * {
     *  i = Convert.ToInt32(slider.value);
     * }
     */

    public void StopTraj()
    {
        PlayButton.SetActive(true);
        PauseButton.SetActive(false);
        StopCoroutine("Traj");

        //Time.timeScale = 0;// try not both stopping it and adjusting the timescale
    }
Beispiel #17
0
 private void Start()
 {
     Debug.Log("shipPart");
     levelLoader = GameObject.FindWithTag("ButtonHendler").GetComponent <PlayButton>();
     player      = GameObject.FindWithTag("Player");
     interactKey = this.transform.Find("E").gameObject;
     interactKey.SetActive(false);
 }
        void ReleaseDesignerOutlets()
        {
            if (AnimatedImageView != null)
            {
                AnimatedImageView.Dispose();
                AnimatedImageView = null;
            }

            if (LivePhotoView != null)
            {
                LivePhotoView.Dispose();
                LivePhotoView = null;
            }

#if __TVOS__
            if (LivePhotoPlayButton != null)
            {
                LivePhotoPlayButton.Dispose();
                LivePhotoPlayButton = null;
            }
#endif

            if (ImageView != null)
            {
                ImageView.Dispose();
                ImageView = null;
            }

            if (Space != null)
            {
                Space.Dispose();
                Space = null;
            }

            if (TrashButton != null)
            {
                TrashButton.Dispose();
                TrashButton = null;
            }

            if (PlayButton != null)
            {
                PlayButton.Dispose();
                PlayButton = null;
            }

            if (EditButton != null)
            {
                EditButton.Dispose();
                EditButton = null;
            }

            if (ProgressView != null)
            {
                ProgressView.Dispose();
                ProgressView = null;
            }
        }
Beispiel #19
0
    private void Start()
    {
        switch (Cave)
        {
        case cave.cave1:
            if (cave1closed)
            {
                GetComponent <SpriteRenderer>().sprite       = closed;
                this.GetComponent <DungeonEntrace>().enabled = false;
            }
            break;

        case cave.cave2:
            if (cave2closed)
            {
                GetComponent <SpriteRenderer>().sprite       = closed;
                this.GetComponent <DungeonEntrace>().enabled = false;
            }
            break;

        case cave.cave3:
            if (cave3closed)
            {
                GetComponent <SpriteRenderer>().sprite       = closed;
                this.GetComponent <DungeonEntrace>().enabled = false;
            }
            break;

        case cave.cave4:
            if (cave4closed)
            {
                GetComponent <SpriteRenderer>().sprite       = closed;
                this.GetComponent <DungeonEntrace>().enabled = false;
            }
            break;

        default:
            break;
        }
        levelLoader = GameObject.FindWithTag("ButtonHendler").GetComponent <PlayButton>();
        player      = GameObject.FindWithTag("Player");
        interactKey = this.transform.Find("E").gameObject;
        interactKey.SetActive(false);
        if (!shuffled)
        {
            ShuffleArray(shipParts);
            SHIPPARTS = shipParts;
            shuffled  = true;
        }
        if (amountOfFloors == currentFloor)
        {
            Debug.Log("part spawned");
            Instantiate(SHIPPARTS[partToSpawn], this.transform.position, this.transform.rotation);
            Destroy(this.gameObject);
            currentFloor = 0;
        }
    }
Beispiel #20
0
 protected override void CreateAllButtonsByOrder()
 {
     // Create Buttons
     m_ScreenSettingsButton = new ScreenSettingsButton(ScreenMenu, this, m_ScreenSettingsScreen);
     m_PlayerNumberButton   = new PlayerNumberButton(ScreenMenu);
     m_SoundSettingsButton  = new SoundSettingsButton(ScreenMenu, this, m_SoundSettingsScreen);
     m_PlayButton           = new PlayButton(ScreenMenu, this);
     m_QuitButton           = new QuitButton(ScreenMenu);
 }
Beispiel #21
0
 public Form1()
 {
     InitializeComponent();
     PlayButton.Hide();
     numericUpDown1.Hide();
     GuessCountLabel.Hide();
     WinningGif.Hide();
     GuessButton.Hide();
 }
        void ReleaseDesignerOutlets()
        {
            if (ArtistName != null)
            {
                ArtistName.Dispose();
                ArtistName = null;
            }

            if (BackgroundImage != null)
            {
                BackgroundImage.Dispose();
                BackgroundImage = null;
            }

            if (NextButton != null)
            {
                NextButton.Dispose();
                NextButton = null;
            }

            if (PartyCodeLabel != null)
            {
                PartyCodeLabel.Dispose();
                PartyCodeLabel = null;
            }

            if (PlayButton != null)
            {
                PlayButton.Dispose();
                PlayButton = null;
            }

            if (PreviousButton != null)
            {
                PreviousButton.Dispose();
                PreviousButton = null;
            }

            if (SongNameLabel != null)
            {
                SongNameLabel.Dispose();
                SongNameLabel = null;
            }

            if (SongProgressView != null)
            {
                SongProgressView.Dispose();
                SongProgressView = null;
            }

            if (SongsView != null)
            {
                SongsView.Dispose();
                SongsView = null;
            }
        }
Beispiel #23
0
        private void ButtonPlay_Click(object sender, EventArgs e)
        {
            DeckPickerTrayDisplay deckPickerTrayDisplay = DeckPickerTrayDisplay.Get();
            PlayButton            playButton            = deckPickerTrayDisplay.m_playButton;
            UberText newPlayButtonText2 = playButton.m_newPlayButtonText;
            Vector3  center             = newPlayButtonText2.m_TextMeshGameObject.Renderer.Bounds.m_Center;

            //DefaultBot.ilog_0.InfoFormat("[TournamentScene_DeckPicker] Now clicking the \"{0}\" button.", newPlayButtonText2.Text);
            Client.LeftClickAt(center);
        }
Beispiel #24
0
        public void OnTrackableStateChanged(
			TrackableBehaviour.Status previousStatus,
			TrackableBehaviour.Status newStatus)
        {
            if (newStatus == TrackableBehaviour.Status.DETECTED ||
                newStatus == TrackableBehaviour.Status.TRACKED)
            {
                //if tracked, show UI
                modelUI.SetActive(true);

                //check if other UIs are active, adjust accordingly
                /*visibleBars = GameObject.FindGameObjectsWithTag("UI-bar").Length;

                if (visibleBars == 2)
                {
                    stackOrder = 2;
                    modelUI.GetComponent<RectTransform>().sizeDelta = uiDimensions[stackOrder-1];
                }
                if (visibleBars == 3)
                {
                    stackOrder = 3;
                    modelUI.GetComponent<RectTransform>().sizeDelta = uiDimensions[stackOrder-1];
                }*/
            }
            else if (modelUI != null)
            {
                //if image target lost, hide UI
                modelUI.SetActive(false);

                //reset UI location
                //modelUI.GetComponent<RectTransform>().sizeDelta = stackOrder1;

                //if playing animation, stop animation, change icon
                playButton = targetModel.GetComponent<PlayButton>();
                if(playButton.firstPress)
                    playButton.Clicked();
            }
        }
Beispiel #25
0
	// Use this for initialization
	void Start () 
	{
		_scrubber = GameObject.FindGameObjectWithTag("Scrubber").GetComponent<Scrubber>();
		_scrubber.OnScrubValueChanged += OnScrubValueChanged;
		
		_sail = GameObject.FindGameObjectWithTag("Sail");
		_animState = _sail.animation[_sail.animation.clip.name];
		_animState.speed = 0.0f;
		_sail.animation.Play();
		
		_playButton = GameObject.Find("PlayButton").GetComponent<PlayButton>();
		
		OnScrubValueChanged(0f);
		
		foreach(MegaPointCache MPC in _sail.GetComponentsInChildren<MegaPointCache>())
		{
			if(MPC.maxtime >= _animLoopTime)
				_animLoopTime = MPC.maxtime;
		}
		
		if(_animState.length > _animLoopTime)
			_animLoopTime = _animState.length;
	}
Beispiel #26
0
 public void PlayButtonEnter(PlayButton button)
 {
 }
Beispiel #27
0
	public void Start()
	{
		scrollPosition.y = minScrub;
		renderer.material.mainTextureOffset = scrollPosition;
		_playButton = GameObject.Find("PlayButton").GetComponent<PlayButton>();
	}
Beispiel #28
0
 public void PlayButtonExit(PlayButton button)
 {
 }