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); }
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); }
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); }
private void Start() { hasSpawnedPrize = true; leftEdge = ScreenPositionService.GetLeftEdge(Camera.main); rightEdge = ScreenPositionService.GetRightEdge(Camera.main); }