Exemple #1
0
 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");
         }
     }
 }
Exemple #2
0
    void SpawnVFX()
    {
        GameObject vfx;

        vfx = Instantiate(effectToSpawn, firePoint.transform.position, Quaternion.identity);
        if (rotateToMouse != null)
        {
            vfx.transform.localRotation = rotateToMouse.GetRotation();
        }
    }
Exemple #3
0
    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");
        }
    }