private void DungeonSimBox_Load(object sender, EventArgs e) { plotView1.Model = GridLinesHorizontal(); plotView1.Model.Title = "Total Damage Done"; plotView2.Model = GridLinesHorizontal(); plotView2.Model.Axes[0].Maximum = 100; plotView2.Model.Title = "Probabilty of Total Party Kill"; HeroDamageLine = new LineSeries { Title = "Damage Done to Monsters", Color = OxyColors.Blue, TextColor = OxyColors.Blue, BrokenLineColor = OxyColors.Blue }; MonsterDamageLine = new LineSeries { Title = "Damage done to Heroes", Color = OxyColors.Red, TextColor = OxyColors.Red, BrokenLineColor = OxyColors.Red }; plotView1.Model.Series.Add(MonsterDamageLine); plotView1.Model.Series.Add(HeroDamageLine); if ((bool)Properties.Settings.Default["FirstRun"] == true) { Properties.Settings.Default["FirstRun"] = false; Properties.Settings.Default.Save(); WelcomePopup Welcome = new WelcomePopup(); Welcome.Show(); } }
private static void Init() { if (initilized) { return; } if (PlayerPrefs.HasKey(strKey)) { dontShowWeclomeMessageAgain = CommonUtil.ZeroOneToTrueFalseBool(PlayerPrefs.GetInt(strKey)); } if (dontShowWeclomeMessageAgain) { return; } window = (WelcomePopup)EditorWindow.GetWindow(typeof(WelcomePopup)); window.titleContent.text = "Welcome"; window.maxSize = size; window.maximized = true; window.position = new Rect((Screen.currentResolution.width - size.x) / 2, (Screen.currentResolution.height - size.y) / 2, size.x, size.y); window.Show(); window.Focus(); initilized = true; PlayerPrefs.SetInt(strKey, CommonUtil.TrueFalseBoolToZeroOne(true)); }