Пример #1
0
        private void Start()
        {
            Vector3 screenBottom = ScreenPositionService.GetBottomEdge(Camera.main);

            redZoneStart = new Vector3(screenBottom.x, 0, screenBottom.z);
            UpdateScore();
        }
        private void Start()
        {
            leftEdge   = ScreenPositionService.GetLeftEdge(Camera.main).x;
            rightEdge  = ScreenPositionService.GetRightEdge(Camera.main).x;
            topEdge    = ScreenPositionService.GetTopEdge(Camera.main).y;
            bottomEdge = ScreenPositionService.GetBottomEdge(Camera.main).y;

            SetPosition();
        }
 protected virtual void Start()
 {
     wallsManager     = GameObject.Find("WallsManager").GetComponent <WallsManager>();
     enemyController  = GetComponent <EnemyController>();
     screenTopEdge    = ScreenPositionService.GetTopEdge(Camera.main);
     screenLeftEdge   = ScreenPositionService.GetLeftEdge(Camera.main);
     screenRightEdge  = ScreenPositionService.GetRightEdge(Camera.main);
     screenBottomEdge = ScreenPositionService.GetBottomEdge(Camera.main);
 }
Пример #4
0
        private void Start()
        {
            topEdge    = ScreenPositionService.GetTopEdge(Camera.main);
            bottomEdge = ScreenPositionService.GetBottomEdge(Camera.main);

            var originalLeftEdge  = ScreenPositionService.GetLeftEdge(Camera.main);
            var originalRightEdge = ScreenPositionService.GetRightEdge(Camera.main);

            leftEdge  = new Vector3(originalLeftEdge.x + 1.5f, originalLeftEdge.y);
            rightEdge = new Vector3(originalRightEdge.x - 1.5f, originalRightEdge.y);
        }
Пример #5
0
        private void Start()
        {
            //we multiply by 2 since we want the bottom of the background to hit the screenTop
            //for such, the top of the background has to hit two the size of the screen top.
            screenTop = ScreenPositionService.GetTopEdge(Camera.main).y * 2;
            currentBackgroundContext = BackgroundContextEnum.Surface_1;
            currentBackground        = BackgroundService.GetBackground(backgroundsPool, currentBackgroundContext);
            BackgroundService.SetPropsForBackgroundContext(backgroundPropsPool, ref currentBackground);


            StartCoroutine(SlideBackground());
        }
        Vector3 GetPositionToSpawnEnemy()
        {
            Vector3 newPos = new Vector3(
                RandomValueTool.GetRandomValue
                (
                    (int)ScreenPositionService.GetLeftEdge(Camera.main).x,
                    (int)ScreenPositionService.GetRightEdge(Camera.main).x
                ),
                screenBottomEdge.y - RandomValueTool.GetRandomValue(5, 15) + y_Position,
                z_Position);

            return(newPos);
        }
Пример #7
0
 private void Start()
 {
     hasSpawnedPrize = true;
     leftEdge        = ScreenPositionService.GetLeftEdge(Camera.main);
     rightEdge       = ScreenPositionService.GetRightEdge(Camera.main);
 }