void Start() { gameManager = GameManager.Instance; stageManager = FindObjectOfType <StageManager>(); poolManager = FindObjectOfType <UnitPooling>(); spawnPosition = gameManager.GetUnitSpawnPosition(); spawnCostText = transform.GetChild(1).GetComponent <Text>(); }
void Start() { fusionManager = FindObjectOfType <FusionManager>(); stageManager = FindObjectOfType <StageManager>(); poolManager = FindObjectOfType <UnitPooling>(); levelText = Lev.GetComponent <TextMesh>(); mapSliderScript = FindObjectOfType <MapSliderScript>(); _unitOnMiniMap = Instantiate(unitOnMiniMap.gameObject, GameObject.Find("MapSlider").transform); UnitOnMiniMapScript unitOnMiniMapScript = _unitOnMiniMap.GetComponent <UnitOnMiniMapScript>(); unitOnMiniMapScript.targetObject = gameObject; unitOnMiniMapScript.targetUnitTrm = gameObject.transform; SpawnSet(); }