public void UpdateHeader(FurnitureKinds kinds)
    {
        switch (kinds)
        {
        case FurnitureKinds.Wall:
            mLabel_Genre.text     = "壁紙";
            mTexture_Header.color = new Color(161f, 121f / 255f, 91f / 255f);
            break;

        case FurnitureKinds.Floor:
            mLabel_Genre.text     = "床";
            mTexture_Header.color = new Color(56f / 85f, 36f / 85f, 0.4117647f);
            break;

        case FurnitureKinds.Desk:
            mLabel_Genre.text     = "椅子+机";
            mTexture_Header.color = new Color(134f / 255f, 39f / 85f, 148f / 255f);
            break;

        case FurnitureKinds.Window:
            mLabel_Genre.text     = "窓枠+カ\u30fcテン";
            mTexture_Header.color = new Color(20f / 51f, 152f / 255f, 0.5882353f);
            break;

        case FurnitureKinds.Hangings:
            mLabel_Genre.text     = "装飾";
            mTexture_Header.color = new Color(0.470588237f, 0.7058824f, 26f / 51f);
            break;

        case FurnitureKinds.Chest:
            mLabel_Genre.text     = "家具";
            mTexture_Header.color = new Color(0.5882353f, 0.5882353f, 20f / 51f);
            break;
        }
    }
 public bool Init(int nIndex, FurnitureKinds iKind, DelDecideCategoryAreaBtn decideEvent)
 {
     this._nIndex = nIndex;
     this._iKind  = iKind;
     this._delDecideCategoryAreaBtn = decideEvent;
     return(true);
 }
Exemplo n.º 3
0
 public void Initialize(FurnitureStoreManager manager)
 {
     this.mFurnitureStoreManager = manager;
     this.mNowCategory           = FurnitureKinds.Wall;
     FurnitureModel[] models = Enumerable.ToArray <FurnitureModel>(Enumerable.Take <FurnitureModel>(this.mFurnitureStoreManager.GetStoreItem(this.mNowCategory), 10));
     base.ChangeImmediateContentPosition(UIScrollList <FurnitureModel, UIFurnitureStoreTabListChild> .ContentDirection.Hell);
     base.Initialize(models);
     if (this.mModels.Length == 0)
     {
         this.mTransform_NextButton.SetActive(false);
         this.mTransform_PrevButton.SetActive(false);
         this.mTransform_SoldOut.SetActive(true);
     }
     else
     {
         if (3 < this.mModels.Length)
         {
             this.mTransform_NextButton.SetActive(true);
         }
         else
         {
             this.mTransform_NextButton.SetActive(false);
         }
         this.mTransform_PrevButton.SetActive(false);
         this.mTransform_SoldOut.SetActive(false);
     }
 }
Exemplo n.º 4
0
        public static string FurnitureKindToString(FurnitureKinds kind)
        {
            switch (kind)
            {
            case FurnitureKinds.Floor:
                return("床");

            case FurnitureKinds.Wall:
                return("壁紙");

            case FurnitureKinds.Window:
                return("窓枠+カーテン");

            case FurnitureKinds.Hangings:
                return("装飾");

            case FurnitureKinds.Chest:
                return("家具");

            case FurnitureKinds.Desk:
                return("椅子+机");

            default:
                return(string.Empty);
            }
        }
 private void PreviewFurniture(FurnitureKinds furnitureKind, FurnitureModel furnitureModel)
 {
     if (mStateManager.CurrentState == State.FurniturePreView)
     {
         mUserInterfacePortInteriorManager.UpdateFurniture(mInteriorManager.Deck, furnitureKind, furnitureModel);
     }
 }
Exemplo n.º 6
0
        private static string FurnitureTypeToString(FurnitureKinds furnitureType)
        {
            string result = string.Empty;

            switch (furnitureType)
            {
            case FurnitureKinds.Chest:
                result = "Chest";
                break;

            case FurnitureKinds.Desk:
                result = "Desk";
                break;

            case FurnitureKinds.Floor:
                result = "Floor";
                break;

            case FurnitureKinds.Hangings:
                result = "Hangings";
                break;

            case FurnitureKinds.Wall:
                result = "Wall";
                break;

            case FurnitureKinds.Window:
                result = "Window";
                break;
            }
            return(result);
        }
 private void OnSelectFurnitureKind(FurnitureKinds furnitureKind)
 {
     if (mOnSelectFurnitureKind != null)
     {
         mOnSelectFurnitureKind(furnitureKind);
     }
 }
Exemplo n.º 8
0
 private void OnSelectFurnitureKind(FurnitureKinds furnitureKind)
 {
     if (this.mOnSelectFurnitureKind != null)
     {
         this.mOnSelectFurnitureKind.Invoke(furnitureKind);
     }
 }
 public void Initialize(FurnitureStoreManager manager)
 {
     mFurnitureStoreManager = manager;
     mNowCategory           = FurnitureKinds.Wall;
     FurnitureModel[] models = mFurnitureStoreManager.GetStoreItem(mNowCategory).Take(10).ToArray();
     base.ChangeImmediateContentPosition(ContentDirection.Hell);
     Initialize(models);
     if (mModels.Length == 0)
     {
         mTransform_NextButton.SetActive(isActive: false);
         mTransform_PrevButton.SetActive(isActive: false);
         mTransform_SoldOut.SetActive(isActive: true);
         return;
     }
     if (3 < mModels.Length)
     {
         mTransform_NextButton.SetActive(isActive: true);
     }
     else
     {
         mTransform_NextButton.SetActive(isActive: false);
     }
     mTransform_PrevButton.SetActive(isActive: false);
     mTransform_SoldOut.SetActive(isActive: false);
 }
Exemplo n.º 10
0
 public void Initialize(int deckId, FurnitureKinds furnitureKind, FurnitureModel[] models, Camera camera)
 {
     UIInteriorFurnitureChangeScrollListChildModelNew[] models2 = this.GenerateChildDTOs(deckId, models);
     this.UpdateHeader(furnitureKind);
     base.Initialize(models2);
     base.SetSwipeEventCamera(camera);
 }
Exemplo n.º 11
0
        private void UpdateHeader(FurnitureKinds furnitureKinds)
        {
            switch (furnitureKinds)
            {
            case FurnitureKinds.Floor:
                this.mLabel_Genre.text     = "床";
                this.mTexture_Header.color = new Color(0.65882355f, 0.423529416f, 0.4117647f);
                break;

            case FurnitureKinds.Wall:
                this.mLabel_Genre.text     = "壁紙";
                this.mTexture_Header.color = new Color(161f, 0.4745098f, 0.356862754f);
                break;

            case FurnitureKinds.Window:
                this.mLabel_Genre.text     = "窓枠+カーテン";
                this.mTexture_Header.color = new Color(0.392156869f, 0.596078455f, 0.5882353f);
                break;

            case FurnitureKinds.Hangings:
                this.mLabel_Genre.text     = "装飾";
                this.mTexture_Header.color = new Color(0.470588237f, 0.7058824f, 0.509803951f);
                break;

            case FurnitureKinds.Chest:
                this.mLabel_Genre.text     = "家具";
                this.mTexture_Header.color = new Color(0.5882353f, 0.5882353f, 0.392156869f);
                break;

            case FurnitureKinds.Desk:
                this.mLabel_Genre.text     = "椅子+机";
                this.mTexture_Header.color = new Color(0.5254902f, 0.458823532f, 0.5803922f);
                break;
            }
        }
 private bool IsNeedUpdateFurniture(FurnitureKinds furnitureKind, FurnitureModel furnitureModel)
 {
     if (mFurnituresSet.TryGetValue(furnitureKind, out FurnitureModel _))
     {
         return(false);
     }
     return(true);
 }
 private void OnSelectFurnitureKindListener(FurnitureKinds furnitureKind)
 {
     if (mStateManager.CurrentState == State.FurnitureKindsSelect)
     {
         mContext.SetSelectFurnitureKind(furnitureKind);
         mUIInteriorChangeFurnitureSelector.SetKeyController(null);
         mStateManager.PushState(State.FurnitureSelect);
     }
 }
Exemplo n.º 14
0
        public int this[FurnitureKinds kind]
        {
            get
            {
                switch (kind)
                {
                case FurnitureKinds.Floor:
                    return(Furniture1);

                case FurnitureKinds.Wall:
                    return(Furniture2);

                case FurnitureKinds.Window:
                    return(Furniture3);

                case FurnitureKinds.Hangings:
                    return(Furniture4);

                case FurnitureKinds.Chest:
                    return(Furniture5);

                default:
                    return(Furniture6);
                }
            }
            private set
            {
                switch (kind)
                {
                case FurnitureKinds.Floor:
                    Furniture1 = value;
                    break;

                case FurnitureKinds.Wall:
                    Furniture2 = value;
                    break;

                case FurnitureKinds.Window:
                    Furniture3 = value;
                    break;

                case FurnitureKinds.Hangings:
                    Furniture4 = value;
                    break;

                case FurnitureKinds.Chest:
                    Furniture5 = value;
                    break;

                case FurnitureKinds.Desk:
                    Furniture6 = value;
                    break;
                }
            }
        }
 public int this[FurnitureKinds kind]
 {
     get
     {
         if (kind == FurnitureKinds.Floor)
         {
             return(this.Furniture1);
         }
         if (kind == FurnitureKinds.Wall)
         {
             return(this.Furniture2);
         }
         if (kind == FurnitureKinds.Window)
         {
             return(this.Furniture3);
         }
         if (kind == FurnitureKinds.Hangings)
         {
             return(this.Furniture4);
         }
         if (kind == FurnitureKinds.Chest)
         {
             return(this.Furniture5);
         }
         return(this.Furniture6);
     }
     private set
     {
         if (kind == FurnitureKinds.Floor)
         {
             this.Furniture1 = value;
         }
         else if (kind == FurnitureKinds.Wall)
         {
             this.Furniture2 = value;
         }
         else if (kind == FurnitureKinds.Window)
         {
             this.Furniture3 = value;
         }
         else if (kind == FurnitureKinds.Hangings)
         {
             this.Furniture4 = value;
         }
         else if (kind == FurnitureKinds.Chest)
         {
             this.Furniture5 = value;
         }
         else if (kind == FurnitureKinds.Desk)
         {
             this.Furniture6 = value;
         }
     }
 }
        public bool ChangeRoom(FurnitureKinds fType, int furniture_mst_id)
        {
            Api_Result <int> api_Result = new Api_req_furniture().Change(this._deck_id, fType, furniture_mst_id);

            if (api_Result.state == Api_Result_State.Success)
            {
                this._room_cache = null;
                return(true);
            }
            return(false);
        }
Exemplo n.º 17
0
        private void OnSelectFurnitureKindListener(FurnitureKinds furnitureKind)
        {
            bool flag = this.mStateManager.CurrentState == UserInterfaceInteriorChangeManager.State.FurnitureKindsSelect;

            if (flag)
            {
                this.mContext.SetSelectFurnitureKind(furnitureKind);
                this.mUIInteriorChangeFurnitureSelector.SetKeyController(null);
                this.mStateManager.PushState(UserInterfaceInteriorChangeManager.State.FurnitureSelect);
            }
        }
Exemplo n.º 18
0
        public void UpdateFurniture(DeckModel deckModel, FurnitureKinds furnitureKind, FurnitureModel changeToFurniture)
        {
            UIFurniture uIFurniture = UserInterfacePortInteriorManager.UIPortInteriorFactory.GenerateFurniturePrefab(changeToFurniture);

            UIFurniture.UIFurnitureModel uiFurnitureModel = new UIFurniture.UIFurnitureModel(changeToFurniture, deckModel);
            UIFurniture uIFurniture2 = null;

            switch (furnitureKind)
            {
            case FurnitureKinds.Floor:
                this.ClearFurniture(this.mFloor);
                uIFurniture2 = NGUITools.AddChild(this.mFloor.get_gameObject(), uIFurniture.get_gameObject()).GetComponent <UIFurniture>();
                uIFurniture2.Initialize(uiFurnitureModel);
                break;

            case FurnitureKinds.Wall:
                this.ClearFurniture(this.mWall);
                uIFurniture2 = NGUITools.AddChild(this.mWall.get_gameObject(), uIFurniture.get_gameObject()).GetComponent <UIFurniture>();
                uIFurniture2.Initialize(uiFurnitureModel);
                break;

            case FurnitureKinds.Window:
                this.ClearFurniture(this.mWindow);
                uIFurniture2 = NGUITools.AddChild(this.mWindow.get_gameObject(), uIFurniture.get_gameObject()).GetComponent <UIFurniture>();
                uIFurniture2.Initialize(uiFurnitureModel);
                break;

            case FurnitureKinds.Hangings:
                this.ClearFurniture(this.mHangings);
                uIFurniture2 = NGUITools.AddChild(this.mHangings.get_gameObject(), uIFurniture.get_gameObject()).GetComponent <UIFurniture>();
                uIFurniture2.Initialize(uiFurnitureModel);
                break;

            case FurnitureKinds.Chest:
                this.ClearFurniture(this.mChest);
                uIFurniture2 = NGUITools.AddChild(this.mChest.get_gameObject(), uIFurniture.get_gameObject()).GetComponent <UIFurniture>();
                uIFurniture2.Initialize(uiFurnitureModel);
                break;

            case FurnitureKinds.Desk:
                this.ClearFurniture(this.mDesk);
                uIFurniture2 = NGUITools.AddChild(this.mDesk.get_gameObject(), uIFurniture.get_gameObject()).GetComponent <UIFurniture>();
                uIFurniture2.Initialize(uiFurnitureModel);
                break;
            }
            bool flag = uIFurniture2.GetComponent <UIDynamicFurniture>() != null;

            if (flag)
            {
                uIFurniture2.GetComponent <UIDynamicFurniture>().SetOnActionEvent(new Action <UIDynamicFurniture>(this.OnFurnitureActionEvent));
            }
        }
 public void ChangeCategory(FurnitureKinds kinds)
 {
     if (mNowCategory != kinds)
     {
         KillScrollAnimation();
         mNowCategory = kinds;
         FurnitureModel[] models = mFurnitureStoreManager.GetStoreItem(kinds).Take(10).ToArray();
         base.ChangeImmediateContentPosition(ContentDirection.Hell);
         Refresh(models, firstPage: true);
         HeadFocus();
         StopFocusBlink();
     }
 }
 private void ChangeFurniture(FurnitureKinds furnitureKind, FurnitureModel furnitureModel)
 {
     if (mStateManager.CurrentState == State.FurnitureDetail)
     {
         new Dictionary <FurnitureKinds, int>();
         if (mInteriorManager.ChangeRoom(furnitureKind, furnitureModel.MstId))
         {
             mUserInterfacePortInteriorManager.UpdateFurniture(mInteriorManager.Deck, furnitureKind, furnitureModel);
             mUIInteriorFurnitureChangeScrollList.RefreshViews();
             mUIInteriorFurnitureDetail.QuitState();
         }
     }
 }
Exemplo n.º 21
0
 public void ChangeCategory(FurnitureKinds kinds)
 {
     if (this.mNowCategory == kinds)
     {
         return;
     }
     base.KillScrollAnimation();
     this.mNowCategory = kinds;
     FurnitureModel[] models = Enumerable.ToArray <FurnitureModel>(Enumerable.Take <FurnitureModel>(this.mFurnitureStoreManager.GetStoreItem(kinds), 10));
     base.ChangeImmediateContentPosition(UIScrollList <FurnitureModel, UIFurnitureStoreTabListChild> .ContentDirection.Hell);
     base.Refresh(models, true);
     base.HeadFocus();
     base.StopFocusBlink();
 }
Exemplo n.º 22
0
        public FurnitureStoreManager()
        {
            _desciptions = Mst_DataManager.Instance.GetFurnitureText();
            ILookup <int, Mst_furniture> lookup = Mst_furniture.getSaleFurnitureList().ToLookup((Mst_furniture x) => x.Type);

            _StoreItems = new Dictionary <FurnitureKinds, List <FurnitureModel> >();
            foreach (IGrouping <int, Mst_furniture> item in lookup)
            {
                FurnitureKinds        key   = (FurnitureKinds)item.Key;
                List <Mst_furniture>  list  = item.ToList();
                List <FurnitureModel> list2 = list.ConvertAll((Converter <Mst_furniture, FurnitureModel>)((Mst_furniture mst) => new __FStoreItemModel__(mst, _desciptions[mst.Id])));
                _StoreItems[key] = list2.FindAll((FurnitureModel item) => !item.IsPossession());
            }
        }
        public void UpdateFurniture(DeckModel deckModel, FurnitureKinds furnitureKind, FurnitureModel changeToFurniture)
        {
            UIFurniture uIFurniture = UIPortInteriorFactory.GenerateFurniturePrefab(changeToFurniture);

            UIFurniture.UIFurnitureModel uiFurnitureModel = new UIFurniture.UIFurnitureModel(changeToFurniture, deckModel);
            UIFurniture uIFurniture2 = null;

            switch (furnitureKind)
            {
            case FurnitureKinds.Window:
                ClearFurniture(mWindow);
                uIFurniture2 = NGUITools.AddChild(mWindow.gameObject, uIFurniture.gameObject).GetComponent <UIFurniture>();
                uIFurniture2.Initialize(uiFurnitureModel);
                break;

            case FurnitureKinds.Floor:
                ClearFurniture(mFloor);
                uIFurniture2 = NGUITools.AddChild(mFloor.gameObject, uIFurniture.gameObject).GetComponent <UIFurniture>();
                uIFurniture2.Initialize(uiFurnitureModel);
                break;

            case FurnitureKinds.Wall:
                ClearFurniture(mWall);
                uIFurniture2 = NGUITools.AddChild(mWall.gameObject, uIFurniture.gameObject).GetComponent <UIFurniture>();
                uIFurniture2.Initialize(uiFurnitureModel);
                break;

            case FurnitureKinds.Hangings:
                ClearFurniture(mHangings);
                uIFurniture2 = NGUITools.AddChild(mHangings.gameObject, uIFurniture.gameObject).GetComponent <UIFurniture>();
                uIFurniture2.Initialize(uiFurnitureModel);
                break;

            case FurnitureKinds.Chest:
                ClearFurniture(mChest);
                uIFurniture2 = NGUITools.AddChild(mChest.gameObject, uIFurniture.gameObject).GetComponent <UIFurniture>();
                uIFurniture2.Initialize(uiFurnitureModel);
                break;

            case FurnitureKinds.Desk:
                ClearFurniture(mDesk);
                uIFurniture2 = NGUITools.AddChild(mDesk.gameObject, uIFurniture.gameObject).GetComponent <UIFurniture>();
                uIFurniture2.Initialize(uiFurnitureModel);
                break;
            }
            if (uIFurniture2.GetComponent <UIDynamicFurniture>() != null)
            {
                uIFurniture2.GetComponent <UIDynamicFurniture>().SetOnActionEvent(OnFurnitureActionEvent);
            }
        }
Exemplo n.º 24
0
 public void ChangeCategory(FurnitureKinds kinds)
 {
     if (nowCategory != kinds)
     {
         nowCategory = kinds;
         FurnitureModel[] storeItem = manager.GetStoreItem(kinds);
         if (Views == null)
         {
             Initialize(storeItem);
         }
         else
         {
             RefreshAndFirstFocus(storeItem);
         }
     }
 }
Exemplo n.º 25
0
 public void ChangeCategory(FurnitureKinds kinds)
 {
     if (this.nowCategory == kinds)
     {
         return;
     }
     this.nowCategory = kinds;
     FurnitureModel[] storeItem = this.manager.GetStoreItem(kinds);
     if (this.Views == null)
     {
         this.Initialize(storeItem);
     }
     else
     {
         base.RefreshAndFirstFocus(storeItem);
     }
 }
        public FurnitureStoreManager()
        {
            this._desciptions = Mst_DataManager.Instance.GetFurnitureText();
            ILookup <int, Mst_furniture> lookup = Enumerable.ToLookup <Mst_furniture, int>(Mst_furniture.getSaleFurnitureList(), (Mst_furniture x) => x.Type);

            this._StoreItems = new Dictionary <FurnitureKinds, List <FurnitureModel> >();
            using (IEnumerator <IGrouping <int, Mst_furniture> > enumerator = lookup.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    IGrouping <int, Mst_furniture> current = enumerator.get_Current();
                    FurnitureKinds        key   = (FurnitureKinds)current.get_Key();
                    List <Mst_furniture>  list  = Enumerable.ToList <Mst_furniture>(current);
                    List <FurnitureModel> list2 = list.ConvertAll <FurnitureModel>((Mst_furniture mst) => new __FStoreItemModel__(mst, this._desciptions.get_Item(mst.Id)));
                    this._StoreItems.set_Item(key, list2.FindAll((FurnitureModel item) => !item.IsPossession()));
                }
            }
        }
Exemplo n.º 27
0
 public Texture2D Load(FurnitureKinds iType, int furnitureNum)
 {
     if (_dicFurnitureTexture.ContainsKey(iType))
     {
         if (_dicFurnitureTexture[iType].ContainsKey(furnitureNum))
         {
             if (_dicFurnitureTexture[iType][furnitureNum] != null)
             {
                 return(_dicFurnitureTexture[iType][furnitureNum]);
             }
             Texture2D texture2D = LoadResource(iType, furnitureNum);
             if (texture2D == null)
             {
                 return(null);
             }
             _dicFurnitureTexture[iType][furnitureNum] = texture2D;
         }
         else
         {
             Texture2D texture2D = LoadResource(iType, furnitureNum);
             if (texture2D == null)
             {
                 return(null);
             }
             _dicFurnitureTexture[iType].Add(furnitureNum, texture2D);
         }
     }
     else
     {
         Texture2D texture2D = LoadResource(iType, furnitureNum);
         if (texture2D == null)
         {
             return(null);
         }
         SingleFurnitureDictionary singleFurnitureDictionary = new SingleFurnitureDictionary();
         singleFurnitureDictionary.Add(furnitureNum, texture2D);
         _dicFurnitureTexture.Add(iType, singleFurnitureDictionary);
     }
     return(_dicFurnitureTexture[iType][furnitureNum]);
 }
Exemplo n.º 28
0
        public Api_Result <int> Change(int deck_rid, FurnitureKinds furnitureKind, int furnitureId)
        {
            Api_Result <int> api_Result = new Api_Result <int>();
            Mem_room         mem_room   = null;

            if (!Comm_UserDatas.Instance.User_room.TryGetValue(deck_rid, ref mem_room))
            {
                api_Result.state = Api_Result_State.Parameter_Error;
                return(api_Result);
            }
            int season = Mst_DataManager.Instance.Mst_furniture.get_Item(furnitureId).Season;
            int num    = 0;

            Mst_DataManager.Instance.Mst_bgm_season.TryGetValue(season, ref num);
            if (num == 0)
            {
                int num2    = mem_room[furnitureKind];
                int season2 = Mst_DataManager.Instance.Mst_furniture.get_Item(num2).Season;
                int num3    = 0;
                Mst_DataManager.Instance.Mst_bgm_season.TryGetValue(season2, ref num3);
                if (num3 == mem_room.Bgm_id)
                {
                    mem_room.SetFurniture(furnitureKind, furnitureId, num);
                }
                else
                {
                    mem_room.SetFurniture(furnitureKind, furnitureId);
                }
            }
            else
            {
                mem_room.SetFurniture(furnitureKind, furnitureId, num);
            }
            api_Result.data = 1;
            return(api_Result);
        }
Exemplo n.º 29
0
        public Api_Result <int> Change(int deck_rid, FurnitureKinds furnitureKind, int furnitureId)
        {
            Api_Result <int> api_Result = new Api_Result <int>();
            Mem_room         value      = null;

            if (!Comm_UserDatas.Instance.User_room.TryGetValue(deck_rid, out value))
            {
                api_Result.state = Api_Result_State.Parameter_Error;
                return(api_Result);
            }
            int season = Mst_DataManager.Instance.Mst_furniture[furnitureId].Season;
            int value2 = 0;

            Mst_DataManager.Instance.Mst_bgm_season.TryGetValue(season, out value2);
            if (value2 == 0)
            {
                int key     = value[furnitureKind];
                int season2 = Mst_DataManager.Instance.Mst_furniture[key].Season;
                int value3  = 0;
                Mst_DataManager.Instance.Mst_bgm_season.TryGetValue(season2, out value3);
                if (value3 == value.Bgm_id)
                {
                    value.SetFurniture(furnitureKind, furnitureId, value2);
                }
                else
                {
                    value.SetFurniture(furnitureKind, furnitureId);
                }
            }
            else
            {
                value.SetFurniture(furnitureKind, furnitureId, value2);
            }
            api_Result.data = 1;
            return(api_Result);
        }
Exemplo n.º 30
0
 public void SetSelectFurnitureKind(FurnitureKinds furnitureKind)
 {
     this.mSelectedKind = furnitureKind;
 }