private bool closeBox(TouchType eventtype, TouchRect touchbox, int x, int y, bool collide) { if (eventtype == TouchType.TouchDown) { if (State.ShowingTutorial > 0) { State.ShowingTutorial++; Client.PlaySoundEffect(Assets.Sounds.Click); if (State.ShowingTutorial > 2) { State.ShowingTutorial = 0; } return(false); } if (State.AboutState == AboutState.Opened) { Client.PlaySoundEffect(Assets.Sounds.Click); State.AboutState = AboutState.Closing; AboutCloseAnimation.Restart(); AboutCloseDialogAnimation.Restart(); return(false); } return(true); } return(true); }
public bool toggleOpening(TouchType eventtype, TouchRect touchbox, int x, int y, bool collide) { if (State.StartClicked) { return(false); } if (eventtype == TouchType.TouchDown) { if (State.AboutState == AboutState.Opened) { Client.PlaySoundEffect(Assets.Sounds.Click); State.AboutState = AboutState.Closing; AboutCloseAnimation.Restart(); AboutCloseDialogAnimation.Restart(); } else if (State.AboutState == AboutState.Closed) { Client.PlaySoundEffect(Assets.Sounds.Click); State.AboutState = AboutState.Opening; AboutOpenAnimation.Restart(); AboutOpenDialogAnimation.Restart(); } return(true); } return(false); }