Sponsor

Creating a simple Maze game using C# for beginners (C言語でゲームを作る方法)

Wondering how to make your first simple Game using C#. If you are new to programming world then may be you are wondering if You could actually make anything like a "GAME" in C language.
Of course, you can. Here I have again created a new tutorial video on how  to make  a simple "Maze Game" using C# for beginners.




Code 
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace maze_game
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            MoveToStart();
     
        }

        private void label1_MouseEnter(object sender, EventArgs e)
        {
            MessageBox.Show("Congratulation");
            Close();
        }
        private void MoveToStart()
        {
            Point startingPoint = panel1.Location;
            startingPoint.Offset(10, 10);
            Cursor.Position = PointToScreen(startingPoint);
        }

        private void label2_MouseEnter(object sender, EventArgs e)
        {
            MoveToStart();
        }
        int flag = 0;
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (flag == 0)
            {
                label13.Enabled = true;
                label13.Visible = true;
                flag = 1;
            }
            else
            {
                label13.Enabled=false;
                label13.Visible=false;
                flag=0;
            }
        }
       

     

        

       
    }

}



Share on Google Plus

About Unknown

We bring you the latest breaking news that are happening around the world. For daily news, celebrity gossips, scoops, scandals, sports news, crime news and many more, don't forget us to visit ... www.satyaaawaz.com.
    Blogger Comment
    Facebook Comment

0 comments :

Post a Comment