Пример #1
0
        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();
            }
        }
Пример #2
0
    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));
    }
Пример #3
0
        public void Start()
        {
            _welcomePopup = new WelcomePopup(_game);
            _welcomePopup.UserClickedStartGame += OnUserClickedStart;

            var view = _welcomePopup.View;

            _rootScene.AddChild(view);
        }
Пример #4
0
    static void Update()
    {
        if (Application.isPlaying)
        {
            if (window != null)
            {
                window.Close();
                window = null;
            }
            return;
        }

        if (window == null)
        {
            Init();
        }
    }