CarChallenge 3D Demo
import QtQuick 2.0
import Felgo 3.0
import "entities"
Item {
id: level
width: parent.width
height: parent.width
property alias player_red: car_red
property alias player_blue: car_blue
PhysicsWorld {
id: world
updatesPerSecondForPhysics: 60
debugDrawVisible: ingameSettings.physicsDebugVisible
z: 1
}
Image {
id: background
source: "../assets/img/asphalt_background.png"
width: parent.width*1
height: parent.height*1
anchors.centerIn: parent
}
Ground {
anchors.fill: parent
}
Car {
id: car_red
objectName: "car_red"
variationType: "carRed"
x: 120
y: 200
rotation: 0
}
Car {
id: car_blue
objectName: "car_blue"
variationType: "carBlue"
x: 390
y: 400
rotation: 225
image.source: "../assets/img/car_blue.png"
inputActionsToKeyCode: {
"up": Qt.Key_W,
"down": Qt.Key_S,
"left": Qt.Key_A,
"right": Qt.Key_D,
"fire": Qt.Key_Space
}
}
Wall {
id: border_bottom
wallType: wallTypeEnum.bottom
height: 20
anchors {
left: parent.left
right: parent.right
bottom: parent.bottom
}
}
Wall {
id: border_top
wallType: wallTypeEnum.top
height: 20
anchors {
top: parent.top
left: parent.left
right: parent.right
}
}
Wall {
id: border_left
wallType: wallTypeEnum.left
width: 20
anchors {
top: parent.top
bottom: parent.bottom
left: parent.left
}
}
Wall {
id: border_right
wallType: wallTypeEnum.right
width: 20
anchors {
top: parent.top
bottom: parent.bottom
right: parent.right