void SpawnVFX(float a) { if (a < 2.0f) { GameObject vfx; if (firePoint != null) { vfx = Instantiate(laser, firePoint.transform.position, Quaternion.identity); if (rotateToMouse != null) { vfx.transform.localRotation = rotateToMouse.GetRotation(); } } else { Debug.Log("No Fire Point"); } } else if (a > 1.0f) { GameObject vfx; if (firePoint != null) { vfx = Instantiate(blaster, firePoint.transform.position, Quaternion.identity); if (rotateToMouse != null) { vfx.transform.localRotation = rotateToMouse.GetRotation(); } } else { Debug.Log("No Fire Point"); } } }
void SpawnVFX() { GameObject vfx; vfx = Instantiate(effectToSpawn, firePoint.transform.position, Quaternion.identity); if (rotateToMouse != null) { vfx.transform.localRotation = rotateToMouse.GetRotation(); } }
public void SpawnVFX() { GameObject vfx; if (firePoint != null) { vfx = Instantiate(effectToSpawn, firePoint.transform.position, Quaternion.identity); if (rotateToMouse != null) { vfx.transform.rotation = rotateToMouse.GetRotation(); } } else { Debug.Log("Sem Fire Point"); } }
void SpawnVFX() { GameObject fireVFX; if (source != null) { fireVFX = Instantiate(effectToSpawn, source.transform.position, Quaternion.identity); if (rotateToMouse != null) { fireVFX.transform.localRotation = rotateToMouse.GetRotation(); } } else { Debug.Log("No fire point"); } }
void SpawnVFX() { GameObject vfx; //Determine if the firepoint exists if (firepoint != null) { vfx = Instantiate(effectToSpawn, firepoint.transform.position, Quaternion.identity); if (RotateToMouse != null) { vfx.transform.localRotation = RotateToMouse.GetRotation(); } } else { Debug.Log("No Fire Point found"); } }