public void ShowHitVFX(Transform hitTransform) { GameObject hitVFXObject = objectPool.GetPooledObject(); hitVFXObject.transform.SetPositionAndRotation(hitTransform.position, hitTransform.rotation); hitVFXObject.SetActive(true); }
void ShootProjectile() { GameObject newProjectile = projectileObjectPool.GetPooledObject(); newProjectile.transform.position = projectileSpawnTransform.position; newProjectile.transform.rotation = projectileSpawnTransform.rotation; newProjectile.SetActive(true); }
public void ShowNumber(int numberAmount, Transform numberTransform, Color numberColor) { GameObject numberObject = objectPool.GetPooledObject(); Vector3 newPosition = numberTransform.position + RandomOffsetRange(positionRandomOffsetRange); numberObject.GetComponent <NumberDisplayBehaviour>().SetupDisplay(numberAmount, newPosition, numberColor); numberObject.SetActive(true); }