Exemple #1
0
        // Åbner dialogbox til indlæsning af data
        private void LoadButton_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog fbd = new FolderBrowserDialog();
            DialogResult        dr  = fbd.ShowDialog();

            if (dr == DialogResult.OK)
            {
                string[] CPPath      = Directory.GetFiles(fbd.SelectedPath, "*utm");
                string[] RunnersPath = Directory.GetFiles(fbd.SelectedPath, "*.gpx");
                if (CPPath.Count() > 0 && RunnersPath.Count() > 0)
                {
                    LoadControlPoints(CPPath.First());
                    LoadRunners(RunnersPath);
                    LoadLegs();
                    Put_Data(MainLeg);
                    LoadButton.Hide();
                    ResetButton.Show();
                    player.StartUp();
                }
                else if (CPPath.Count() == 0)
                {
                    MessageBox.Show("Controlpoints not found in selected folder");
                }
                else if (RunnersPath.Count() == 0)
                {
                    MessageBox.Show("GPX Files not found in selected folder");
                }
            }
        }
Exemple #2
0
    /*public void RegisterMiniGameManager(PlanetMiniGameManager manager)
     * {
     *  this.miniGameManager = manager;
     * }
     *
     * public void UnregisterMiniGameManager()
     * {
     *  this.miniGameManager = null;
     * }*/

    /// <summary>
    /// tries to reveal ore, if there is no try available, it reveals field and shows reset button
    /// </summary>
    /// <param name="ore">ore to be revealed</param>
    public void Press(Ore ore)
    {
        tryController.UseTry();
        ore.OreSetAlpha(1.0f, 0.6f);
        LeanTween.value(totalValueDisplay.gameObject, UpdateTotalValue, this.totalValue, this.totalValue + multiplier * ore.Value, 0.6f);
        this.totalValue += multiplier * ore.Value;
        if (!tryController.HasTries)
        {
            DoOnArray(SetAlphaOnElement);

            resetButton.Show();
        }
    }
Exemple #3
0
        private void Start()
        {
            AddQuestionButton.Hide();
            DeleteAnswersButton.Show();
            ResetButton.Show();
            NextButton.Show();
            InitializeVisited();
            ResetCorecteGresite();
            StartButton.Hide();
            IDLabel.Hide();
            IDTextField.Hide();

            TimeLeft = 1800;
            Timp.Start();
            TimeLabel.Show();

            List <model.Question> questions = QuestionRepository.ReadAllQuestions();

            quizController = new controller.QuizController();
            QuestionNumber = 0;

            DisplayQuestion(0);
        }
 protected virtual void Awake()
 {
     OnChange += () => { ShowMap(true); };
     OnChange += () => { _btnReset.Show(true); };
 }