Last active
January 20, 2017 05:10
-
-
Save wertgit/0df8d4f6833fbea8cbc4cb5a096647b6 to your computer and use it in GitHub Desktop.
Card Correction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Plays the correction animation when the user gets the answer wrong | |
ParallelAnimation { | |
id: correciton_animation | |
alwaysRunToEnd: true | |
ScaleAnimator { running: false ; target: thefirstword; from: 1; to: 1.3; duration: 600 ; easing.type: Easing.OutExpo; } | |
ScaleAnimator { running: false ; target: thesecondword; from: 1; to: 1.3; duration: 600 ; easing.type: Easing.OutExpo; } | |
ScaleAnimator { running: false ; target: answer_word; from: 1; to: 1.3; duration: 600 ; easing.type: Easing.OutExpo; } | |
ScaleAnimator { running: false ; target: is; from: 1; to: 1.1; duration: 400; easing.type: Easing.OutExpo; } | |
onStopped: { | |
if( user_answer == 1){ | |
answer_word.text = Logic.getColorCodetext(thefirstword.color) | |
answer_word.color = thefirstword.color | |
thesecondword.visible = false | |
bottom_text_flipable.visible = true | |
is.text = brokecolors ? "was" : "is" | |
bottom_text_flipable.flipped = !bottom_text_flipable.flipped | |
correct_color_bottom.start() | |
} | |
if(user_answer == 0){ | |
is.text = brokecolors ? "was" : "is" | |
scale_animation_bottom.from = 1.3 | |
correct_color_bottom.start() | |
} | |
gameOverCard = cardId | |
if(game_mode_ID === 0 && advantages_enabled){ | |
main.startContinueCarTimer() | |
}else{ | |
hide_card = true | |
gameOverTimer.start() | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment