Game Development Reference
In-Depth Information
You will learn to implement behaviors based on the device internal clock. You
will also learn how to modelize the movements of the clock hands through
rotation and angle calculation.
Accessing the Device Clock
In order to display the current time, you will be using the clock from the device
attributes, which is a great set of attributes. The clock gives you access to the
device time from the year and up to the milliseconds as per Figure 10-2.
Figure 10-2. The Clock set of attributes
Although this example will only create a clock, you will cover some manipulation
of the clock attributes which you can use to extend your ideas out of the box
and integrate those attributes in new features of your games. For example, you
could create a special icon on the Menu page that will only display on the 4 th of
July to celebrate Independence Day.
Creating the Clock Project
Open the GameSalad Creator and create a new project. Configure the project
info as per Table 10-1.
 
Search WWH ::




Custom Search