summaryrefslogtreecommitdiffstats
path: root/examples/sensors/maze/LabyrinthSquare.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/sensors/maze/LabyrinthSquare.qml')
-rw-r--r--examples/sensors/maze/LabyrinthSquare.qml43
1 files changed, 0 insertions, 43 deletions
diff --git a/examples/sensors/maze/LabyrinthSquare.qml b/examples/sensors/maze/LabyrinthSquare.qml
deleted file mode 100644
index d9e72db7..00000000
--- a/examples/sensors/maze/LabyrinthSquare.qml
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (C) 2017 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-
-//Import the declarative plugins
-import QtQuick
-
-//Import the javascript functions for this game
-import "lib.js" as Lib
-
-//Implementation of the Labyrinth square control.
-Rectangle {
- id: sq
- x: 0
- y: 0
- width: Lib.cellDimension
- height: Lib.cellDimension
- color: "white"
- property int val: 0
- property AnimatedImage picture: img
-
- //Dependent of its position and the labyrinth value a square can be the start, cheese, empty or a wall
- AnimatedImage {
- id: img
- anchors.fill: parent
- source: ""
- }
-
- function updateImage()
- {
- if (sq.val == -1)
- sq.picture.source = "content/start.png";
- else if (sq.val == 3)
- sq.picture.source = "content/cheese.png";
- else if (sq.val == 4){
- sq.picture.source = "content/cheeseeating.gif";
- sq.picture.playing = true;
- }
- else if (sq.val == 1)
- sq.picture.source = "content/01.png";
- else
- sq.picture.source = "content/00.png";
- }
-}