Ejemplo n.º 1
0
    public override void AlwaysStart()
    {
        IReadOnlyReactiveProperty <int> property = GetProperty <int>();

        (from val in property.TakeWhile((int _) => this != null)
         select ShouldBeActive(val)).SubscribeToActiveUntilNull(base.gameObject).AddTo(this);
    }
Ejemplo n.º 2
0
    public override void AlwaysStart()
    {
        IReadOnlyReactiveProperty <bool> property = GetProperty <bool>();

        (from active in property.TakeWhile((bool _) => this != null)
         select active == m_activeOnTrue).SubscribeToActiveUntilNull(base.gameObject).AddTo(this);
    }
Ejemplo n.º 3
0
    public override void AlwaysStart()
    {
        IReadOnlyReactiveProperty <bool> property = GetProperty <bool>();

        if (m_activateOnTrue)
        {
            (from active in property.TakeWhile((bool _) => this != null)
             where active
             select active).SubscribeToActive(base.gameObject).AddTo(this);
        }
        else
        {
            (from active in property.TakeWhile((bool _) => this != null)
             where !active
             select active).SubscribeToActive(base.gameObject).AddTo(this);
        }
    }