コード例 #1
0
        /// <summary>
        /// Method called by the UIController (have a look to the UIController GameObject editor, in the "On UI Anim Out End".
        /// </summary>
        public void DOStart()
        {
                        #if VS_SHARE
            VSSHARE.DOHideScreenshotIcon();
                        #endif

            InputTouch.OnTouched += OnTouched;

            if (dotUpBlue.position.x <= 0.01f && dotUpBlue.position.x >= -0.01f)
            {
                currentColorUp   = DotColor.Blue;
                currentColorDown = DotColor.Pink;
            }
            else
            {
                currentColorUp   = DotColor.Pink;
                currentColorDown = DotColor.Blue;
            }

            player.GetComponent <DotBase>().SetColor(currentColorUp);

            isStarted  = true;
            isGameOver = false;

            StopAllCoroutines();

            point = 0;

            player.DOMoveY(dotUpPink.position.y - decal, timeToMoveFromTopToBottom / 2f).SetEase(Ease.Linear).OnComplete(DOMovePlayer);
        }
コード例 #2
0
        public void OnClickedStart()
        {
                        #if VS_SHARE
            VSSHARE.DOHideScreenshotIcon();
                        #endif

            PlaySoundFX_Start();

            player.EnableShadows(false);

            player.DOActivate();

            Camera.main.transform.parent = null;

            var savePos = player.transform.position;

            player.transform.position = savePos + Vector3.up * 10;

                        #if AADOTWEEN
            player.transform.DOMove(savePos, 1)
            .SetEase(Ease.OutBounce)
            .OnComplete(() => {
                Camera.main.transform.parent = player.transform;
                DOPlayerMove();

                player.EnableShadows(true);
            });
                        #endif
        }
コード例 #3
0
        public void OnclickedPlay()
        {
            Application.targetFrameRate = 60;
            GC.Collect();
            Time.fixedDeltaTime   = 1f / 60f;
            Time.maximumDeltaTime = 3 * Time.fixedDeltaTime;

            success    = false;
            canShoot   = true;
            isGameOver = false;

            LaunchRotateCircle();

            foreach (SpriteRenderer s in allSprites)
            {
                s.color = BackgroundColor;
                                #if AADOTWEEN
                s.DOColor(DotColor, 0.3f)
                .SetEase(Ease.Linear);
                                #endif
            }

                        #if VS_SHARE
            VSSHARE.DOHideScreenshotIcon();
                        #endif
        }
コード例 #4
0
        /// <summary>
        /// Method to shoot the first dot and moving the other. This method check if the list of dots to shoot is empty or not. If the list is empty, this method triggered the success for this level.
        /// </summary>
        void ShootDot(DotManager d)
        {
            playerCanShoot = false;

            StopCoroutine("PositioningDots");

            StopCoroutine("MoveStartPositionDot");

            d.GetComponent <Collider2D>().enabled = true;

            soundManager.PlaySoundBeep();

            Dots.Remove(d);

            PositioningDotsToShoot();

            d.GetComponent <Collider2D>().enabled = true;

            d.transform.position = new Vector3(0, -positionTouchBorder + (-0 - 2) * sizeDot, 0);

            d.transform.DOKill();

            d.transform.DOMoveY(-positionTouchBorder, 0.1f).SetEase(Ease.Linear)
            .OnUpdate(() => {
                playerCanShoot = false;
                if (isGameOver)
                {
                    DOTween.Kill(d.transform);
                }
            })
            .OnComplete(() => {
                d.ActivateLine();

                d.transform.parent = CircleBorder;

                playerCanShoot = true;

                if (Dots.Count == 0 && !isGameOver)
                {
                    isSuccess = true;
                }

                if (isSuccess && !isGameOver)
                {
                    AnimationCameraSuccess();
                }

                PositioningDotsToShoot();
            });

                        #if VS_SHARE
            VSSHARE.DOHideScreenshotIcon();
                        #endif
        }
コード例 #5
0
 public void HideVerySimpleShare()
 {
                 #if VS_SHARE
     VSSHARE.DOHideScreenshotIcon();
                 #endif
 }