예제 #1
0
        void ReleaseDesignerOutlets()
        {
            if (MainTableView != null)
            {
                MainTableView.Dispose();
                MainTableView = null;
            }

            if (NameEntry != null)
            {
                NameEntry.Dispose();
                NameEntry = null;
            }

            if (ResetButton != null)
            {
                ResetButton.Dispose();
                ResetButton = null;
            }

            if (StreetEntry != null)
            {
                StreetEntry.Dispose();
                StreetEntry = null;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (PauseButton != null)
            {
                PauseButton.Dispose();
                PauseButton = null;
            }

            if (ResetButton != null)
            {
                ResetButton.Dispose();
                ResetButton = null;
            }

            if (StartButton != null)
            {
                StartButton.Dispose();
                StartButton = null;
            }

            if (Surface != null)
            {
                Surface.Dispose();
                Surface = null;
            }
        }
예제 #3
0
파일: Form1.cs 프로젝트: kitokyo/XAPSpy
 public frmMain()
 {
     InitializeComponent();
     listItemDelegate = new AddListItem(AddListItemMethod);
     AddTextDelegate = new AddText(AddtextMethod);
     resetButtonDelegate = new ResetButton(ResetButtonMethod);
 }
예제 #4
0
 public frmMain()
 {
     InitializeComponent();
     listItemDelegate    = new AddListItem(AddListItemMethod);
     AddTextDelegate     = new AddText(AddtextMethod);
     resetButtonDelegate = new ResetButton(ResetButtonMethod);
 }
    public override void ResetLevel()
    {
        base.ResetLevel();

        foreach (GameObject ob in Buttons)
        {
            ob.SetActive(false);
        }
        ResetButton.SetActive(false);
        transform.Find("Validate").gameObject.SetActive(true);
        transform.Find("Next").gameObject.SetActive(false);


        foreach (Transform part in NameSelector.transform)
        {
            bool allowSwitchOff = part.GetComponent <ToggleGroup>().allowSwitchOff;

            if (allowSwitchOff == true || part.GetComponentsInChildren <Toggle>().Length > 1)
            {
                part.GetComponent <ToggleGroup>().allowSwitchOff = true;
                foreach (Toggle tog in part.GetComponentsInChildren <Toggle>())
                {
                    tog.isOn = false;
                }
                part.GetComponent <ToggleGroup>().allowSwitchOff = allowSwitchOff;
            }
        }

        Transform n = transform.Find("Name").Find("Text");

        foreach (Transform go in n.transform)
        {
            Destroy(go.gameObject);
        }
    }
예제 #6
0
파일: Form1.cs 프로젝트: cristi-iacob/uvvss
 public Form1()
 {
     InitializeComponent();
     ResetButton.Hide();
     NextButton.Hide();
     DeleteAnswersButton.Hide();
 }
예제 #7
0
파일: Form1.cs 프로젝트: Haurum/P2
        // Å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");
                }
            }
        }
예제 #8
0
 public override void InitBindings()
 {
     ChooseFancyButton.SetOnClickCommand(ViewModel.AskUserAboutFancyThingsCommand);
     ShowFancyButton.SetOnClickCommand(ViewModel.ShowLastFanciedThingCommand);
     ResetButton.SetOnClickCommand(ViewModel.ResetFanciness);
     NavigateButton.SetOnClickCommand(ViewModel.NavigateSomewhereElseCommand);
     ShowDialogButton.SetOnClickCommand(ViewModel.ShowDialogCommand);
     ShowDifferentDialogButton.SetOnClickCommand(ViewModel.ShowDialogBCommand);
 }
예제 #9
0
 public void resettime()
 {
     Thread.Sleep(5000);
     resetconfirm = false;
     ResetButton.Invoke((MethodInvoker) delegate
     {
         ResetButton.Text = "Reset";
     });
 }
예제 #10
0
    // --- Hides the Level Select ---
    public void hideMenu()
    {
        LoadingScreenUI.SetActive(true);

        mainMenuPanel.SetActive(false);
        ResetButton.SetActive(true);

        LoadingScreenUI.SetActive(false);
    }
예제 #11
0
 private void ShowOptions()
 {
     hook.Dispose();
     options = ShowOptionsForm();
     options.Save();
     BindHotKey();
     SetTime();
     ResetButton.Focus();
 }
예제 #12
0
    public void StartButton()
    {
        NextButton.SetActive(true);
        PreviousButton.SetActive(true);
        ResetButton.SetActive(true);
        StartLevels.SetActive(false);
        string newLevel = levelPrefix + (++currentLevel);

        SceneManager.LoadScene(newLevel);
    }
예제 #13
0
    // Start is called before the first frame update
    void Start()
    {
        player = GameObject.FindWithTag("Player").GetComponent <Player>();
        girl   = GameObject.FindWithTag("Girl").GetComponent <Girl>();
        enemy  = GameObject.FindWithTag("Enemy1").GetComponent <Enemy1>();

        fade           = GameObject.FindWithTag("Fade").GetComponent <Fade>();
        scene          = GetComponent <Scene>();
        reset          = GameObject.FindWithTag("Button").GetComponent <ResetButton>();
        fade.isFadeOut = true;
    }
예제 #14
0
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();

        ResetButton myTarget = (ResetButton)target;

        if (GUILayout.Button("Reset"))
        {
            myTarget.resettable.ResetNow();
        }
    }
예제 #15
0
파일: Form1.cs 프로젝트: Haurum/P2
 // Reseter programmet som det var ved opstart
 private void ResetButton_Click(object sender, EventArgs e)
 {
     Runners.Clear();
     player.Second = 0;
     PlayTimer.Stop();
     Map1.Refresh();
     ResetButton.Hide();
     LoadButton.Show();
     player.ShutDown();
     RunnersCheckBox.Items.Clear();
 }
예제 #16
0
 private void TimeLabel_Click(object sender, EventArgs e)
 {
     if (simplified)
     {
         StartButton_Click(sender, e);
     }
     else
     {
         ShowOptions();
     }
     ResetButton.Focus();
 }
 void Awoke()
 {
     if (instance != null)
     {
         Destroy(gameObject);
     }
     else
     {
         instance = this;
         DontDestroyOnLoad(gameObject);
     }
 }
예제 #18
0
파일: Form1.cs 프로젝트: cristi-iacob/uvvss
 private void MenuButton_Click(object sender, EventArgs e)
 {
     TimeLabel.Hide();
     NextButton.Hide();
     AddQuestionButton.Show();
     StartButton.Show();
     ResetButton.Hide();
     IDLabel.Show();
     IDTextField.Show();
     DeleteAnswersButton.Hide();
     Timp.Stop();
 }
예제 #19
0
 //set this as Singleton
 void Awake()
 {
     if (instance == null)
     {
         DontDestroyOnLoad(this);
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
 }
예제 #20
0
    /*public void Awake()
     * {
     *  transform.localPosition = new Vector3(0, 0, 0);
     *
     *  transform.GetComponent<Image>().enabled = false;
     *
     *  LVM = GameObject.FindGameObjectWithTag("LevelManager").GetComponent<LevelManager>();
     *  Controls = GameObject.FindGameObjectWithTag("Controls");
     * }*/

    public override void ResetLevel()
    {
        base.ResetLevel();

        transform.Find("ChargeSelector").GetComponent <ChargeSelectorManager>().Reset();
        transform.parent.parent.GetComponent <resize>().InitResize(transform);
        BtnValidate.SetActive(true);
        Selector.ValidateChoice(false);
        Selector.Reset();

        ResetButton.SetActive(false);
        Controls.SetActive(false);
    }
예제 #21
0
    void ResetButtonPress()
    {
        Audio.PlayGameSoundAtTransform(KMSoundOverride.SoundEffect.ButtonPress, transform);
        ResetButton.AddInteractionPunch();

        if (solved)
        {
            return;
        }

        ResetModule();
        DebugLog("Reset button pressed, vessel contents cleared.");
    }
예제 #22
0
    public void hideWinBox()
    {
        LoadingScreenUI.SetActive(true);

        clearLevel();
        winBoxUI.SetActive(false);
        mainMenuPanel.SetActive(true);
        levelButtons[levelUnlock].SetActive(true);
        ResetButton.SetActive(false);
        ResetLevel();

        LoadingScreenUI.SetActive(false);
    }
예제 #23
0
        private void ShowAnswers()
        {
            Answer1.BackColor = Color.Turquoise;
            Answer2.BackColor = Color.Turquoise;
            Answer3.BackColor = Color.Turquoise;
            Answer4.BackColor = Color.Turquoise;

            ResetButton.Focus();

            TotalGames++;
            TimePlayed += TimeSpan.FromSeconds(Timer.GetCurrentSecondsElapsed());

            GameInProgress = false;
            contextMenuStrip1.Items[0].Text = "Total Games Played: " + TotalGames;
            contextMenuStrip1.Items[1].Text = "Total Time Played: " + TimePlayed;
            contextMenuStrip1.Items[2].Text = "Average: " + TimePlayed.TotalSeconds / TotalGames;

            double secondsPlayed = (TimePlayed - LastTimePlayed).TotalSeconds;

            LastTimePlayed = TimePlayed;

            TimeLabel.Text    = "Time: " + secondsPlayed.ToString("F2");
            TimeLabel.Visible = true;

            AverageLabel.Text    = "Avg: " + (TimePlayed.TotalSeconds / TotalGames).ToString("F2");
            AverageLabel.Visible = true;

            var answersKey = GetAnswersAsInt(Game.Answers);

            if (!Records.ContainsKey(answersKey))
            {
                Records.Add(answersKey, new GameRecord(new List <double>()
                {
                    secondsPlayed
                }));
            }
            else
            {
                FastLabel.Text = "Fast: " + Records[answersKey].Fastest.ToString("F2");
                SlowLabel.Text = "Slow: " + Records[answersKey].Slowest.ToString("F2");

                FastLabel.Visible = true;
                if (Records[answersKey].Fastest != Records[answersKey].Slowest)
                {
                    SlowLabel.Visible = true;
                }

                Records[answersKey].AddTime(secondsPlayed);
            }
        }
예제 #24
0
        private void Form1_KeyUp(object sender, KeyEventArgs e)
        {
            switch (e.KeyCode)
            {
            case Keys.D1:
                drop[0].PerformClick();
                break;

            case Keys.D2:
                drop[1].PerformClick();
                break;

            case Keys.D3:
                drop[2].PerformClick();
                break;

            case Keys.D4:
                drop[3].PerformClick();
                break;

            case Keys.D5:
                drop[4].PerformClick();
                break;

            case Keys.D6:
                drop[5].PerformClick();
                break;

            case Keys.D7:
                drop[6].PerformClick();
                break;

            case Keys.N:
                ResetButton.PerformClick();
                break;

            case Keys.D8:
                checkBox1.Checked = !checkBox1.Checked;
                break;

            case Keys.D9:
                checkBox4.Checked = !checkBox4.Checked;
                break;

            default:
                break;
            }
        }
예제 #25
0
    public void gunShot()
    {
        timer = effectDelay;

        enableEffects();

        gunLine.SetPosition(0, transform.position);

        Ray        shot = new Ray();
        RaycastHit rayInfo;

        shot.origin    = transform.position;
        shot.direction = transform.forward;

        Debug.Log("Gunshot");

        if (Physics.Raycast(shot, out rayInfo, maxDistance))
        {
            EnemyController target = rayInfo.collider.GetComponent <EnemyController>();
            if (target != null)
            {
                target.takeDamage();
            }
            else if (rayInfo.collider.tag == "Button")
            {
                ResetButton button1 = rayInfo.collider.GetComponent <ResetButton>();
                if (button1 != null)
                {
                    button1.OnClick();
                }
                else
                {
                    KeyboardButton key = rayInfo.collider.GetComponent <KeyboardButton>();
                    if (key != null)
                    {
                        key.OnClick();
                    }
                }
            }

            gunLine.SetPosition(1, rayInfo.point);
        }
        else
        {
            gunLine.SetPosition(1, shot.origin + shot.direction * maxDistance);
        }
    }
예제 #26
0
        internal void FocusButton(ButtonType type)
        {
            switch (type)
            {
            case ButtonType.Ok:
                OkButton.Focus();
                break;

            case ButtonType.Cancel:
                CancelButton.Focus();
                break;

            case ButtonType.Reset:
                ResetButton.Focus();
                break;
            }
        }
예제 #27
0
        void ReleaseDesignerOutlets()
        {
            if (AnswerButton != null)
            {
                AnswerButton.Dispose();
                AnswerButton = null;
            }

            if (PictureButton != null)
            {
                PictureButton.Dispose();
                PictureButton = null;
            }

            if (QuestionLable != null)
            {
                QuestionLable.Dispose();
                QuestionLable = null;
            }

            if (QuestionTextView != null)
            {
                QuestionTextView.Dispose();
                QuestionTextView = null;
            }

            if (ResetButton != null)
            {
                ResetButton.Dispose();
                ResetButton = null;
            }

            if (RoundLabel != null)
            {
                RoundLabel.Dispose();
                RoundLabel = null;
            }

            if (ScoreLabel != null)
            {
                ScoreLabel.Dispose();
                ScoreLabel = null;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (AddButton != null)
            {
                AddButton.Dispose();
                AddButton = null;
            }

            if (AddProduct != null)
            {
                AddProduct.Dispose();
                AddProduct = null;
            }

            if (ResetButton != null)
            {
                ResetButton.Dispose();
                ResetButton = null;
            }

            if (ShuffleSwitch != null)
            {
                ShuffleSwitch.Dispose();
                ShuffleSwitch = null;
            }

            if (ViewTouched != null)
            {
                ViewTouched.Dispose();
                ViewTouched = null;
            }

            if (AddLabel != null)
            {
                AddLabel.Dispose();
                AddLabel = null;
            }

            if (AddDescription != null)
            {
                AddDescription.Dispose();
                AddDescription = null;
            }
        }
예제 #29
0
        protected void Start()
        {
            var gs = Game.Instance.GameState;

            if (gs != null)
            {
                started     = true;
                guiprovider = new GUIProvider(gs.Data);

                SaveButton.SetActive(gs.Data.isShowSaveLoad());
                LoadButton.SetActive(gs.Data.isShowSaveLoad());
                ResetButton.SetActive(gs.Data.isShowReset());

                if (Application.platform == RuntimePlatform.Android || Application.platform == RuntimePlatform.IPhonePlayer)
                {
                    this.GetComponent <UnityEngine.UI.CanvasScaler>().referenceResolution = new Vector2(600, 400);
                }
            }
        }
예제 #30
0
        public override void OnToolGUI(Event e)
        {
            var uiView    = UIView.GetAView();
            var screenPos = uiView.WorldPointToGUI(Camera.main, Centre) * uiView.inputScale;

            TurnLeftButton.Update(screenPos);
            FlipButton.Update(screenPos);
            TurnRightButton.Update(screenPos);
            ApplyButton.Update(screenPos);
            NotApplyButton.Update(screenPos);
            ResetButton.Update(screenPos);

            TurnLeftButton.OnGUI(e);
            FlipButton.OnGUI(e);
            TurnRightButton.OnGUI(e);
            ApplyButton.OnGUI(e);
            NotApplyButton.OnGUI(e);
            ResetButton.OnGUI(e);
        }
예제 #31
0
        protected void Start()
        {
            var gs = Game.Instance.GameState;

            if (gs != null)
            {
                started     = true;
                guiprovider = new GUIProvider(gs.Data);

                SaveButton.SetActive(gs.Data.isShowSaveLoad());
                LoadButton.SetActive(gs.Data.isShowSaveLoad());
                ResetButton.SetActive(gs.Data.isShowReset());

                if (Application.platform == RuntimePlatform.Android || Application.platform == RuntimePlatform.IPhonePlayer)
                {
                    this.GetComponent <UnityEngine.UI.CanvasScaler>().referenceResolution = new Vector2(600, 400);
                }

                /*Game.Instance.OnShowText += (finished, line, text, x, y, textColor, textOutlineColor, baseColor, outlineColor, id) =>
                 * {
                 *  if (!finished)
                 *  {
                 *      if (line != null)
                 *      {
                 *          Talk(line);
                 *      }
                 *      else if (textColor == Game.NoColor && textOutlineColor == Game.NoColor)
                 *      {
                 *          Talk(text, x, y, Color.white, Color.black);
                 *      }
                 *      else if(baseColor == Game.NoColor && outlineColor == Game.NoColor)
                 *      {
                 *          Talk(text, x, y, textColor, textOutlineColor);
                 *      }
                 *      else
                 *      {
                 *          Talk(text, x, y, textColor, textOutlineColor, baseColor, outlineColor);
                 *      }
                 *  }
                 * };*/
            }
        }
예제 #32
0
        //Environment Constructor
        public AngryBallsEnvironment()
        {
            //Instantiate the Buttons
            gameState = GameState.initialize;
            playPauseButton = new PlayPauseButton(gameState);
            resetButton = new ResetButton(gameState);
            builderButton = new BuilderButton(gameState);
            saveButton = new SaveButton(gameState);
            loadButton = new LoadButton(gameState);

            // Instantiate Dialog Box
            dialog = new Dialog(loadButton, saveButton);

            //Instantiate Start Positions for environment items
            clawopenPosition = clawStartPosition;
            ballStartPose = new Vector2(clawStartPosition.X + 47, clawStartPosition.Y + 150);

            //Instantiate local images
            background = Game1.environmentBackground;
            border = Game1.borderImage;
            bigCogImage = Game1.bigCog;
            bigCogOrigin = new Vector2(bigCogImage.Width / 2, bigCogImage.Height / 2);
            springImage = Game1.springImage;
            chickenImage = Game1.chickenImage;
            clawOpen = Game1.clawOpen;

            //Instantiate environment containers
            Input = new InputManager();
            map = new Map();
            toolBox = new ToolBox();
        }