public void UpdateTime()
    {
        if (active_animation_name == null || active_animation_name.Length == 0)
        {
            active_animation_name = pack_player.data.GetFirstAnimClipName();
        }

        float real_time_scale = Application.isPlaying ? local_time_scale : 0.0f;
        float time_delta      = (Time.deltaTime * real_time_scale);

        if (!should_play)
        {
            time_delta = 0.0f;
        }

        if (compositeClipActive())
        {
            var comp_data = pack_asset.composite_player.composite_clips;
            if (comp_data.ContainsKey(composite_anim))
            {
                pack_asset.composite_player.update(time_delta, pack_player, should_loop);
            }
        }
        else
        {
            pack_player.isLooping = should_loop;
            pack_player.isPlaying = true;
            pack_player.stepTime(time_delta);
        }

        pack_player.syncRenderData();
    }
Exemple #2
0
    public void UpdateTime()
    {
        if (active_animation_name == null || active_animation_name.Length == 0)
        {
            active_animation_name = pack_player.data.GetFirstAnimClipName();
        }


        float time_delta = (Time.deltaTime * local_time_scale);

        if (!should_play)
        {
            time_delta = 0.0f;
        }

        pack_player.isLooping = should_loop;
        pack_player.isPlaying = true;
        pack_player.stepTime(time_delta);
        pack_player.syncRenderData();
    }