void OnGUI() { if (mobile_turned_on == true) { DrawGUI.DrawTexture(wRect.x, wRect.y, wRect.width, wRect.height, buttonTexture); DrawGUI.DrawTexture(sRect.x, sRect.y, sRect.width, sRect.height, buttonTexture); DrawGUI.DrawTexture(aRect.x, aRect.y, aRect.width, aRect.height, buttonTexture); DrawGUI.DrawTexture(dRect.x, dRect.y, dRect.width, dRect.height, buttonTexture); DrawGUI.DrawTexture(iRect.x, iRect.y, iRect.width, iRect.height, buttonTexture); DrawGUI.DrawTexture(jRect.x, jRect.y, jRect.width, jRect.height, buttonTexture); DrawGUI.DrawTexture(kRect.x, kRect.y, kRect.width, kRect.height, buttonTexture); DrawGUI.DrawTexture(lRect.x, lRect.y, lRect.width, lRect.height, buttonTexture); } }
/* * void FixedUpdate(){ * GetVelocity (); * ClampingSpeedValues(); * MovementUpDown(); * MovementLeftRight(); * Rotation(); * MovementForward(); * SettingControllerToInputSettings (); * BasicDroneHoverAndRotation (); * } * * void Update(){ * RotationUpdateLoop_TrickRotation(); * Animations(); * DroneSound(); * CameraCorrectPickAndTranslatingInputToWSAD (); * } */ /// <summary> /// Drawing button images on screen /// </summary> void OnGUI() { if (mobile_turned_on == true) { DrawGUI.DrawTexture(wRect.x, wRect.y, wRect.width, wRect.height, forward_button_texture); DrawGUI.DrawTexture(sRect.x, sRect.y, sRect.width, sRect.height, backward_button_texture); DrawGUI.DrawTexture(aRect.x, aRect.y, aRect.width, aRect.height, leftward_button_texture); DrawGUI.DrawTexture(dRect.x, dRect.y, dRect.width, dRect.height, rightward_button_texture); DrawGUI.DrawTexture(iRect.x, iRect.y, iRect.width, iRect.height, upwards_button_texture); DrawGUI.DrawTexture(jRect.x, jRect.y, jRect.width, jRect.height, rotation_left_button_texture); DrawGUI.DrawTexture(kRect.x, kRect.y, kRect.width, kRect.height, downwards_button_texture); DrawGUI.DrawTexture(lRect.x, lRect.y, lRect.width, lRect.height, rotation_right_button_texture); } }