Beispiel #1
0
        public ActionResult Save(ShopNavigation entity)
        {
            var json = new JsonHelp();

            try
            {
                if (entity.ID == 0)
                {
                    json.IsSuccess = DB.ShopNavigation.Insert(entity);
                    json.Msg       = "添加";
                }
                else
                {
                    json.IsSuccess = DB.ShopNavigation.Update(entity);
                    json.Msg       = "修改";
                }
                if (json.IsSuccess)
                {
                    json.ReUrl = ControllerPath + "/Index";   //注册成功就跳转到 激活页
                    json.Msg  += "成功";
                }
                else
                {
                    json.Msg += "失败";
                }
            }
            catch (Exception e)
            {
                json.IsSuccess = false;
                json.Msg       = "操作失败";
                LogHelper.Error("保存导航失败:" + WebTools.getFinalException(e));
            }
            return(Json(json));
        }
Beispiel #2
0
 void Start()
 {
     shopUI         = transform.GetComponent <ShopUI> ();
     shopNavigation = transform.GetComponent <ShopNavigation> ();
     shopNavigation.LoadVariables();
     shopUI.LoadVariables();
     SetPlayerNotReady();
     for (int i = 0; i < ownedSpells.Count; i++)
     {
         shopNavigation.spellChoiceContainer.transform.Find(ownedSpells[i].spellName).GetComponent <SpellIcon> ().ownedIcon.SetActive(true);
     }
     hasStarted = true;
 }
    public void LoadVariables()
    {
        /*numberOfRoundsWon = transform.FindChild("roundWon").GetComponent<Text>();
         * textPrompt = transform.FindChild ("FondTexte").gameObject;
         * spellDescripton = transform.FindChild ("DescriptionText").gameObject;
         * contourSpell = shopNavigation.spellChoiceContainer.transform.FindChild ("ContourSpell").gameObject;
         * moneyHolder = transform.FindChild ("Text").FindChild ("PlayerGold").transform.GetComponent<Text> ();
         * readyCheck = transform.FindChild ("ReadyCheck").gameObject;*/

        shopNavigation = transform.GetComponent <ShopNavigation> ();
        shop           = transform.GetComponent <Shop> ();
        readyCheck.SetActive(false);
        textPrompt.SetActive(false);
        numberOfRoundsWon.text = "Round won : " + shop.player.roundWon.ToString();
        UpdateMoney(shop.player.money);
        UpdateSpellIcons();
        variablesLoaded = true;
    }
Beispiel #4
0
        public ActionResult Detail(int?id)
        {
            ShopNavigation entity = null;

            if (id == null)
            {
                entity = new ShopNavigation()
                {
                    IsEnable = true, Target = "_self"
                };
            }
            else
            {
                entity = DB.ShopNavigation.FindEntity(id);
            }

            return(View(entity));
        }