Cover image for Unity 3.x Scripting.
Unity 3.x Scripting.
Title:
Unity 3.x Scripting.
Author:
Gerasimov, Volodymyr.
ISBN:
9781849692311
Personal Author:
Edition:
1st ed.
Physical Description:
1 online resource (317 pages)
Contents:
Unity 3.x Scripting -- Table of Contents -- Unity 3.x Scripting -- Credits -- About the Authors -- About the Reviewer -- www.PacktPub.com -- Support files, eBooks, discount offers and more -- Why Subscribe? -- Free Access for Packt account holders -- Preface -- What this book covers -- What you need for this book -- Who this book is for -- Conventions -- Reader feedback -- Customer support -- Downloading the example code -- Errata -- Piracy -- Questions -- 1. Diving into Scripting -- Downloading and installing assets for this book -- Getting started with the game -- Available Character Controllers -- Interactive objects -- Triggers -- Buttons -- Base button script -- Activating platform status -- Explosion box -- The Update function -- The BOOM function -- Downloading the Detonator package -- Pressing the button -- Dynamic objects -- Moving boxes -- Triggered object -- Moving platform -- Moving the character with the platform -- Summary -- 2. Custom Character Controller -- Creating a controllable character -- Custom Character Controller -- Setting up the project -- Creating movement -- Manipulating character vector -- Register input from the user -- The Rigidbody component -- Jumping -- User input verification -- Raycasting -- Improving efficiency in raycasting -- Additional jump functionality -- Running -- Cameras -- Camera scripting -- Creating camera script -- Creating an enumeration list -- Writing functions -- The Initialize function -- Changing camera function -- Changing the camera values function -- Writing camera switching controls -- Character movement and camera positioning -- Updating camera type changing -- Influencing camera with a mouse -- Clamping angles -- Camera's late update -- Rotating character with a camera -- Animation controls -- Playing simple animations -- Start function versus Awake function.

Animation component and playing speed -- Animation scripting -- Walk, run, and idle animations -- Summary -- 3. Action Game Essentials -- Programming weapons and pickables -- Creating the base -- Programming the weapon -- The Shooting function -- Shooting cooldown -- Alternative shooting function -- Advanced animation system -- Working of an animation -- Animation mixing -- Animation script overview -- Weapon pickup -- Adding ammo and health pickups -- Creating a treasure chest -- Applying projectile fixes -- Tethering and soft body -- Tethering -- Creating a tether -- Creating assets -- Tether manager -- Creation of tether -- The StickySegment script -- Tether scripts overview -- Summary -- 4. Drag-and-Drop Inventory -- GUI basics -- GUI.Box -- GUI.Button -- GUI.Label -- GUI.TextField -- GUI.TextArea -- GUI.Toggle -- GUI.Toolbar and GUI.SelectionGrid -- GUI.HorizontalSlider and GUI.VerticalSlider -- GUI.HorizontalScrollBar and GUI.VerticalScrollBar -- GUI.BeginGroup and GUI.EndGroup -- GUI.BeginScrollView, GUI.EndScrollView, and ScrollTo -- Other GUI classes -- Drag-and-drop inventory -- Basics -- Inventory slots and draggable objects -- Working with GUI windows -- Inventory slots -- Patching the inventory -- Character customization -- 3D character avatar -- Dealing with a camera -- Adjusting the camera -- Window dragging limits -- Customization -- Setting up items -- Adding items -- Modifying character -- Reloading and inventory -- Finishing adjustments -- Summary -- 5. Dynamic GUI -- Radial health display -- The Health script -- Health display script -- Revisiting the Health script -- Hooking up objects to Inspector -- Creating items -- The Change_Item script -- Setting up the code -- Changing items -- Addition and removal -- Displaying items -- Increment controls -- Creating the UseItem script -- Revisiting the Change_Item script.

The PlayerStats script -- The TextManager script -- The textMesh script -- Revisiting the UseItem script -- Revisiting the Health script -- Creating armor -- The Armor script -- Revisiting the HealthBar script -- Revisiting the Health script -- Revisiting the UseItem script -- Creating the weapons -- The Change_Weapon script -- The UseWeapon script -- Revisiting PlayerStats -- Revisiting the textMesh script -- Scripting and displaying the score system -- The Score script -- Reading from the text file -- Writing to the text file -- The timer script -- Revisiting the textMesh script -- Displaying the objectives -- Revisiting TextManager -- Revisiting textMesh -- Hooking up HUD -- Game manager -- Health -- Item_Pic -- ItemMultiplier, highScoreDisplay, ObjectiveDisplay, scoreDisplay, and weaponDisplay -- saveDisplay -- Weapon_Pic -- Creating the targeting system -- Creating the Bezier equation script -- ArcBehaviour -- The moveObject script -- Hooking it up in the editor -- Summary -- 6. Game Master Controller -- Game manager theory -- Creating game managers -- Level streaming -- Mission creation -- Managing levels -- Save/load system -- Loading with checkpoints -- GameLoader -- Dynamic camera -- Audio -- Audio manager -- Summary -- 7. Introduction to AI Pathfinding and Behaviors -- Simple waypoint pathfinding -- Setting up the hierarchy -- Writing the waypoint display script -- Setting up the path arrays -- Creating the aiSimplePath script -- Declaring variables -- Starting up functions -- Traversing the path -- Shutting down the robot -- Hooking up the aiSimplePath script on Inspector -- Enemy statistics, shooting, and behaviors -- The enemyStats script -- Setting up variables -- Setting up functions -- Retrieving functions -- Manipulation functions -- Hooking up the enemyStats script on Inspector -- The Shoot script -- Setting up the script.

Writing shooting functionality -- Hooking up the Shoot script on Inspector -- The aiSimpleBehaviour script -- Setting up the script -- Behavior functions -- Additional functions -- Hooking up the aiSimpleBehaviour script on Inspector -- Returning to the aiSimplePath script -- Pursue functionality -- Revisiting the EnemyPath function -- The bulletCollision, ammoCollision, and AmmoInfo scripts -- Creating the bulletCollision script -- Hooking up the bulletCollision script on bullet's Inspector -- Creating the ammoCollision script -- Hooking up the ammoCollision script on enemy's Inspector -- Creating the AmmoInfo script -- Hooking up the AmmoInfo script on ammo's Inspector -- Summary -- A. Object-oriented Programming in Unity -- Object-oriented programming - basics -- Encapsulation -- Classes -- Constructors -- Code -- Inheritance -- Preparations -- Code -- Polymorphism -- Code -- Nested classes -- Summary -- Index.
Abstract:
Write efficient, reusable scripts to build custom characters, game environments, and control enemy AI in your Unity game with this book and ebook.
Local Note:
Electronic reproduction. Ann Arbor, Michigan : ProQuest Ebook Central, 2017. Available via World Wide Web. Access may be limited to ProQuest Ebook Central affiliated libraries.
Added Author:
Electronic Access:
Click to View
Holds: Copies: