售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Cocos2d Cross-Platform Game Development Cookbook Second Edition
Table of Contents
Cocos2d Cross-Platform Game Development Cookbook Second Edition
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
eBooks, discount offers, and more
Why Subscribe?
Preface
What this book covers
What you need for this book
Who this book is for
Sections
Getting ready
How to do it…
How it works…
There's more…
See also
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Sprites and Animations
Introduction
Downloading and installing Cocos2d
Getting ready
How to do it…
How it works…
The 2D coordinate system
Getting access to MainScene
Getting ready
How to do it…
How it works…
Adding sprites to scenes
Getting ready
How to do it…
How it works…
Creating a sprite using RenderTexture
Getting ready
How to do it…
How it works…
There's more…
Creating a custom sprite class
Getting ready
How to do it…
How it works…
Animating sprites
Getting ready
How to do it…
How it works…
Adding actions to sprites
Getting started
How to do it…
How it works…
There's more…
Drawing glPrimitives
Getting ready
How to do it…
How it works…
There's more…
Adding the parallax effect
Getting ready
How to do it…
How it works…
2. Scenes and Menus
Introduction
Adding a MainMenu Scene
Getting ready
How to do it…
How it works…
Adding text using CCLabel
Getting ready
How to do it…
How it works…
There's more…
Adding buttons with CCMenu
Getting ready
How to do it…
How it works…
Adding a Gameplay Scene
Getting ready
How to do it…
How it works…
Transitioning between scenes
Getting ready
How to do it…
How it works…
There's more…
Adding transition effects
Getting ready
How to do it…
How it works…
There's more…
Adding a Level Selection Scene
Getting ready
How to do it…
How it works…
Scrolling a Level Selection Scene
Getting ready
How to do it…
How it works…
3. Gestures, Touches, and the Accelerometer
Introduction
Understanding swipe
Getting started
How to do it…
How it works…
There's more…
Implementing tap
Getting started
How to do it…
How it works…
Adding LongPress
Getting ready
How to do it…
How it works…
Adding pinch/zoom controls
Getting ready
How to do it…
How it works…
Adding rotation objects
Getting ready
How to do it…
How it works…
Adding panning
Getting ready
How to do it…
How it works…
Including touches
Getting ready
How to do it…
How it works…
Creating objects with touchBegan
Getting ready
How to do it…
How it works…
There's more…
Moving objects with touchMoved
Getting ready
How to do it…
How it works…
Customizing touches in the sprite class
Getting ready
How to do it…
How it works…
Adding an accelerometer
Getting ready
How to do it…
How it works…
Adding a directional pad
Getting ready
How to do it…
How it works…
There's more…
4. Physics
Introduction
Adding physics to a game scene
Getting started
How to do it…
Adding physics objects
Getting started
How to do it…
How it works…
Looking at different body types
Getting started
How to do it…
How it works…
Adding sprite texture to physics objects
Getting started
How to do it…
How it works…
Creating composite bodies
Getting started
How to do it…
How it works…
Creating complex shapes
Getting started
How to do it…
How it works…
Changing body properties
Getting started
How to do it…
How it works…
There's more…
Applying impulse with the touch control
Getting started
How to do it…
How it works…
Applying force with the accelerometer
Getting started
How to do it…
How it works…
Collision detection
Getting started
How to do it…
How it works…
Adding revolute joints
Getting started
How to do it…
How it works…
Adding motor joints
Getting started
How to do it…
How it works…
Adding a game loop and scoring
Getting ready
How to do it…
How it works…
5. Audio
Introduction
Adding background music
Getting ready
How to do it…
How it works…
Adding audio effects
Getting ready
How to do it…
How it works…
Adding a mute button
Getting ready
How to do it…
How it works…
Adding a volume slider
Getting ready
How to do it…
How it works…
Adding a pause and resume button
Getting started
How to do it…
How it works…
6. AI and A* Pathfinding
Introduction
Patrol enemy behavior
Getting ready
How to do it…
How it works…
Projectile shooting enemy
Getting ready
How to do it…
How it works…
Chasing enemy behavior
Getting ready
How to do it…
How it works…
A* pathfinding
Getting ready
How to do it…
How it works…
7. Data Storage and Retrieval
Introduction
Loading the XML file data
Getting started
How to do it…
How it works…
Saving to the XML file data
How to do it…
How it works…
Loading the JSON file data
Getting ready
How to do it…
How it works…
Loading the PLIST file data
Getting ready
How to do it…
How it works…
Saving the PLIST file data
Getting ready
How to do it…
How it works…
Using NSUserDefaults
How to do it…
How it works…
8. Effects
Introduction
CCEffects
Getting ready
How to do it…
Adding the bloom effect
Adding the blur effect
Adding the brightness effect
Adding the drop shadow effect
Adding the pixelate effect
Adding the stack effect
How it works…
Adding the glass effect
Getting ready
How to do it…
How it works…
Adding the motion streak effect
Getting ready
How to do it…
How it works…
Adding the particle effect
Getting ready
How to do it…
How it works…
There's more…
Adding 2D lighting
Getting ready
How to do it…
How it works…
There's more…
9. Game Tools
Introduction
Glyph Designer
Getting ready
How to do it…
How it works…
Particle system
Getting ready
Particle Designer
Emitter configuration
Particle Settings
Color settings
Texture settings
Particle2dx
Motion
Color&Shape
Template
Export
How to do it…
How it works…
TexturePacker
Getting ready
Data
Texture
Layout
Sprites
How it works…
PhysicsEditor
Getting ready
How to do it…
How it works…
10. Swift/SpriteBuilder Basics
Introduction
Implementing the Swift syntax
Getting started
How to do it…
Variables
Operators
Arithmetic operators
Comparison operators
Logical operators
Arithmetic increment/decrement and assignment operations
Control flow statements
Decision making statements
The if statement
The if else statement
The else if statement
The conditional expression
The switch statement
Looping statements
The while loop
Repeating the while loop
The for loop
The for in loop
Arrays
Looping through arrays
Adding, removing, and inserting objects in arrays
Important array functions
Dictionary
Adding and removing objects in a dictionary
Looping through items in a dictionary
Dictionary functions
Functions
Simple functions
Passing a parameter
Passing more than one parameter
Returning a value
Default and named parameters
Returning more than one value
Classes
Properties and initializers
Custom methods
Inheritance
Access specifiers
Optionals
Implementing Cocos2d Swift
Getting ready
How to do it…
How it works…
SpriteBuilder basics
Getting ready
How to do it…
How it works…
11. Porting to Android
Introduction
Installing the Android Xcode plugin
Getting started
How to do it…
Enabling USB debugging on a device
How to do it…
Running the SpriteBuilder project on a device
How to do it…
Porting a project to Android
How to do it…
No Java runtime error
How to do it…
Provision profile error
How to do it…
Blank screen error
How to do it…
Useful resources
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜