Hi there,
I am very new to programming and learning from examples such as "Appsamuck", in particular an
application/game with a stoplight and a gas pedal. The object is to hit the gas pedal as fast as you can
when the light turns green:
http://appsamuck.com/day6.html
(The project file is downloadable with all the code)
I understand most of this except that I don't know:
* Where is the code to utilize the image of the gas pedal?
* Where is the code to utilize the image of the background?
* Where is the code for handling the touching of the pedal image is located?
I've looked throughout the code files and XIB files without luck. I understand the rest
of the example and it has taught me a lot but I am stuck with this.
Also, I know how to play a short sound:
NSString *path = [[NSBundle mainBundle] pathForResource"myCustomSound" ofType"wav"];
SystemSoundID soundID;
AudioServicesCreateSystemSoundID((CFURLRef) [NSURL fileURLWithPathath]
, &soundID);
AudioServicesPlaySystemSound (soundID);
I am wondering, where I would add this (as an IBAction perhaps?) in the code in order to play a
short sound as each of the lights change and another as the pedal is pressed?
Sorry if this is obvious, I am trying to learn from the code examples and by attempting to modify them.
Thanks!
I am very new to programming and learning from examples such as "Appsamuck", in particular an
application/game with a stoplight and a gas pedal. The object is to hit the gas pedal as fast as you can
when the light turns green:
http://appsamuck.com/day6.html
(The project file is downloadable with all the code)
I understand most of this except that I don't know:
* Where is the code to utilize the image of the gas pedal?
* Where is the code to utilize the image of the background?
* Where is the code for handling the touching of the pedal image is located?
I've looked throughout the code files and XIB files without luck. I understand the rest
of the example and it has taught me a lot but I am stuck with this.
Also, I know how to play a short sound:
NSString *path = [[NSBundle mainBundle] pathForResource"myCustomSound" ofType"wav"];
SystemSoundID soundID;
AudioServicesCreateSystemSoundID((CFURLRef) [NSURL fileURLWithPathath]
, &soundID);
AudioServicesPlaySystemSound (soundID);
I am wondering, where I would add this (as an IBAction perhaps?) in the code in order to play a
short sound as each of the lights change and another as the pedal is pressed?
Sorry if this is obvious, I am trying to learn from the code examples and by attempting to modify them.
Thanks!