Ejemplo n.º 1
0
 public Run(MinigameList runList)
 {
     _runList       = runList;
     _runLength     = runList.Count;
     _minigameIndex = 0;
     _lives         = 3;
 }
Ejemplo n.º 2
0
    // MonoBehaviour Methods

    private void Awake()
    {
        if (minigameMasterList == null)
        {
            LoadMinigameMasterList();
        }
        if (playerSettings == null)
        {
            LoadPlayerSettings();
        }
        if (run == null)
        {
            //Adds ONLY current scene game to list -- for testing
            Minigame m = IsInMinigame();
            if (m != null)
            {
                //creates run with only this game
                CreateNewRun(new MinigameList(m));
            }
        }


        debug_playerSettings     = playerSettings;
        debug_minigameMasterList = minigameMasterList;
    }
Ejemplo n.º 3
0
 public void UpdateList(MinigameList otherList)
 {
     foreach (Minigame other in otherList.minigames)
     {
         minigames.First(item => item.Name == other.Name).UpdateDetails(other);
     }
 }
Ejemplo n.º 4
0
 private void LoadMinigameMasterList()
 {
     minigameMasterList = FileSaveUtil.LoadData <MinigameList>("minigameMasterList");
     if (minigameMasterList == null)
     {
         minigameMasterList = new MinigameList(scriptableObjectMinigames);
     }
 }
 private void LoadMinigameMasterList()
 {
     minigameMasterList = FileSaveUtil.LoadData <MinigameList>("minigameMasterList");
     if (minigameMasterList == null || SaveSettings.minigameSavingEnabled == false)
     {
         minigameMasterList = new MinigameList(true);
     }
 }
Ejemplo n.º 6
0
 public Run(MinigameList runList)
 {
     _runList       = runList;
     _runLength     = runList.Count;
     _minigameIndex = 0;
     _lives         = 3;
     Timers.ResetTimers();
 }
    // MonoBehaviour Methods

    private void Awake()
    {
        if (minigameMasterList == null)
        {
            LoadMinigameMasterList();
        }
        if (playerSettings == null)
        {
            LoadPlayerSettings();
        }


        debug_playerSettings     = playerSettings;
        debug_minigameMasterList = minigameMasterList;
    }
Ejemplo n.º 8
0
 public void CreateNewRun(MinigameList runList)
 {
     run       = new Run(runList);
     debug_run = run;
 }
Ejemplo n.º 9
0
        private void button5_Click(object sender, EventArgs e)
        {
            if (listBox1.SelectedItem == null)
            {
                MessageBox.Show("No Client selected!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }


            IntPtr ClientHWND = FindWindow("TNosTaleMainF", listBox1.SelectedItem.ToString());



            SearchImage.RECT rect;
            GetClientRect(ClientHWND, out rect);
            string Resolution = (rect.Right.ToString() + "x" + rect.Bottom.ToString());

            if (Resolution != "1024x768")
            {
                MessageBox.Show("Game need to be on 1024x768 Resolution!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            if (WindowList.Contains(ClientHWND))
            {
                MessageBox.Show("This Client is already in the List!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            WindowList.Add(ClientHWND);

            MinigameList Game = GetWantedMinigame();

            string BotID  = listBox1.SelectedItem.ToString().Replace("NosTale", "").Replace("- (", "").Replace(")", "");
            string Title  = listBox1.SelectedItem.ToString();
            int    Amount = Convert.ToInt32(textBox1.Text);
            int    Level  = Convert.ToInt32(comboBox1.Text);

            if ((int)Game == 1)
            {
                BotList.Add(new Thread(() => new Minigames.FishPond().RunTask(FindWindow("TNosTaleMainF", Title), Amount, Level, rect, Convert.ToInt32(BotID), checkBox1.Checked, checkBox2.Checked, Convert.ToInt32(textBox2.Text), Convert.ToInt32(textBox3.Text), Convert.ToDouble("0." + textBox4.Text), Convert.ToInt32(textBox5.Text))));
            }
            if ((int)Game == 2)
            {
                BotList.Add(new Thread(() => new Minigames.SawMill().RunTask(FindWindow("TNosTaleMainF", Title), Amount, rect, Convert.ToInt32(BotID), checkBox1.Checked)));
            }
            if ((int)Game == 3)
            {
                BotList.Add(new Thread(() => new Minigames.Quarry().RunTask(FindWindow("TNosTaleMainF", Title), Amount, rect, Convert.ToInt32(BotID), checkBox1.Checked)));
            }
            //if ((int)Game == 4) { BotList.Add(new Thread(() => new Minigames.ShootingField().RunTask(FindWindow("TNosTaleMainF",Title), Amount, rect, Convert.ToInt32(BotID), checkBox1.Checked))); }

            /*
             * if ((int)Game == 4)
             * {
             *  MessageBox.Show("Shooting Field isn't supported yet!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
             *  radioButton1.Checked = true;
             *  return;
             * }
             */


            string[] row = { BotID, GetWantedMinigame().ToString(), comboBox1.Text, checkBox1.Checked.ToString(), textBox1.Text };
            var      bot = new ListViewItem(row);

            listView1.Items.Add(bot);

            MessageBox.Show($"{listBox1.SelectedItem.ToString()} added to the Bot List!\n\nMinigame: {Game}\nWanted Level: {comboBox1.Text}\nAmount: {textBox1.Text}\nUse Reward Coupons: {checkBox1.Checked.ToString()}", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }