Skip to content

Commit

Permalink
Fixed to be compatible with the new unirx for both scripting runtime …
Browse files Browse the repository at this point in the history
…3.5 and 4.6
  • Loading branch information
svermeulen committed Mar 12, 2018
1 parent efc7cef commit a997147
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public abstract class Signal<TDerived> : SignalBase, ISignal
readonly List<Action> _tempListeners = new List<Action>();

#if ZEN_SIGNALS_ADD_UNIRX
public UniRx.IObservable<Unit> AsObservable
public IObservable<Unit> AsObservable
{
get
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public abstract class Signal<TDerived, TParam1> : SignalBase, ISignal<TParam1>
readonly List<Action<TParam1>> _tempListeners = new List<Action<TParam1>>();

#if ZEN_SIGNALS_ADD_UNIRX
public UniRx.IObservable<TParam1> AsObservable
public IObservable<TParam1> AsObservable
{
get
{
Expand Down
6 changes: 3 additions & 3 deletions UnityProject/Assets/Plugins/Zenject/Source/Signals/Signal2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ public abstract class Signal<TDerived, TParam1, TParam2> : SignalBase, ISignal<T
{
readonly List<Action<TParam1, TParam2>> _listeners = new List<Action<TParam1, TParam2>>();
#if ZEN_SIGNALS_ADD_UNIRX
readonly Subject<UniRx.Tuple<TParam1, TParam2>> _observable = new Subject<UniRx.Tuple<TParam1, TParam2>>();
readonly Subject<Tuple<TParam1, TParam2>> _observable = new Subject<Tuple<TParam1, TParam2>>();
#endif
readonly List<Action<TParam1, TParam2>> _tempListeners = new List<Action<TParam1, TParam2>>();

#if ZEN_SIGNALS_ADD_UNIRX
public UniRx.IObservable<UniRx.Tuple<TParam1, TParam2>> AsObservable
public IObservable<Tuple<TParam1, TParam2>> AsObservable
{
get
{
Expand Down Expand Up @@ -114,7 +114,7 @@ public void Fire(TParam1 p1, TParam2 p2)
using (ProfileBlock.Start("UniRx Stream"))
#endif
{
_observable.OnNext(UniRx.Tuple.Create(p1, p2));
_observable.OnNext(Tuple.Create(p1, p2));
}
#endif

Expand Down
6 changes: 3 additions & 3 deletions UnityProject/Assets/Plugins/Zenject/Source/Signals/Signal3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ public abstract class Signal<TDerived, TParam1, TParam2, TParam3> : SignalBase,
{
readonly List<Action<TParam1, TParam2, TParam3>> _listeners = new List<Action<TParam1, TParam2, TParam3>>();
#if ZEN_SIGNALS_ADD_UNIRX
readonly Subject<UniRx.Tuple<TParam1, TParam2, TParam3>> _observable = new Subject<UniRx.Tuple<TParam1, TParam2, TParam3>>();
readonly Subject<Tuple<TParam1, TParam2, TParam3>> _observable = new Subject<Tuple<TParam1, TParam2, TParam3>>();
#endif
readonly List<Action<TParam1, TParam2, TParam3>> _tempListeners = new List<Action<TParam1, TParam2, TParam3>>();

#if ZEN_SIGNALS_ADD_UNIRX
public UniRx.IObservable<UniRx.Tuple<TParam1, TParam2, TParam3>> AsObservable
public IObservable<Tuple<TParam1, TParam2, TParam3>> AsObservable
{
get
{
Expand Down Expand Up @@ -114,7 +114,7 @@ public void Fire(TParam1 p1, TParam2 p2, TParam3 p3)
using (ProfileBlock.Start("UniRx Stream"))
#endif
{
_observable.OnNext(UniRx.Tuple.Create(p1, p2, p3));
_observable.OnNext(Tuple.Create(p1, p2, p3));
}
#endif

Expand Down
6 changes: 3 additions & 3 deletions UnityProject/Assets/Plugins/Zenject/Source/Signals/Signal4.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ public abstract class Signal<TDerived, TParam1, TParam2, TParam3, TParam4> : Sig
{
readonly List<Action<TParam1, TParam2, TParam3, TParam4>> _listeners = new List<Action<TParam1, TParam2, TParam3, TParam4>>();
#if ZEN_SIGNALS_ADD_UNIRX
readonly Subject<UniRx.Tuple<TParam1, TParam2, TParam3, TParam4>> _observable = new Subject<UniRx.Tuple<TParam1, TParam2, TParam3, TParam4>>();
readonly Subject<Tuple<TParam1, TParam2, TParam3, TParam4>> _observable = new Subject<Tuple<TParam1, TParam2, TParam3, TParam4>>();
#endif
readonly List<Action<TParam1, TParam2, TParam3, TParam4>> _tempListeners = new List<Action<TParam1, TParam2, TParam3, TParam4>>();

#if ZEN_SIGNALS_ADD_UNIRX
public UniRx.IObservable<UniRx.Tuple<TParam1, TParam2, TParam3, TParam4>> AsObservable
public IObservable<Tuple<TParam1, TParam2, TParam3, TParam4>> AsObservable
{
get
{
Expand Down Expand Up @@ -115,7 +115,7 @@ public void Fire(TParam1 p1, TParam2 p2, TParam3 p3, TParam4 p4)
using (ProfileBlock.Start("UniRx Stream"))
#endif
{
_observable.OnNext(UniRx.Tuple.Create(p1, p2, p3, p4));
_observable.OnNext(Tuple.Create(p1, p2, p3, p4));
}
#endif

Expand Down

0 comments on commit a997147

Please sign in to comment.