Game Development Reference
In-Depth Information
We are now going to create three new game attributes; each will correspond to
the button being pressed. Go to our scene, and click on the Game button in the
Inspector window, and under the Attributes tab add three new Boolean attributes,
LeftButton , RightButton , and JumpButton .
Now let's start editing each button in the Library, not in the scene. We'll start with
the left arrow button. Create a new rule, name it Button Pressed , change it to Actor
receives event | touch | is pressed . Inside that rule, drag in a change attribute
behavior and change it to game.LeftButton | to true ; then expand the Otherwise
drop down in the rule and copy and paste the previous change attribute rule into the
Otherwise section and change it from true to false .
 
Search WWH ::




Custom Search