Game Development Reference
In-Depth Information
On Rules and Behaviors
Create a group and name it ''Position the On button.'' Drag and drop a Change
Attribute behavior and change on.Position.X to 60. Drag and drop a second
Change Attribute behavior and change on.Position.Y to 30.
Drag and drop a Display Text behavior and type the text ''On'' inside. You can
leave all other settings as the defaults. The action view should match
Figure 10-11.
Figure 10-11. On action view
Lastly, create a new rule and name it ''On is pressed.'' The condition is ''Actor
receives event'' ''touch'' is ''pressed.'' Then drag and drop a Change Attribute
behavior and change game.InMovement to 1 as per Figure 10-12.
Search WWH ::




Custom Search