Ejemplo n.º 1
0
    public IEnumerator GenerateInitializeCoroutine(IAlbumModel albumModel)
    {
        mAlbumModel        = albumModel;
        mLabel_Number.text = $"{albumModel.Id:000}";
        if (mTexture_ShipCard.mainTexture != null)
        {
            Resources.UnloadAsset(mTexture_ShipCard.mainTexture);
            mTexture_ShipCard.mainTexture = null;
        }
        if (albumModel is AlbumShipModel)
        {
            AlbumShipModel albumShipModel  = (AlbumShipModel)albumModel;
            Texture        shipCardTexture = SingletonMonoBehaviour <ResourceManager> .Instance.ShipTexture.Load(albumShipModel.MstId, 3);

            if (UserInterfaceAlbumManager.CheckMarriaged(albumShipModel))
            {
                ((Component)mAnimation_MarriagedRing).gameObject.SetActive(true);
                mAnimation_MarriagedRing.Play();
            }
            else
            {
                ((Component)mAnimation_MarriagedRing).gameObject.SetActive(false);
            }
            yield return(null);

            mTexture_ShipCard.mainTexture = shipCardTexture;
            mTexture_ShipCard.alpha       = 1f;
        }
        else
        {
            mTexture_ShipCard.alpha = 0f;
            ((Component)mAnimation_MarriagedRing).gameObject.SetActive(false);
        }
    }
 private void OnSelectedListItemListener(IAlbumModel albumModel)
 {
     if (mStateManager.CurrentState == State.ShipList && albumModel is AlbumShipModel)
     {
         AlbumShipModel albumShipModel = (AlbumShipModel)albumModel;
         mContext.SetAlbumModel(albumShipModel);
         mUIShipAlbumList.SetKeyController(null);
         if (UserInterfaceAlbumManager.CheckMarriaged(albumShipModel))
         {
             mStateManager.PushState(State.ShipDetailMarriaged);
         }
         else
         {
             mStateManager.PushState(State.ShipDetail);
         }
     }
 }
    private void OnSelectedListItemListener(IAlbumModel albumModel)
    {
        bool flag = this.mStateManager.CurrentState == UserInterfaceShipAlbumManager.State.ShipList;

        if (flag && albumModel is AlbumShipModel)
        {
            AlbumShipModel albumShipModel = (AlbumShipModel)albumModel;
            this.mContext.SetAlbumModel(albumShipModel);
            this.mUIShipAlbumList.SetKeyController(null);
            bool flag2 = UserInterfaceAlbumManager.CheckMarriaged(albumShipModel);
            if (flag2)
            {
                this.mStateManager.PushState(UserInterfaceShipAlbumManager.State.ShipDetailMarriaged);
            }
            else
            {
                this.mStateManager.PushState(UserInterfaceShipAlbumManager.State.ShipDetail);
            }
        }
    }