售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
NGUI for Unity
Table of Contents
NGUI for Unity
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
Downloading the color images of this book
Errata
Piracy
Questions
1. Getting Started with NGUI
What is NGUI?
UnityGUI versus NGUI
Atlases
Events
Localization
Shaders
Importing NGUI
Creating your UI
UI Wizard
Window
Parameters
Separate UI Layer
Your UI structure
UI Root (2D)
Parameters
Camera
Parameters
Anchor
Parameters
Panel
Parameters
Summary
2. Creating Widgets
Creating our first widget
Widget Wizard
Selecting an atlas
Creating a widget from a template
Transforming widgets
Moving widgets
Rotating widgets
Scaling widgets
Common widget parameters
Sprites
Sliced sprites
Tiled sprites
Filled sprites
Labels
Parameters
Creating the title bar
Buttons
Parameters
The play and exit buttons
Text input
Parameters
Creating a nickname box
Slider
Parameters
Creating a volume slider
Toggle
Parameters
Creating a sound toggle
Popup list
Parameters
Creating a difficulty selector
Summary
3. Enhancing your UI
NGUI components
The draggable panel
Parameters
Dragging the MainMenu
The drag-and-drop system
Powers selection
Draggable items container
Draggable items
The drop surface
Prefab instantiated on drop
Handling an invalid drop
Replacing the current item
Removing the current item
Animations with NGUI
Smooth powers apparition
Clipping to hide options
Scrollable text
Localization system
Localization files
Localization component
Language selection box
Localizing a Label
Summary
4. C# with NGUI
Events methods
Creating a tool tip
The tool tip reference
Showing the tool tip
Tween methods
Main menu apparition
Simple Tween
Smooth Tween
Using keys for navigation
Error notification
Saving the nickname
Sending messages
Forwarding an event
Summary
5. Building a Scrollable Viewport
Preparing the Game scene
The scrollable viewport
Draggable background
Linking scroll bars
Keyboard scrolling
Creating draggable barriers
The BarrierObject prefab
Dropping a barrier on Viewport
Creating an ActiveBarrier prefab
The ActiveBarrier prefab
Instantiating the ActiveBarrier prefab
Barrier's building process
Forwarding events to viewport
BarrierObject cooldown
Cooldown implementation
BarrierObject smooth apparition
The barrier availability tool tip
Summary
6. Atlas and Font Customization
The Atlas prefab
Creating a new Atlas
Adding sprites to Atlas
Simple sprites
Adding sprites to Atlas
Available powers icons
Selected powers icons
Sliced sprites
Adding a sprite to Atlas
Configuring a sliced sprite
The Main Menu window
Tiled sprites
Adding a font
Exporting a font using BMFont
Creating a font in Unity
Assigning a new font to Label
Customizing the MainMenu
Summary
7. Creating a Game with NGUI
Enemy spawning
Creating the enemies container
Creating the Enemy prefab
Creating the enemy spawn controller
Forwarding events to viewport
Handling enemy collisions
Collisions with active barriers
Colliding with the bottom of the screen
Healthbar
The EndOfScreen widget
Creating self-destruct code
The hacking slider
Self-destruct code
Assigning code to an enemy
The hacking process
Handling player input
Summary
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜