Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Getting Started with Unity 5

You're reading from   Getting Started with Unity 5 Leverage the power of Unity 5 to create amazing 3D games

Arrow left icon
Product type Paperback
Published in May 2015
Publisher
ISBN-13 9781784398316
Length 184 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Dr. Edward Lavieri Jr. Dr. Edward Lavieri Jr.
Author Profile Icon Dr. Edward Lavieri Jr.
Dr. Edward Lavieri Jr.
Arrow right icon
View More author details
Toc

C# programming primer


C# is a comprehensive programming language. Teaching you how to use this language is beyond the scope of this book. I'll provide enough information in this section so that you can understand the custom scripts we'll be writing for our game.

Note

For a deeper understanding of how to program using the C# language, you can use one of the many books available from Packt Publishing on the subject.

C# is both a function-based and object-oriented language. Functions are reusable sections of code that we script. For example, if we create a script called feedPig, it might handle transferring water and corn from Colt to a pig. Since we have multiple pigs in our game, this function would probably get used a lot.

As I've mentioned, C# is also an object-oriented programming (OOP) language. OOP languages use classes, which are sets of data and functions. If we have a babyChick class, for example, that class can hold data on how much corn the baby chick has eaten. That same class can...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image