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 Unity 2D game development
  • Table Of Contents Toc
Mastering Unity 2D game development

Mastering Unity 2D game development

By : Simon Jackson
3.8 (21)
close
close
Mastering Unity 2D game development

Mastering Unity 2D game development

3.8 (21)
By: Simon Jackson

Overview of this book

If you have C# knowledge but now want to become truly confident in creating fully functional 2D RPG games with Unity, then this book will show you everything you need to know.
Table of Contents (15 chapters)
close
close
Lock Free Chapter
1
1. Overview
14
Index

Communicating between game objects


In any game, there are planned interactions between any components within the game. These could be as follows:

  • Physics collision tests

  • Reacting to being shot or shooting

  • Opening and closing doors

  • Triggers, switches, or traps

  • Two or more characters talking

There are several ways in which you can achieve this, and each has their own particular traits. The selection of the implementations depends on what you need to achieve. The methods are as follows:

  • Delegates

  • Events

  • Messaging

In this section, we will go through each method in detail and highlight the best uses of each.

Delegates

We encounter delegates in our everyday lives. Sometimes they are managers, sometimes they are subordinates, and they could even be the barista at your local coffee shop. Delegates effectively are methods that accept pieces of work to do on behalf of someone else.

Tip

Another form of delegates is to use the C# generics and the Action or Action<T> methods, which is a shorthand version of...

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 Unity 2D 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