コード例 #1
0
        public void CreateGame()
        {
            SetTextLevel();

            transformVectorLines = new List <Transform> ();

            canShoot = false;

            cam.orthographicSize   = 20f;
            cam.transform.position = new Vector3(0, 0, -10);

            StopAllCoroutines();

            isGameOver               = true;
            cam.backgroundColor      = this.BackgroundColor;        //this.GRAY;
            CircleCenterSprite.color = this.DotColor;

            Level l = LevelManagerAB.GetLevel(levelPlayed);

            numberDotsOnCircle = l.numberDotsOnCircle;
            numberDotsToCreate = l.numberDotsToCreate;

            rotateCircleDelay = l.rotateDelay;
            easeType          = l.rotateEaseType;
            loopType          = l.rotateLoopType;

            centerCircle = 0 * height / 4.5f;

            CIRCLE.position = new Vector3(0, centerCircle, 0);

            positionTouchBorder = centerCircle - l.sizeRayonRation * CIRCLE.GetChild(0).GetComponent <SpriteRenderer>().bounds.size.y;

            rotateVectorTOP = new Vector3(0, 0, 1);

            if (Level % 2 == 0)
            {
                rotateVectorTOP = new Vector3(0, 0, -1);
            }

            CIRCLE.rotation = Quaternion.Euler(Vector3.zero);

            DOTS_PARENT.rotation = Quaternion.Euler(Vector3.zero);

            DOTS_PARENT.localScale = Vector3.one;

            levelText.text = "LEVEL " + levelPlayed;

            CreateDotOnCircle();

            CreateListDots();

            StartCoroutine(PositioningDots());

            PositioningCamera();
        }
コード例 #2
0
        void Awake()
        {
            self = this;

            int level = PlayerPrefs.GetInt("LEVEL_PLAYED");

            if (level > 1200)
            {
                PlayerPrefs.SetInt("LEVEL_PLAYED", 1200);
            }
        }