generic pool made
This commit is contained in:
@@ -4,13 +4,14 @@ using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using VContainer;
|
||||
|
||||
public class Platform : MonoBehaviour, IPlatform
|
||||
public class Platform : MonoBehaviour, IPlatform , IPoolable
|
||||
{
|
||||
[SerializeField] private List<GameObject> _platformPiece = new List<GameObject>();
|
||||
[SerializeField] private Material _safeMaterial;
|
||||
[SerializeField] private Material _deathMaterial;
|
||||
[SerializeField] private ParticleSystem _particleSystem;
|
||||
|
||||
//for selecting random color
|
||||
[SerializeField]private Color[] safeMaterialColors;
|
||||
[SerializeField] private Color[] deathMaterialColors;
|
||||
|
||||
@@ -75,7 +76,15 @@ public class Platform : MonoBehaviour, IPlatform
|
||||
}
|
||||
}
|
||||
|
||||
public void OnSpawn()
|
||||
{
|
||||
hasAchievedScore = false;
|
||||
}
|
||||
|
||||
public void OnDespawn()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user