예제 #1
0
    // Update is called once per frame
    void Update()
    {
        float totalTime = Time.timeSinceLevelLoad;
        float deltaTime = Time.deltaTime;

        // first clean up all dead particles
        ParticleManager.DeactivateZombies();

        // then generate new ones
        Generator.Generate(deltaTime);

        // then compute a new state for all the existing ones
        foreach (Animator anim in _animators)
        {
            anim.Update(totalTime, deltaTime);
        }
    }