예제 #1
0
    public void _40_9_StackChangerFromCoroutineThenEmitEffectiveChanger()
    {
        int frame    = 0;
        var context0 = PlayerContext.Copy(dummyContext);

        var auto0 = new AutoForTest40_3 <PlayerContext, Dictionary <string, PlayerContext> >(frame, context0) as Auto <PlayerContext, Dictionary <string, PlayerContext> >;

        // stack changer from coroutine.
        auto0.Update(frame, new Dictionary <string, PlayerContext>());

        // choose effective (next frame of the changer stacked from coroutine.)
        var stackedChangers = auto0.StackedEffectiveChangers();

        if (stackedChangers.Any())
        {
            var stackedChanger = stackedChangers[0];
            auto0 = auto0.EmitChanger(frame, context0, stackedChanger);
            if (auto0.autoInfo == "test40_4 sample auto")
            {
                return;
            }
        }

        Debug.LogError("failed.");
    }
예제 #2
0
    public void _40_7_StackChangerFromCoroutine()
    {
        int frame    = 0;
        var context0 = PlayerContext.Copy(dummyContext);

        var auto0 = new AutoForTest40_3 <PlayerContext, Dictionary <string, PlayerContext> >(frame, context0) as Auto <PlayerContext, Dictionary <string, PlayerContext> >;

        // stack changer from coroutine.
        auto0.Update(frame, new Dictionary <string, PlayerContext>());

        var stackedChangers = auto0.StackedChangers();

        if (stackedChangers.Any())
        {
            return;
        }

        Debug.LogError("failed.");
    }