示例#1
0
    private void SpawnVfx(VfxPool pool, PoolableVfx key, Tile tile)
    {
        var instance = pool.RequestSinglePoolable(key);

        instance.transform.position = tile.GetWorldPosition();
        instance.Play();
    }
示例#2
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
         PrepareVFX();
     }
     else
     {
         Destroy(gameObject);
     }
 }