// Update is called once per frame void Update() { HoneyManager honeyManager = FindObjectOfType <HoneyManager>(); TotalHoneyGathered = honeyManager.TotalHoneyGathered; HoneyGathered = honeyManager.HoneyGathered; honeyStolenScript Beekeeper = FindObjectOfType <honeyStolenScript>(); BeekeeperScore = Beekeeper.BeekeeperScore; BeeCounter Bees = FindObjectOfType <BeeCounter>(); numberOfBees = Bees.numberOfBees; BeeWorkerCounter WorkerBees = FindObjectOfType <BeeWorkerCounter>(); numberOfWorkerBees = WorkerBees.numberOfBees; GenerateHexes Hexes = FindObjectOfType <GenerateHexes>(); ActiveHexes = Hexes.ActiveHexes.Count; Game_Timer Timer = FindObjectOfType <Game_Timer>(); timePassed = Timer.current_time; totalBees = numberOfBees + numberOfWorkerBees; CheckLose(); CheckWin(); }
private void Start_Btn_Click(object sender, EventArgs e) { flag_GameStart = true; if (flag_GameStart == true) { MenuPanel.Hide(); Screen.Enabled = false; } Game_Timer.Start(); }
private void Form1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Space) { Fb.Birds[0].Jump(); } else if (e.KeyCode == Keys.P) { Game_Timer.Stop(); } }
private void Game_Timer_Tick(object sender, EventArgs e) { if (flag_GameStart == true) { temp = temp - 1; label1.Text = temp.ToString(); } if (temp == 0) { flat_GameOver = true; Game_Timer.Stop(); this.Close(); } }
public void Start_Game() { game_mode_inst = this; kill_limit = PlayerPrefs.GetInt("Kill_Limit"); time_limit = PlayerPrefs.GetInt("Time_Limit"); hold_limit = PlayerPrefs.GetInt("Oddball_Hold_Limit"); //@NOTE not yet set round_limit = PlayerPrefs.GetInt("Round_Limit"); player_records = FindObjectOfType<In_Game_Record>(); players = player_records.Get_All_Players(); game_timer = FindObjectOfType<Game_Timer>(); StartCoroutine(Pre_Game_Countdown()); }
void StartTraining() { PipesPics = new List <Tuple <PictureBox, PictureBox> >(); BirdsPics = new List <PictureBox>(); var bmp = new Bitmap(FlappyBird_AI.Properties.Resources.bird); Game_Timer.Interval = 1; Game_Timer.Start(); for (int i = 0; i < 5; i++) { var bmp1 = new Bitmap(FlappyBird_AI.Properties.Resources.pipe); PictureBox pipe1 = new PictureBox(); pipe1.Image = bmp1; pipe1.BackColor = Color.Transparent; pipe1.SizeMode = PictureBoxSizeMode.StretchImage; pipe1.Location = new Point(0, 0); pipe1.Size = new System.Drawing.Size(0, 0); pictureBox2.Controls.Add(pipe1); //Upper var bmp2 = new Bitmap(FlappyBird_AI.Properties.Resources.pipedown); PictureBox pipe2 = new PictureBox(); pipe2.Image = bmp2; pipe2.BackColor = Color.Transparent; pipe2.SizeMode = PictureBoxSizeMode.StretchImage; pipe2.Location = new Point(0, 0); pipe2.Size = new System.Drawing.Size(0, 0); pictureBox2.Controls.Add(pipe2); PipesPics.Add(new Tuple <PictureBox, PictureBox>(pipe1, pipe2)); } for (int i = 0; i < Fb.PopulationNumber; i++) { PictureBox p = new PictureBox(); p.Image = bmp; p.BackColor = Color.Transparent; p.Location = new Point(34, 144); p.Size = new System.Drawing.Size(25, 25); p.SizeMode = PictureBoxSizeMode.StretchImage; pictureBox2.Controls.Add(p); BirdsPics.Add(p); } }
void Start() { cameramovecs = GetComponent <Game_CameraMove>(); timercs = GetComponent <Game_Timer>(); }
private void button2_Click(object sender, EventArgs e) { Game_Timer.Stop(); }