/// カメラモードのセット public void SetCamMode(ModeId id) { camModeId = id; if (id == ModeId.Normal) { // camBehindY = 20.0f; // worldRot = preLook; } else if (id == ModeId.LookMyself) { // camBehindY = 30.0f; } else if (id == ModeId.CloseLook) { // camBehindY = 20.0f; // worldRot.X = -50.0f; } else { if (id == ModeId.NormalToCloseLook || id == ModeId.NormalToLookMyself) { preLook = worldRot; } changeRot = worldRot; } modeChangeFlg = false; }
private void ManageMasterlistFile(string p_strPath, bool p_booOverwrite) { if (p_booOverwrite) { if (File.Exists(p_strPath)) { FileUtil.ForceDelete(p_strPath); } } if (!File.Exists(p_strPath)) { if (!Directory.Exists(p_strPath)) { Directory.CreateDirectory(Path.GetDirectoryName(p_strPath)); } using (Stream masterlist = new MemoryStream(Properties.Resources.masterlist)) { using (ZipArchive archive = new ZipArchive(masterlist, ZipArchiveMode.Read)) { archive.GetEntry(String.Format("{0}.yaml", ModeId.ToLower())).ExtractToFile(p_strPath); } } } }
/// <summary> /// Setup for the plugin management libraries. /// </summary> protected virtual void SetupPluginManagement(FileUtil p_futFileUtility) { string strPath = EnvironmentInfo.ApplicationPersonalDataFolderPath; strPath = Path.Combine(Path.Combine(Path.Combine(strPath, "loot"), ModeId), "masterlist.yaml"); if (SupportsPluginAutoSorting) { if (!File.Exists(strPath)) { if (!Directory.Exists(strPath)) { Directory.CreateDirectory(Path.GetDirectoryName(strPath)); } using (Stream masterlist = new MemoryStream(Properties.Resources.masterlist)) { using (ZipArchive archive = new ZipArchive(masterlist, ZipArchiveMode.Read)) { archive.GetEntry(String.Format("{0}.yaml", ModeId.ToLower())).ExtractToFile(strPath); } } } PluginSorter = new PluginSorter(EnvironmentInfo, this, p_futFileUtility, strPath); } PluginOrderManager = new PluginOrderManager(EnvironmentInfo, this, p_futFileUtility); }
public HelpMode(Func <DeskPiMode> buildSelector, ModeData data, ImmutableDictionary <ModeId, ModeData> modes, ModeId defaultMode = ModeId.Help) : base(buildSelector, data) { this.modes = modes; var keys = from id in modes.Keys orderby(int) id select id; ids = ImmutableArray <ModeId> .Empty.AddRange(keys); currentMode = ids.IndexOf(defaultMode); if (currentMode == -1) { currentMode = 0; } }
/// カメラモードのセット public void SetCamMode( ModeId id ) { camModeId = id; if(id == ModeId.Normal){ // camBehindY = 20.0f; // worldRot = preLook; } else if(id == ModeId.LookMyself){ // camBehindY = 30.0f; } else if(id == ModeId.CloseLook){ // camBehindY = 20.0f; // worldRot.X = -50.0f; }else{ if(id == ModeId.NormalToCloseLook || id == ModeId.NormalToLookMyself){ preLook = worldRot; } changeRot = worldRot; } modeChangeFlg = false; }