コード例 #1
0
ファイル: Program.cs プロジェクト: nandorsoma/LameSnakeGame
        static void Main()
        {
            Snake snake;
            Food food;
            Enviroment enviroment;
            snake = new Snake();
            food = new Food();
            enviroment = new Enviroment();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: nandorsoma/LameSnakeGame
        public Form1()
        {
            InitializeComponent();
            snake = new Snake();
            food = new Food();
            gamecontrol = new GameControl();
            enviroment = new Enviroment();
            food.CreateFood();  // hogy a legelején legyen kaja

            // dupla bufferelés
            SetStyle(ControlStyles.DoubleBuffer |
                ControlStyles.UserPaint |
                ControlStyles.AllPaintingInWmPaint,
                true);
            UpdateStyles();
        }