Beispiel #1
0
    // The values of colours in sprite sheets
    //5 == yellow
    //4 == red
    //3 == purple
    //2 == green
    //1 == blue

    // Use this for initialization
    void Start()
    {
        grid = new Robotnik[rows, columns];
        for (int j = 0; j < rows; j++)
        {
            for (int i = 0; i < columns; i++)
            {
                Robotnik newRobotnik = new Robotnik();
                grid[j, i]       = newRobotnik;
                grid [j, i].name = "Grid-" + j + "-" + i;
            }
        }
    }
Beispiel #2
0
        static void Main(string[] args)
        {
            Robotnik robotnik1 = new Robotnik();
            Robotnik robotnik2 = new Robotnik();

            Thread t1 = new Thread(robotnik1.wypisz1);
            Thread t2 = new Thread(robotnik2.wypisz2);

            t1.Start();
            t2.Start();

            for (int i = 0; i < 10; i++)
            {
                Console.ForegroundColor = ConsoleColor.Blue;
                Console.WriteLine("===================");
                Console.ResetColor();
            }

            Console.ReadKey();
        }