I have a Platform baseclass like this:
EntityBase {
property alias platformImage: platformImage
entityType: "platform"
width: 100
height: 15
Rectangle {
id: platformImage
anchors.fill: parent
color: "white"
Behavior on opacity {
NumberAnimation {property: "opacity"; duration: 3000; easing.type: Easing.InQuart}
}
}
However, the Behaviour on opacity really only belongs to a particular subclass of Platform.
And I can imagine that I might want other behaviours for other subclasses.
How can I create a subclass with different behaviour, something like this:
Platform {
platformImage.color: "red"
platformImage.Behaviour on opacity {...}
}
(Note that the over-riding of the platformImage.color works the way I need, which is good, just can’t see how to do the behaviour)
-
This topic was modified 8 years, 5 months ago by
GreenAsJade.
-
This topic was modified 8 years, 5 months ago by
GreenAsJade.