万本电子书0元读

万本电子书0元读

顶部广告

Unity Game Development Scripting电子书

售       价:¥

3人正在读 | 0人评论 9.8

作       者:Kyle D'Aoust

出  版  社:Packt Publishing

出版时间:2014-12-22

字       数:99.4万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
If you are new to Unity *ing and want to learn simple and modular code and advance your knowledge to the next level, this is the book for you.
目录展开

Unity Game Development Scripting

Table of Contents

Unity Game Development Scripting

Credits

About the Author

About the Reviewers

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. Interactive Input

Picking the controls

Mapping the needed controls

Checking the input manager

Checking the Xbox 360 Controller inputs

Adding additional controller inputs

Adding a start button and trigger inputs

Adding directional pad inputs

Adding PC control inputs

Housing our control script

Creating and naming the script

Formatting the script

Creating the device detector

Adding the variables needed

Creating the detection function

Creating the identifier function

Let's get set and show them

Adding variables for each control

Adding a function to display the variables

Let's switch!

Creating control profiles

Adding a profile switching function

Adding the GUI interaction function

Customization is key

Swapping control schemes

Adding a control switch button to the GUI

Cycling control inputs

Adding the controls pop up to the GUI

Resetting the controls

Adding the Reset function

Adding the Reset input

Playtesting

Summary

2. GUI Time

A traditional 2D UI

Setting up our scene

Housing our 2D UI

Creating GUI buttons

Creating a health bar

Level counter

Creating an experience counter

Housing our 3D UI

Creating a 3D health bar

Creating 3D damage reports

The new Update function

Completing the damage reports

Creating 3D name tags

Summary

3. Expandable Item Classes

The self item class

Adding our variables

Buff or debuff stats

The health changer

The armor changer

The item activator

The melee item class

Adding our variables

Buff or debuff stats

The health changer

Let's interact with the environment

Detecting triggers

The projectile item class

Adding our variables

Buff or debuff stats

The health changer

Adding movement

Detecting triggers

Playtesting

Summary

4. Inventory

Features of an inventory

Limits of the inventory

Accessing the inventory

Organizing an inventory

Item count modifications

Item bartering

Dropping and picking up items

Destroying and using items

Displaying the inventory

Creating the inventory script

Creating and naming the script

Adding the necessary variables

Initializing our inventory

Creating the initializer

Adding items

Let's figure this out

Creating the adding function

Removing items

Let's figure this out

Creating the removing function

Setting the quick-select items

Setting the quick-select items quickly

Let's display the inventory

Using our custom inputs

Displaying the GUI

Running the GUI

Playtesting

Creating a test scene

Let's add an item

Let's remove some items

Other things to try out

Summary

5. Enemy and Friendly AIs

AI techniques

Finite state machines

The behavior tree form of the AI system

Combining the techniques

Let's start scripting!

Internal and external actions

External actions

Internal actions

Scripting the actions

Pathfinding

Creating paths using the waypoint system

Unity's NavMesh system

Setting up the environment

Creating the NavMesh

Adding our variables

Scripting the navigation functions

Character animations

Importing the model mesh

Scripting the animations

Putting it all together

Final coding touches

Filling out the inspector

Playtesting

Summary

6. Keeping Score

Prototype stats

Assigning the stats to the player

The stat tracker

Setting the stats

Resetting the stats

Resetting all of our prefs

Saving all of our prefs

Setting a specific pref

Resetting a specific pref

Showing our stats on the screen

The achievement system

Prototyping the achievements

Adding the required achievement variables

Resetting the achievements

Achievement trackers

Tracking the kills

Tracking the gold total

Tracking the gold spent

Tracking the player's level

Tracking the rounds won

Tracking the time played

Let's check the achievements

Checking a specific achievement

Checking all of the achievements

Displaying the achievements on screen

Adding the GUI functions

Playtesting

Summary

7. Creating Save and Load Systems

Saving data with flat files

Adding the required variables

Time to save our file

Deleting our flat files

Loading our flat files

Time to load our file

The XML save system

Creating our XML files

Saving data with XML

Adding the required variables

Saving the player data

Saving the enemy data

Loading data with XML

Loading the player data

Loading the enemy data

Creating the SaveHandler script

The checkpoint system

The save anywhere-anytime system

Playtesting

Summary

8. Aural Integration

Background music

Creating a random system

Adding a playlist system

Implementing the audio systems

Atmospheric sounds

Creating the script and variables

Initializing the variables

Playing the atmospheric sounds

Sound effects

Creating the script and variables

Playtesting

Summary

9. Game Settings

Figuring out what to optimize

Making video configurations

Setting the values

Toggling the shadows

Setting the field of view

Setting the resolution

Toggling the anti-aliasing property

Setting vsync

Changing the quality settings

Loading the settings

Making audio configurations

Setting the values

Configuring the volumes

Setting the speaker mode

Creating the settings menu

Preparing the code

Creating the GUI

Saving all the values

Loading all the values

Playtesting

Summary

10. Putting It All Together

Creating levels

The main menu

The playable level

Creating player interactions

Shooting and pausing

Collecting potions

Adding all the sounds

Playing the background music

Adding the atmospheric sounds

Implementing the GUI

Adding the script

Tracking stats

Adding the script

Saving and loading

Adding the script

Final preparations

Adding win conditions

Affecting the AI

Finalizing the items

Creating more levels

Playtesting

Summary

Index

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部