-
Book Overview & Buying
-
Table Of Contents
OUYA Game Development by Example
By :
We'll now use the input library you imported to capture data from the controller and translate it into movement that will be applied to our marble by performing the following steps:
Create a Scripts folder in your Assets directory to store all of your script files, if you haven't already done so, then right-click on it and create a new C# script.
Name the file MarbleInputManager and open it in your preferred code editor.
Recall the Start and Update functions from Chapter 3, Diving into Development, which will already be present in the code file; we'll be using Update for most of this chapter.
To link the code file with your marble, left-click and drag it onto the prefab you created or add it as a new script component using the Add Component button in the Inspector menu.
You can also drag it onto the actual marble on the screen, but this will only apply the script to that instance of the prefab; adding the script to the prefab itself will cause all...
Change the font size
Change margin width
Change background colour