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

Chapter 5. Scripting the Game

Our game is really taking shape. So far, we've completed the game design, game environment, player character, non-player characters, and animations. That is a lot of work for just four chapters. There are a few things we need to accomplish in order to complete our game. First on this list is scripting the game.

In this chapter, we will write scripts for:

  • Managing the amount of water and corn that Colt collects
  • Monitoring how much water and corn each farm animal is given
  • Managing when a piglet becomes a pig and when a baby chick becomes an adult chicken
  • Managing when pigs and chickens reach blue ribbon status

Before we dive right into scripting, I'll provide a C# programming primer for those that need it. We'll also review how scripting is accomplished in Unity, where to find scripts, and how to use MonoDevelop.

After reading this chapter, you will:

  • Understand the fundamentals of C#
  • Be able to use MonoDevelop to create and edit scripts
  • Be able...
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