示例#1
0
 public OCItem(
     OIItem _oiItem,
     GameObject _gameObject,
     CraftInfo _craftInfo,
     Manager.Housing.LoadInfo _loadInfo)
     : base((IObjectInfo)_oiItem, _gameObject, _craftInfo)
 {
     this.LoadInfo        = _loadInfo;
     this.m_itemComponent = !Object.op_Inequality((Object)this.GameObject, (Object)null) ? (ItemComponent)null : (ItemComponent)this.GameObject.GetComponent <ItemComponent>();
     if (Object.op_Equality((Object)this.m_itemComponent, (Object)null))
     {
         this.m_itemComponent = (ItemComponent)this.GameObject.AddComponent <ItemComponent>();
         this.m_itemComponent.Setup(false);
     }
     if (this.m_itemComponent != null)
     {
         this.m_itemComponent.SetHPoint();
     }
     ObservableExtensions.Subscribe <IList <bool> >((IObservable <M0>)Observable.BatchFrame <bool>(Observable.Merge <bool>((IObservable <M0>[]) new IObservable <bool>[4]
     {
         (IObservable <bool>) this.subjectColor1,
         (IObservable <bool>) this.subjectColor2,
         (IObservable <bool>) this.subjectColor3,
         (IObservable <bool>) this.subjectEmissionColor
     }), 0, (FrameCountType)0), (Action <M0>)(_ => this.UpdateColor()));
 }