Browse Source

destroy baby, spawn 2 new babies

develop
Jordan 3 years ago
parent
commit
80b34da3a7
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      Assets/ParentBehaviour.cs

+ 7
- 0
Assets/ParentBehaviour.cs View File

@ -214,6 +214,13 @@ public class ParentBehaviour : MonoBehaviour
//this is the correct child
GameObject player = collision.collider.gameObject.GetComponent<YeetHandle>().lastHeld;
player.GetComponent<PlayerDataHolder>().AddScore(1);
//destroy baby, spawn 2 more
Destroy(collision.collider.gameObject);
babySpawner.SpawnBaby();
babySpawner.SpawnBaby();
//Slide, cha cha real smooth
StartCoroutine(SlideInOut(parentRoot.position + slideDistance, 2));
}
else

Loading…
Cancel
Save