i am working on a arcade flight sim game for iPhone. I need to create a “boost” button that would boost speed of plane as button is pressed and return to normal as depressed (obviously). I have studied the script reference and gui reference but cannot get my head around it. here is button script…
function OnGUI () {
if (GUI.RepeatButton (Rect (Screen.width - 100,Screen.height - 50,100,50), “Boost!”)) {
// This code is executed every frame that the RepeatButton remains clicked
}
}
i need that button script to increase this script below…
need to increase the “1000” integer when button is pressed…i do not have a throttle control, plane flies at constant speed when game starts, just want to add a little speed boost to help game play.