Warning, /games/knetwalk/src/qml/Cable.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 SPDX-FileCopyrightText: 2013 Ashwin Rajeev <ashwin_rajeev@hotmail.com> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 import QtQuick 2.3 0008 0009 CanvasItem { 0010 spriteKey: "cable" + parent.sprite 0011 anchors.fill: parent 0012 rotation: parent.angle 0013 opacity: (main.state === "paused")? 0 : 1 0014 Behavior on rotation { 0015 id: animate 0016 NumberAnimation { 0017 duration: main.rotateDuration 0018 easing.type: Easing.OutQuad 0019 onRunningChanged: { 0020 if(!running && parent.angle != 0) { 0021 animate.enabled = false 0022 main.rotated(parent.index, parent.angle % 360); 0023 animate.enabled = true 0024 } 0025 } 0026 } 0027 } 0028 }