Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Mastering Cocos2d Cross-Platform Game Development
  • Table Of Contents Toc
  • Feedback & Rating feedback
Mastering Cocos2d Cross-Platform Game Development

Mastering Cocos2d Cross-Platform Game Development

By : Alex Ogorek
4.5 (4)
close
close
Mastering Cocos2d Cross-Platform Game Development

Mastering Cocos2d Cross-Platform Game Development

4.5 (4)
By: Alex Ogorek

Overview of this book

If you are a developer who is experienced with Cocos2d and Objective-C, and want to take your game development skills to the next level, this book is going to help you achieve your goal.
Table of Contents (10 chapters)
close
close
9
Index

Turning sounds on and off


Right now, we have sound effects and music playing all the time no matter what. Even though you might be someone who enjoys listening to sounds or music, when you design your games (as it's definitely an element that increases user engagement), you would want to be open to the fact that people just don't like to hear any sound at times. Thus, we must give them the option to turn the sound on and off.

No options or settings? Main menu it is!

Since we don't have a pause screen, options, settings, or anything similar, we're going to add the buttons to turn the sound on and off to the main menu. This means that a lot less code is required to add the buttons, instead of creating an entirely new scene exclusively for them. This arrangement also stays consistent with the clean feel of the game.

Tip

If you want to make a pause screen and add these two buttons to it, then go ahead by all means. The code, however, will be slightly different from what will be described here because...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Mastering Cocos2d Cross-Platform Game Development
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon