// Start is called before the first frame update void Start() { shapeCount = Random.Range(0, 5); this.gameObject.tag = "ShapeSwitcher"; screenBounds = Camera.main.ScreenToWorldPoint(new Vector2(Screen.width, Screen.height)); switcherRenderer = this.gameObject.transform.GetChild(0).GetComponent <SpriteRenderer>(); shapeSpawner = GameObject.Find("Shape Spawner").GetComponent <ShapeSpawner>(); shapeSprites = shapeSpawner.shapeSprites; StartCoroutine(ChangeShape()); }
// Start is called before the first frame update void Start() { _gameField = new Transform[fieldWidth, fieldHeight]; _spawner = spawnPoint.GetComponent <ShapeSpawner>(); _spawner.Init(); _currentMovementDeltaTime = baseMovementDeltaTime; gameSpeedText.text = _gameSpeedCoef.ToString("F2"); scoresText.text = _totalScores.ToString(); linesRemovedText.text = _linesRemoved.ToString(); SpawnShape(); }
void Start() { _gameGrid = GameObject.FindWithTag("GameGrid").GetComponent <GameGrid>(); _shapeSpawner = GameObject.FindWithTag("ShapeSpawner").GetComponent <ShapeSpawner>(); cameraRig = GameObject.Find("CameraRig").GetComponent <CameraRig>(); foreach (Transform child in transform) { var block = child.GetComponent <Block>(); if (block != null) { blocks.Add(child.GetComponent <Block>()); } } }
// Use this for initialization void Start() { m_spawner = GameObject.Find("LogicObjects").GetComponent <ShapeSpawner>(); }
private void Awake() { spawner = GameObject.Find("Spawner").GetComponent <ShapeSpawner>(); }
private void Start() { shapeSpawner = FindObjectOfType <ShapeSpawner>(); }
void Start() { Time.timeScale = 1; _shapeSpawner = GameObject.FindWithTag("ShapeSpawner").GetComponent <ShapeSpawner>(); }
public void SetSpawner(ShapeSpawner _spawner) { m_spawner = _spawner; }