Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace Clicker_Game
- {
- public partial class Form1 : Form
- {
- private Timer gameLoop = new Timer();
- public Form1()
- {
- InitializeComponent();
- gameLoop.Interval = 1000;
- gameLoop.Tick += Update;
- button2.Text = "Click here to buy Cookieze slave Cost 10 PP";
- }
- // Makes it so everytime you click the button it will add 1 to PP
- private double pp = 0;
- private int cslave = 0;
- private double cSlaveC = 10;
- private void Button1_Click(object sender, EventArgs e)
- {
- pp++;
- string current = "Your current PP is ";
- label1.Text = current + pp.ToString();
- }
- private void Button2_Click(object sender, EventArgs e)
- {
- if (pp >= cSlaveC)
- {
- gameLoop.Start();
- pp -= cSlaveC;
- string current = "Your current PP is ";
- label1.Text = current + pp.ToString();
- cslave++;
- cSlaveC = cSlaveC * 2;
- string cslaveM = "You currently have ";
- string cslaveW = " Cookieze slaves";
- label2.Text = cslaveM + cslave + cslaveW;
- button2.Text = "Click here to buy Cookieze slave Cost " + cSlaveC + " PP";
- }
- }
- private void Update(object sender, EventArgs e)
- {
- gameLoop.Start();
- pp++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement