Changeset View
Changeset View
Standalone View
Standalone View
src/activities/planegame/Cloud.qml
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Line(s) | 26 | Image { | |||
---|---|---|---|---|---|
50 | 50 | | |||
51 | onTouch: { | 51 | onTouch: { | ||
52 | touched = true | 52 | touched = true | ||
53 | state = "storm" | 53 | state = "storm" | ||
54 | } | 54 | } | ||
55 | 55 | | |||
56 | GCText { | 56 | GCText { | ||
57 | id: number | 57 | id: number | ||
58 | height: cloud.height / 2 | ||||
59 | width: cloud.width / 2 | ||||
58 | anchors.horizontalCenter: cloud.horizontalCenter | 60 | anchors.horizontalCenter: cloud.horizontalCenter | ||
59 | anchors.verticalCenter: cloud.verticalCenter | 61 | anchors.verticalCenter: cloud.verticalCenter | ||
62 | horizontalAlignment: Text.AlignHCenter | ||||
63 | verticalAlignment: Text.AlignVCenter | ||||
60 | color: "black" | 64 | color: "black" | ||
61 | font.bold: true | 65 | font.bold: true | ||
62 | fontSize: 18 | 66 | font.pointSize: 100 | ||
67 | minimumPointSize: 10 | ||||
68 | fontSizeMode: Text.Fit | ||||
63 | } | 69 | } | ||
64 | 70 | | |||
65 | Component.onCompleted: { | 71 | Component.onCompleted: { | ||
66 | x = -cloud.width - 1 | 72 | x = -cloud.width - 1 | ||
67 | y = Activity.getRandomInt(0, background.height - (cloud.height + Activity.items.bar.height)) | 73 | y = Activity.getRandomInt(0, background.height - (cloud.height + Activity.items.bar.height)) | ||
68 | } | 74 | } | ||
69 | 75 | | |||
70 | Behavior on x { PropertyAnimation { duration: 20000 } } | 76 | Behavior on x { PropertyAnimation { duration: 20000 } } | ||
▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines |