Changeset View
Changeset View
Standalone View
Standalone View
src/core/Score.qml
Context not available. | |||||
68 | */ | 68 | */ | ||
---|---|---|---|---|---|
69 | property string message | 69 | property string message | ||
70 | 70 | | |||
71 | /** | | |||
72 | * Emitted when the win animation should be started. | | |||
73 | * | | |||
74 | * Triggers scale and rotation animation. | | |||
75 | */ | | |||
76 | signal playWinAnimation | | |||
77 | | ||||
78 | color: "#AAFFFFFF" | 71 | color: "#AAFFFFFF" | ||
79 | width: subLevelText.width * 2 | 72 | width: subLevelText.width * 2 | ||
80 | height: subLevelText.height * 1.4 | 73 | height: subLevelText.height * 1.4 | ||
Context not available. | |||||
90 | 83 | | |||
91 | onCurrentSubLevelChanged: message = currentSubLevel + "/" + numberOfSubLevels | 84 | onCurrentSubLevelChanged: message = currentSubLevel + "/" + numberOfSubLevels | ||
92 | onNumberOfSubLevelsChanged: message = currentSubLevel + "/" + numberOfSubLevels | 85 | onNumberOfSubLevelsChanged: message = currentSubLevel + "/" + numberOfSubLevels | ||
93 | onPlayWinAnimation: winAnimation.start() | | |||
94 | 86 | | |||
95 | GCText { | 87 | GCText { | ||
96 | id: subLevelText | 88 | id: subLevelText | ||
Context not available. | |||||
100 | color: "#373737" | 92 | color: "#373737" | ||
101 | text: message | 93 | text: message | ||
102 | } | 94 | } | ||
103 | | ||||
104 | SequentialAnimation { | | |||
105 | id: winAnimation | | |||
106 | ParallelAnimation { | | |||
107 | PropertyAnimation { | | |||
108 | target: score | | |||
109 | properties: "scale" | | |||
110 | from: 1.0 | | |||
111 | to: 1.4 | | |||
112 | duration: 500 | | |||
113 | } | | |||
114 | NumberAnimation { | | |||
115 | target: score | | |||
116 | property: "rotation" | | |||
117 | from: -10; to: 10 | | |||
118 | duration: 750 | | |||
119 | easing.type: Easing.InOutQuad | | |||
120 | } | | |||
121 | } | | |||
122 | ParallelAnimation { | | |||
123 | PropertyAnimation { | | |||
124 | target: score | | |||
125 | properties: "scale" | | |||
126 | from: 1.4 | | |||
127 | to: 1.0 | | |||
128 | duration: 500 | | |||
129 | } | | |||
130 | NumberAnimation { | | |||
131 | target: score | | |||
132 | property: "rotation" | | |||
133 | from: 10; to: 0 | | |||
134 | duration: 750 | | |||
135 | easing.type: Easing.InOutQuad | | |||
136 | } | | |||
137 | } | | |||
138 | } | | |||
139 | } | 95 | } | ||
Context not available. |