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

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

        isPlayingAnimation = false;
    }
Esempio n. 2
0
    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;
    }