void MissionChanged(object source, FileSystemEventArgs e) { Debug.Log(e.ChangeType.ToString()); if (e.ChangeType == WatcherChangeTypes.Created || e.ChangeType == WatcherChangeTypes.Changed) { LoadMissionFile(e.FullPath.FixPath()); } else if (e.ChangeType == WatcherChangeTypes.Deleted) { foreach (string key in Missions.Keys.ToArray()) { MissionName mission = Missions[key]; if (mission.Mission.Path.FixPath() == e.FullPath.FixPath()) { Missions.Remove(key); var type = FindType("Assets.Scripts.Missions.MissionManager"); var instance = type.GetProperty("Instance", BindingFlags.Static | BindingFlags.Public).GetValue(null, null); var modmission = instance.GetType().GetMethod("GetMission", @public).Invoke(instance, new object[] { mission.Mission.ID }); ModMissions.Remove(modmission); if (SelectedMission == mission) { StartButton.GetComponent <Button>().interactable = false; } Destroy(mission.gameObject); } } } else { Log("[MissionMaker] Unhandled change type encountered: " + e.ChangeType.ToString()); } }
//重置 protected void Reset_Click(object sender, EventArgs e) { try { MissionName.Reset(); DropDownListProjectID.Reset(); Remark.Reset(); DropDownListSecrecyLevel.Reset(); } catch (Exception ex) { publicmethod.SaveError(ex, this.Request); } }
public override Dictionary <string, object> SaveToDict() { var dict = new Dictionary <string, object>(); dict.Add(GDMConstants.SchemaKey, "Missions"); dict.Merge(true, FirstCard.ToGDEDict(FirstCardKey)); dict.Merge(true, Fight.ToGDEDict(FightKey)); dict.Merge(true, MissionLevel.ToGDEDict(MissionLevelKey)); dict.Merge(true, MissionName.ToGDEDict(MissionNameKey)); dict.Merge(true, MissionDescription.ToGDEDict(MissionDescriptionKey)); dict.Merge(true, NextCard.ToGDEDict(NextCardKey)); dict.Merge(true, AnswerA.ToGDEDict(AnswerAKey)); dict.Merge(true, AnswerB.ToGDEDict(AnswerBKey)); dict.Merge(true, AnswerC.ToGDEDict(AnswerCKey)); dict.Merge(true, AnswerD.ToGDEDict(AnswerDKey)); return(dict); }
public override int GetHashCode() { int hash = 1; if (MissionId != 0) { hash ^= MissionId.GetHashCode(); } if (MissionName.Length != 0) { hash ^= MissionName.GetHashCode(); } if (MissionType != 0) { hash ^= MissionType.GetHashCode(); } hash ^= award_.GetHashCode(); if (MissionDesc.Length != 0) { hash ^= MissionDesc.GetHashCode(); } if (JumpTo.Length != 0) { hash ^= JumpTo.GetHashCode(); } if (Weight != 0) { hash ^= Weight.GetHashCode(); } if (Player != 0) { hash ^= Player.GetHashCode(); } if (PopUps != 0) { hash ^= PopUps.GetHashCode(); } if (extra_ != null) { hash ^= Extra.GetHashCode(); } return(hash); }
//节点名称界面跳转 protected string GetEditUrlW(object ProjectImportantID) { return(MissionName.GetShowReference("MissionName_Window.aspx?id=" + ProjectImportantID, "节点名称")); }