Warning, /games/kbreakout/src/qml/Ball.qml is written in an unsupported language. File is not indexed.

0001 /*
0002     SPDX-FileCopyrightText: 2012 Viranch Mehta <viranch.mehta@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 import QtQuick 2.3
0008 import org.kde.games.core 0.1 as KgCore
0009 import "globals.js" as Globals
0010 
0011 CanvasItem {
0012     id: ball
0013     spriteKey: "PlainBall"
0014 
0015     property string type
0016     onTypeChanged: spriteKey = type;
0017 
0018     property real directionX
0019     property real directionY
0020 
0021     property bool toBeFired: true
0022     property real barPosition: 0.6
0023 
0024     width: m_scale * Globals.BALL_SIZE
0025     height: m_scale * Globals.BALL_SIZE
0026 
0027     // for preserving position relative
0028     // to bgOverlay when canvas is resized
0029     property real posX
0030     property real posY
0031     x: m_scale * posX
0032     y: m_scale * posY
0033 }