![]() It just has to be there for the method to work. We will not need a Rigidbody for this one neither do we need to access this collider by code.The method is called whenever the mouse clicks in the range of a collider of that gameObject.įor this add 'Circle Collider 2D' component. MonoBehaviour gives us just the method we need for it, named onMouseDown. In this script file, we have to set up the method to detect the object being clicked.Create a new script called "SuccessSound" and open it up.Not doing so will make the sound play the moment the game starts. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |