All pastes #770402 Raw Edit

Stuff

public text v1 · immutable
·published 2007-11-12 07:17 UTC
rendered paste body
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;


namespace Popping_animals
{
    public partial class Form1 : Form
    {
        private int totalGameTime = 0;
        private int radius = 200;
        public Form1()
        {
            InitializeComponent();
        }

        private void Update_Tick(object sender, EventArgs e)
        {
            UpdateScreen();
            totalGameTime += 2;
        }
        private void UpdateScreen()
        {
            pictureBox1.Left = pictureBox1.Width / 2 + (int)Math.Sin(totalGameTime) * radius;
            pictureBox1.Top = pictureBox1.Height / 2 + (int)Math.Cos(totalGameTime) * radius;
        }
    }
}