示例#1
0
 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);
     }
 }
示例#2
0
    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);
    }