Beispiel #1
0
    public static void StopGhostFX(GameObject target)
    {
        GhostFX gFX = target.GetComponent <GhostFX>();

        if (gFX != null)
        {
            gFX.StopAllCoroutines();
            Destroy(gFX);
        }
    }
Beispiel #2
0
    public static void EnableGhostFX(GameObject target, Material ghostMaterial, float ghostLifetime, float ghostSpawnInterval, float effectDuration = -1)
    {
        if (target.GetComponent <GhostFX>() != null)
        {
            return;
        }
        GhostFX gFX = target.AddComponent <GhostFX>();

        gFX.StartCoroutine(gFX.SpawnGhost_C(target, ghostMaterial, effectDuration, ghostLifetime, ghostSpawnInterval, 0));
    }