Vahe Karamian

Introduction to Game Programming: Using C# and Unity 3D

Notify me when the book’s added
To read this book, upload an EPUB or FB2 file to Bookmate. How do I upload a book?
  • polymarinahas quoted4 years ago
    // The parameter x is passed by reference.
    // Changes to x will affect the original value of x.
    static void SquareIt(ref int x)
    {
    x *= x;
    System.Console.WriteLine("The value inside the method: {0}", x);
    }
    static void Main(string[] args)
    {
    int n = 5;
    System.Console.WriteLine("The value before calling the method: {0}", n);
    SquareIt(ref n); // Passing the variable by reference.
    System.Console.WriteLine("The value after calling the method: {0}", n);
    System.Console.WriteLine("Press any key to exit.");
    System.Console.ReadKey();
    }
  • polymarinahas quoted4 years ago
    [access modifier] return-type method-name([parameter-type parameter-name[]]) { /* method-body */ }
  • polymarinahas quoted4 years ago
    access modifier] return-type method-name([parameter-type parameter-name[]]) { /* method-body */ }
  • polymarinahas quoted4 years ago
    for (int loopCount = 0; loopCount < 10; loopCount++)
    {
    // do something here ...
    }
  • polymarinahas quoted4 years ago
    while(x<10)
    {
    // do something here ...
    x++;
    }
    do
    {
    // do something here ...
    x++;
    } while (x < 10);
    Code Block 5-loop structure samples
  • Dragos Mihaihas quoted6 years ago
    Program = Data + Algorithm
    A program is like a recipe. It contains a list of variables that represent the data to be processed, and a list of directions, the algorithm(s) that perform special operations on the data.
fb2epub
Drag & drop your files (not more than 5 at once)