Example #1
0
 public ViewLayout()
 {
     _onViewHidden    = new Subject <IView>().AddTo(LifeTime);
     _onViewBeginHide = new Subject <IView>().AddTo(LifeTime);
     _onViewShown     = new Subject <IView>().AddTo(LifeTime);
     _onViewBeginShow = new Subject <IView>().AddTo(LifeTime);
     _onBecameVisible = new Subject <IView>().AddTo(LifeTime);
     _onBecameHidden  = new Subject <IView>().AddTo(LifeTime);
     _onViewClosed    = new Subject <IView>().AddTo(LifeTime);
     _hasActiveView   = new RecycleReactiveProperty <bool>().AddTo(LifeTime);
 }
Example #2
0
        /// <summary>
        /// initialize property with target Addressable Asset
        /// </summary>
        /// <param name="addressable"></param>
        public void Initialize(TAddressable addressable)
        {
            lifeTimeDefinition = lifeTimeDefinition ?? new LifeTimeDefinition();
            progress           = progress ?? new FloatRecycleReactiveProperty();
            status             = status ?? new RecycleReactiveProperty <AsyncOperationStatus>();
            value = value ?? new RecycleReactiveProperty <TApi>();

            lifeTimeDefinition.Release();

            reference = addressable;

            lifeTimeDefinition.AddCleanUpAction(CleanUp);
        }
        protected sealed override void UpdateCommands(List <ILifeTimeCommand> nodeCommands)
        {
            base.UpdateCommands(nodeCommands);

            _valueData = new RecycleReactiveProperty <TData>().AddTo(LifeTime);
            _isReady   = new RecycleReactiveProperty <bool>().AddTo(LifeTime);

            var inputName   = portName.GetFormatedPortName(PortIO.Input);
            var outputName  = portName.GetFormatedPortName(PortIO.Output);
            var bridgePorts = this.CreatePortPair(inputName, outputName, false);

            input  = bridgePorts.inputValue;
            output = bridgePorts.outputValue;
        }