Beispiel #1
0
    public void FixedUpdateCustom(float deltaTime)
    {
#if UNITY_EDITOR
        if (UseSubEmitters && !EditorApplication.isPlaying)
        {
            Debug.LogWarning("Effect Layer:" + gameObject.name + " has sub emitters, it can't be updated in editor mode, please play the game to see the results.");
            return;
        }
#endif

        //Version 2.2.0, update the camera when new level is loaded.
        if (MyCamera == null)
        {
            FindMyCamera();
            ResetCamera(MyCamera);
        }

        int needToAdd = emitter.GetNodes(deltaTime);
        AddNodes(needToAdd);
        for (int i = 0; i < MaxENodes; i++)
        {
            EffectNode node = ActiveENodes[i];
            if (node == null)
            {
                continue;
            }
            node.Update(deltaTime);
        }
    }
Beispiel #2
0
    public void FixedUpdateCustom()
    {
        int nodes = this.emitter.GetNodes();

        this.AddNodes(nodes);
        for (int i = 0; i < this.MaxENodes; i++)
        {
            EffectNode node = this.ActiveENodes[i];
            if (node != null)
            {
                node.Update();
            }
        }
    }
    public void FixedUpdateCustom(float deltaTime)
    {
        int needToAdd = emitter.GetNodes(deltaTime);

        AddNodes(needToAdd);
        for (int i = 0; i < MaxENodes; i++)
        {
            EffectNode node = ActiveENodes[i];
            if (node == null)
            {
                continue;
            }
            node.Update(deltaTime);
        }
    }
Beispiel #4
0
    public void FixedUpdateCustom(float deltaTime)
    {
        //Version 2.2.0, update the camera when new level is loaded.
        if (MyCamera == null)
        {
            FindMyCamera();
            ResetCamera(MyCamera);
        }

        int needToAdd = emitter.GetNodes(deltaTime);

        AddNodes(needToAdd);
        for (int i = 0; i < MaxENodes; i++)
        {
            EffectNode node = ActiveENodes[i];
            if (node == null)
            {
                continue;
            }
            node.Update(deltaTime);
        }
    }