|
@ -214,6 +214,13 @@ public class ParentBehaviour : MonoBehaviour |
|
|
//this is the correct child
|
|
|
//this is the correct child
|
|
|
GameObject player = collision.collider.gameObject.GetComponent<YeetHandle>().lastHeld; |
|
|
GameObject player = collision.collider.gameObject.GetComponent<YeetHandle>().lastHeld; |
|
|
player.GetComponent<PlayerDataHolder>().AddScore(1); |
|
|
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)); |
|
|
StartCoroutine(SlideInOut(parentRoot.position + slideDistance, 2)); |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|