public ActionResult Create(ArticleView art, string[] selectedWriter, string[] selectedMagazine, HttpPostedFileBase File) { ExploreData.EditArtilce(art, selectedWriter, selectedMagazine, db, File); return(RedirectToAction("Index")); }
//重置英雄,当被一个新英雄探索,或英雄的属性发生了变化时调用 public void ResetHero(Hero hero, bool resetAll) { if (!hero || !m_exploringHeros.ContainsKey(hero.GetInstanceID())) { return; } //主要为了重置计算公式呢~ ExploreData ed = m_exploringHeros[hero.GetInstanceID()]; //float oldExpMultiple = ed.exploreTimeMultiple; //float oldFameMultiple = ed.exploreTimeMultiple; //float oldGoldMultiple = ed.exploreTimeMultiple; ed.exploreTimeMultiple = StrategeCalculator.Instance.CalculateExploreTimeMultiple(hero.heroData, fieldData); ed.expMultiple = StrategeCalculator.Instance.CalculateExpMultiple(hero.heroData, fieldData); ed.fameMultiple = StrategeCalculator.Instance.CalculateFameMultiple(hero.heroData, fieldData); ed.goldMultiple = StrategeCalculator.Instance.CalculateGoldMultiple(hero.heroData, fieldData); //Debug.LogError("y英雄升级,重置数据"); //Debug.LogError(string.Format("exp m:{0:0.0} -> {1:0.0}", oldExpMultiple, ed.exploreTimeMultiple)); //Debug.LogError(string.Format("fame m:{0:0.0} -> {1:0.0}", oldFameMultiple, ed.expMultiple)); //Debug.LogError(string.Format("gold m:{0:0.0} -> {1:0.0}", oldGoldMultiple, ed.goldMultiple)); if (resetAll) { ed.expUpdater = 0f; ed.goldUpdater = 0f; ed.fameUpdater = 0f; } }
public ExploreData FinishExplore() { var data = Data as ExploreData; Data = new ExploreData(); return(data); }
public ActionResult Create(BookView book, string[] selected, HttpPostedFileBase Image) { ExploreData.EditBook(book, selected, db, Image); return(RedirectToAction("Index")); }
private void Button3_Click(object sender, EventArgs e) { SidePanel.Height = button3.Height; SidePanel.Top = button3.Top; HideForms(); ///this bullshit is made in order to keep the explore data stuff updated; d.Close(); d = new ExploreData(); d.Show(); }
public static ExploreData GetExploreDataByKey(int exploreID) { ExploreData data = null; ExploreDataDic.TryGetValue(exploreID, out data); if (data == null) { Debug.LogError("Get ExploreData Error ! ID=" + exploreID); } return(data); }
public void StartExplore(ExploreData exploreData) { var data = Data as ExploreData; data.StartTime = TimeUtil.CurrentTime(); data.FinishTime = data.StartTime + 30; data.PlaceId = exploreData.PlaceId; data.PupilId1 = exploreData.PupilId1; data.PupilId2 = exploreData.PupilId2; TimeTickService.inst.AddTimeTick(30, OnTickFinishExplore); }
//英雄探索时帧调用 public void Explore(Hero hero) { if (!hero) { return; } if (m_exploringHeros == null) { m_exploringHeros = new Dictionary <int, ExploreData>(); } //保存英雄的记录 int heroID = hero.GetInstanceID(); if (!m_exploringHeros.ContainsKey(heroID)) { m_exploringHeros.Add(heroID, new ExploreData()); //重置英雄,重置时间倍数值 ResetHero(hero, true); } ExploreData ed = m_exploringHeros[heroID]; float validTime = Time.deltaTime / ed.exploreTimeMultiple; //更新经验 ed.expUpdater += (validTime * ed.expMultiple * fieldData.expRate * 0.01f); if (ed.expUpdater >= 1f) { hero.AddExp(1); ed.expUpdater = 0f; } //更新声望 ed.fameUpdater += (validTime * ed.fameMultiple * fieldData.fameRate * 0.01f); if (ed.fameUpdater >= 1f) { hero.AddFame(1); ed.fameUpdater = 0f; } //更新金币 ed.goldUpdater += (validTime * ed.goldMultiple * fieldData.goldRate * 0.01f); if (ed.goldUpdater >= 1f) { hero.AddGold(1); ed.goldUpdater = 0f; } //资源量减少 fieldData.resRemain -= validTime; //没有剩余资源了 if (fieldData.resRemain <= 0f) { FieldResOver(); } else { //显示资源剩余(血条) UpdateRemainBar(fieldData.resRemain / fieldData.resVolume); } }
public void resetData() { Data = new ExploreData(); }
public ActionResult Create(MagazineView mag, string[] selected, HttpPostedFileBase File) { ExploreData.EditMagazine(mag, selected, db, File); return(RedirectToAction("Index")); }
public ActionResult Edit(BookView book, string[] selectedCourses) { ExploreData.EditBook(book, selectedCourses, db); return(RedirectToAction("Index")); }
public override void Construction() { AllExploreAreaList = new List <ExploreArea>(); for (int i = 0; i < 2; i++) { ExploreArea area = new ExploreArea(); area.AreaID = i; area.Name = ""; area.NameTitle = ""; area.Desc = ""; area.IconPath = ""; area.CameraPos = ""; area.CameraRotation = ""; area.Unlock = true; area.DefaultMissionCount = (ushort)i; area.ExploreList = ""; AllExploreAreaList.Add(area); } AllExploreDataList = new List <ExploreData>(); for (int i = 0; i < 2; i++) { ExploreData data = new ExploreData(); data.ExploreID = i; data.MissionName = ""; data.AreaName = ""; data.MissionDesc = ""; data.BGPath = ""; data.CameraPos = ""; data.CameraRotation = ""; data.TeamMaxNum = (ushort)i; data.UnLockValue = (ushort)i; data.RequirePreID = i; data.HardLevel = (ushort)i; data.Weight = (ushort)i; data.Depth = (ushort)i; data.SeriesID = i; AllExploreDataList.Add(data); } AllExplorePointList = new List <ExplorePoint>(); for (int i = 0; i < 2; i++) { ExplorePoint point = new ExplorePoint(); point.PointID = i; point.SeriesID = i; point.Name = ""; point.Desc = ""; point.ExploreValue = (ushort)i; point.PointNevigator = ""; point.DepthLevel = (ushort)i; point.HardLevel = (ushort)i; point.PrePoint = i; point.EnergyCost = (ushort)i; point.Time = (ushort)i; point.EventID = i; AllExplorePointList.Add(point); } AllExploreEventList = new List <ExploreEvent>(); for (int i = 0; i < 2; i++) { ExploreEvent e = new ExploreEvent(); e.EventID = i; e.Name = ""; e.TitleName = ""; e.Desc = ""; e.EventBG = ""; e.ChooseList = ""; AllExploreEventList.Add(e); } AllExploreChooseList = new List <ExploreChoose>(); for (int i = 0; i < 2; i++) { ExploreChoose choose = new ExploreChoose(); choose.ChooseID = i; choose.Content = ""; choose.RewardID = i; choose.NextEvent = i; AllExploreChooseList.Add(choose); } }
public ActionResult Edit(ArticleView art, string[] selectedWriter, string[] selectedMagazine) { ExploreData.EditArtilce(art, selectedWriter, selectedMagazine, db); return(RedirectToAction("Index")); }
public ExploreController() { _httpHelper = new HTTPHelper(); exploreData = new ExploreData(); }
public void StartExplore(ExploreData data) { SendNotification(NotifyStartExplore, data); }
ExploreProxy(object data) : base(Name, data) { Data = new ExploreData(); }
public override void OnUpdateData(params object[] datas) { m_ExploreData = datas[0] as ExploreData; }
public ActionResult Edit(MagazineView mag, string[] selectedCourses) { ExploreData.EditMagazine(mag, selectedCourses, db); return(RedirectToAction("Index")); }