public void ShowHitVFX(Transform hitTransform)
    {
        GameObject hitVFXObject = objectPool.GetPooledObject();

        hitVFXObject.transform.SetPositionAndRotation(hitTransform.position, hitTransform.rotation);
        hitVFXObject.SetActive(true);
    }
예제 #2
0
    void ShootProjectile()
    {
        GameObject newProjectile = projectileObjectPool.GetPooledObject();

        newProjectile.transform.position = projectileSpawnTransform.position;
        newProjectile.transform.rotation = projectileSpawnTransform.rotation;
        newProjectile.SetActive(true);
    }
예제 #3
0
    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);
    }