public void RegisterBrother(SpiderlingBattle newBrother) { if (spiderBrotherOne == null) { spiderBrotherOne = newBrother; } else { spiderBrotherTwo = newBrother; } diceKeyNumber++; if (diceKeyGO != null) { diceKeyImage.sprite = battleSystem.diceSprites[diceKeyNumber - 1]; diceKeyGO.SetDKNumber(diceKeyNumber); } }
public IEnumerator SpawnSpiderling() { if (spiderlingCount == 0) { spiderlingCount++; yield return(StartCoroutine(battleSystem.SpawnNewMonster(spiderlingPrefab))); } else if (spiderlingCount > 0) { spiderlingCount++; SpiderlingBattle firstSpiderling = FindObjectOfType <SpiderlingBattle>(); Instantiate(spiderlingChildPrefab, firstSpiderling.transform.parent); } yield return(null); }