public virtual IEnumerator PlayAnimationRoutine()
    {
        isPlayingAnimation = true;
        LuaScript script = anim.ToScript(GetComponent <LuaContext>());

        GetComponent <LuaContext>().SetGlobal("target", target);
        yield return(script.RunRoutine());

        isPlayingAnimation = false;
    }
    public virtual IEnumerator PlayAnimationRoutine(LuaContext context = null)
    {
        if (context == null)
        {
            context = GetComponent <LuaContext>();
        }
        isPlayingAnimation = true;
        LuaScript script = anim.ToScript(context);

        context.SetGlobal("target", target);
        yield return(script.RunRoutine());

        isPlayingAnimation = false;
    }