Started adding multiplayer
This commit is contained in:
15
Assets/Scripts/Extensions/MonoBehaviourExtensions.cs
Normal file
15
Assets/Scripts/Extensions/MonoBehaviourExtensions.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace PashaBibko.PenguinChase.Extensions
|
||||
{
|
||||
public static class MonoBehaviourExtensions
|
||||
{
|
||||
public static void DestroyAllChildren(this MonoBehaviour go)
|
||||
{
|
||||
foreach (Transform child in go.transform)
|
||||
{
|
||||
Object.Destroy(child.gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user