Adding NPCs and a conversation system to our game
Right, after all of that brain input, let's start applying it to our game. In this chapter, we are aiming to add an NPC to our scene that will interact with the player.
Before moving forward, we should also do with a little tidying up of our Scripts
folder, since we are generating a lot more content now. To do this, perform the following steps:
- Under
Assets\Scripts
, create three new folders:Classes
,Messaging
, andNavigation
. - Copy the
Entity
andPlayer
scripts to the newClasses
folder or create them if you haven't already. - You may delete all of the files created in this chapter (or place them in an
Examples
folder) exceptMessagingManager.cs
,MessagingClientBroadcast.cs
, andMessagingClientReceiver.cs ...
Get Mastering Unity 2D Game Development - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.