private void SpawnVfx(VfxPool pool, PoolableVfx key, Tile tile) { var instance = pool.RequestSinglePoolable(key); instance.transform.position = tile.GetWorldPosition(); instance.Play(); }
private void Awake() { if (instance == null) { instance = this; PrepareVFX(); } else { Destroy(gameObject); } }