コード例 #1
0
    public static void NodeSubscribe(this State state, JNode node, JNodeEvent eventFilter, Action <JNode> action)
    {
        var linkHandler = new StateLinkHandler(state);

        node.Subscribe(linkHandler, (n, e) =>
        {
            if (e == eventFilter)
            {
                action(n);
            }
        });
    }
コード例 #2
0
    public static void NodeSubscribe(this State state, JNode node, Action <JNode, JNodeEvent> action)
    {
        var linkHandler = new StateLinkHandler(state);

        node.Subscribe(linkHandler, action);
    }
コード例 #3
0
    public static Action <TRemote> DataBind <T, TRemote>(this State state, JData <T> node, Action <JData <T> > action, Func <TRemote, T> converter)
    {
        var linkHandler = new StateLinkHandler(state);

        return(node.Bind(linkHandler, action, converter));
    }
コード例 #4
0
    public static Action <T> DataBind <T>(this State state, JData <T> node, Action <JData <T> > action)
    {
        var linkHandler = new StateLinkHandler(state);

        return(node.Bind(linkHandler, action));
    }
コード例 #5
0
    public static void DataSubscribe <T>(this State state, JData <T> node, Action <JData <T> > action)
    {
        var linkHandler = new StateLinkHandler(state);

        node.Subscribe(linkHandler, action);
    }
コード例 #6
0
        public Timer(float seconds, Action onCompleted, State state) : this(seconds, onCompleted)
        {
            var linkHandler = new StateLinkHandler(state);

            this.updateCondition = () => linkHandler.IsActive;
        }
コード例 #7
0
 public Clock(float elapsedSeconds, State state) : this(elapsedSeconds)
 {
     var linkHandler = new StateLinkHandler(state);
     this.updateCondition = () => linkHandler.IsActive;
 }
コード例 #8
0
        public FrameTimer(int frames, Action onCompleted, State state) : this(frames, onCompleted)
        {
            var linkHandler = new StateLinkHandler(state);

            this.updateCondition = () => linkHandler.IsActive;
        }
コード例 #9
0
        public Clock(State state) : this()
        {
            var linkHandler = new StateLinkHandler(state);

            this.updateCondition = () => linkHandler.IsActive;
        }
コード例 #10
0
    public static IClock NewClock <T>(this State state) where T : ITimeDeltaEvent
    {
        var linkHandler = new StateLinkHandler(state);

        return(new Clock <T>(() => linkHandler.IsActive));
    }
コード例 #11
0
    public static IFrameTimer NewFrameTimer <T>(this State state, int frames, Action onCompleted) where T : ITimeEvent
    {
        var linkHandler = new StateLinkHandler(state);

        return(new FrameTimer <T>(frames, onCompleted, () => linkHandler.IsActive));
    }
コード例 #12
0
    public static ITimer NewTimer <T>(this State state, float seconds, Action onCompleted) where T : ITimeDeltaEvent
    {
        var linkHandler = new StateLinkHandler(state);

        return(new Timer <T>(seconds, onCompleted, () => linkHandler.IsActive));
    }
コード例 #13
0
    public static IClock NewClock <T>(this State state, float elapsedSeconds) where T : ITimeDeltaEvent
    {
        var linkHandler = new StateLinkHandler(state);

        return(new Clock <T>(elapsedSeconds, () => linkHandler.IsActive));
    }