public void OnSharePressed() { VSSHARE.self.useCustomShareText = true; VSSHARE.self.customShareText = "#cytoid"; VSSHARE.DOTakeScreenShot(); VSSHARE.OnScreenshotTaken -= ShareScreenshot; VSSHARE.OnScreenshotTaken += ShareScreenshot; }
/// <summary> /// Animation when the player lose /// </summary> public void AnimationCameraGameOver() { if (isGameOver) { return; } #if VS_SHARE VSSHARE.DOTakeScreenShot(); #endif ShowAds(); DOTween.KillAll(); soundManager.PlaySoundFail(); isGameOver = true; isGameOver = true; StopAllCoroutines(); playerCanShoot = false; if (OnFailStart != null) { OnFailStart(); } Color colorFrom = constant.BackgroundColor; Color colorTo = constant.FailColor; float delay = 0.3f; Camera.main.backgroundColor = colorFrom; Camera.main.DOColor(colorTo, delay).OnComplete(() => { DOVirtual.DelayedCall(delay, () => { if (OnFailComplete != null) { OnFailComplete(); } }); Camera.main.DOColor(colorFrom, delay).SetDelay(delay).OnComplete(() => { Camera.main.DOColor(colorFrom, delay).SetDelay(delay / 2).OnComplete(() => { }); }); }); Camera.main.transform.DOShakePosition(delay, 1, 10, 90, false); }
/// <summary> /// Animation when the player cleared the level /// </summary> public void AnimationCameraSuccess() { if (isGameOver) { return; } #if VS_SHARE VSSHARE.DOTakeScreenShot(); #endif ShowAds(); ReportScoreToLeaderboard(this.LEVEL.levelNumber); playerCanShoot = false; soundManager.PlaySoundSuccess(); isGameOver = true; if (OnSuccessStart != null) { OnSuccessStart(); } Color colorFrom = constant.BackgroundColor; //Color colorFrom = constant.BackgroundColors[UnityEngine.Random.Range(0, constant.BackgroundColors.Length)]; Color colorTo = constant.SuccessColor; float delay = 0.10f; Camera.main.backgroundColor = colorFrom; Camera.main.DOColor(colorTo, delay); CircleBorder.DOScale(Vector3.one * 2f, delay * 4).OnComplete(() => { CircleBorder.DOScale(Vector3.one, delay * 4).OnComplete(() => { Camera.main.DOColor(colorFrom, delay); }); if (OnSuccessComplete != null) { OnSuccessComplete(); } }); }
void LevelCleared() { ShowAds(); #if VS_SHARE VSSHARE.DOTakeScreenShot(); #endif PlaySoundSuccess(); isGameOver = true; canShoot = false; DOColorSuccess(() => { RestartLevel(true); }); }
/// <summary> /// Method called when the player loses. We will fade out all the in game elements(the 4 big dots, and the player ball) and restart the scene. /// </summary> void DOGameOver() { InputTouch.OnTouched -= OnTouched; FindObjectOfType <AppAdvisory.UI.UIController>().DOTakeScreenshotWithVerySimpleShare(); isGameOver = true; isStarted = false; PlaySoundLose(); StopAllCoroutines(); DOTween.KillAll(); Utils.SetBest(point); Utils.SetLast(point); player.DOMoveY(Mathf.Sign(player.transform.position.y) * Mathf.Abs(dotUpPink.position.y - decal) * 3, timeToMoveFromTopToBottom * 2) .SetEase(Ease.Linear); textScore.DOFade(0f, timeToMoveFromTopToBottom * 1.5f); DOVirtual.Float(1f, 0f, timeToMoveFromTopToBottom * 1.5f, delegate(float value) { textScore.SetAlpha(value); DOAlphaDots(value); }) .OnComplete(() => { SetInGameElementsActive(false); Utils.ReloadLevel(); }); ReportScoreToLeaderboard(point); FindObjectOfType <AppAdvisory.UI.UIController>().textLast.text = "LAST\n" + Utils.GetLast(); FindObjectOfType <AppAdvisory.UI.UIController>().textBest.text = "BEST\n" + Utils.GetBest(); ShowAds(); #if VS_SHARE VSSHARE.DOTakeScreenShot(); #endif }
void GameOver() { ShowAds(); #if VS_SHARE VSSHARE.DOTakeScreenShot(); #endif DOTween.KillAll(); StopAllCoroutines(); PlaySoundFail(); isGameOver = true; canShoot = false; DOColorFail(() => { RestartLevel(false); }); }
public void DOGameOver() { Util.SetLastScore(point); FindObjectOfType <UIController>().SetBestText(Util.GetBestScore()); FindObjectOfType <UIController>().SetLastText(Util.GetLastScore()); ShowAds(); #if VS_SHARE VSSHARE.DOTakeScreenShot(); #endif #if APPADVISORY_LEADERBOARD LeaderboardManager.ReportScore(point); #endif InputTouch.OnTouchedDown -= OnTouchedDown; #if AADOTWEEN DOTween.KillAll(); #endif PlaySoundFX_DoorMiss(); #if AADOTWEEN Camera.main.DOOrthoSize(Camera.main.orthographicSize * 0.9f, 0.1f) .SetLoops(5, LoopType.Yoyo) .OnComplete(() => { Camera.main.DOOrthoSize(Camera.main.orthographicSize * 0.01f, 1f) .OnComplete(() => { Util.ReloadLevel(); }); }); #endif }
public void DOTakeScreenshotWithVerySimpleShare() { #if VS_SHARE VSSHARE.DOTakeScreenShot(); #endif }
public void OnButtonPress() { VSSHARE.DOTakeScreenShot(); countdown = 5; }