Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Cách dùng (rất sạch)

📦 Prefab của bạn


public class Bullet : MonoBehaviour, IPoolable
{
    public void OnSpawn()
    {
        Debug.Log("Spawn Bullet");
        thực hiện các logic ban đầu : kiểu như HPEnemy = 100;
    }

    public void OnDespawn()
    {
        Debug.Log("Despawn Bullet");
        ví dụ : dừng animation ...
    }
}

🎯 Spawn


Bullet bullet = PoolManager.Spawn(bulletPrefab);

Hoặc spawn với position + rotation:


Bullet bullet = PoolManager.Spawn(
    bulletPrefab,
    firePoint.position,
    Quaternion.identity
);

♻️ Despawn


PoolManager.Despawn(bullet);

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages