Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Q
qt3dstudio
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
public-demos
qt3dstudio
Commits
48d58206
Commit
48d58206
authored
Mar 02, 2018
by
Jere Tuliniemi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change tennis game resolution
parent
f3839865
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
TennisGame/game.uip
TennisGame/game.uip
+2
-2
TennisGame/readme.md
TennisGame/readme.md
+1
-1
TennisGame/scripts/Movement.qml
TennisGame/scripts/Movement.qml
+2
-2
No files found.
TennisGame/game.uip
View file @
48d58206
<?xml version="1.0" encoding="UTF-8" ?>
<UIP
version=
"3"
>
<Project
>
<ProjectSettings
author=
""
company=
""
presentationWidth=
"
800"
presentationHeight=
"48
0"
maintainAspect=
"False"
>
<ProjectSettings
author=
""
company=
""
presentationWidth=
"
1280"
presentationHeight=
"72
0"
maintainAspect=
"False"
>
<CustomColors
count=
"16"
>
#ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff
</CustomColors>
</ProjectSettings>
<Classes
>
...
...
@@ -56,7 +56,7 @@
</Graph>
<Logic
>
<State
name=
"Master Slide"
component=
"#Scene"
>
<Add
ref=
"#Layer"
aostrength=
"0"
background=
"Transparent"
blendtype=
"Normal"
disabledepthprepass=
"False"
disabledepthtest=
"False"
height=
"
480"
heightunits=
"pixels"
horzfields=
"Left/Width"
left=
"0"
leftunits=
"percent"
progressiveaa=
"None"
sourcepath=
""
temporalaa=
"False"
width=
"80
0"
widthunits=
"pixels"
/>
<Add
ref=
"#Layer"
aostrength=
"0"
background=
"Transparent"
blendtype=
"Normal"
disabledepthprepass=
"False"
disabledepthtest=
"False"
height=
"
720"
heightunits=
"pixels"
horzfields=
"Left/Width"
left=
"0"
leftunits=
"percent"
progressiveaa=
"None"
sourcepath=
""
temporalaa=
"False"
width=
"128
0"
widthunits=
"pixels"
/>
<Add
ref=
"#Camera"
orthographic=
"False"
/>
<Add
ref=
"#Light"
brightness=
"100"
castshadow=
"True"
lightambient=
"0.266667 0.266667 0.266667"
lighttype=
"Point"
position=
"0 0 -200"
rotation=
"0 0 0"
shdwfactor=
"73.3938"
shdwfilter=
"15.85"
shdwmapfov=
"90"
shdwmapres=
"8"
/>
<State
id=
"Scene-Game"
name=
"Game"
playmode=
"PingPong"
>
...
...
TennisGame/readme.md
View file @
48d58206
...
...
@@ -10,7 +10,7 @@ Movement.qml is the most complex script used. It handles the movement of the pla
It includes collision detection and handles score detection and ball serving also.
Properties that can be set from the studio for Movement.qml are:
-
Obstacle 1:
O
bject that can be collided with
-
Obstacle 1:
An o
bject that can be collided with
-
Obstacle 2: Another object that can be collided with
-
Has Physics: Determines if the object is handled as a ball
-
Has AI: Determines if the object is handled as the AI paddle
...
...
TennisGame/scripts/Movement.qml
View file @
48d58206
...
...
@@ -73,8 +73,8 @@ Behavior {
if
(
mouseDown
)
{
//Handle movement with mouse input
var
perspectiveFactor
=
1
.4
;
var
halfScreenHeight
=
24
0
;
var
perspectiveFactor
=
1
;
var
halfScreenHeight
=
36
0
;
var
target
=
(
halfScreenHeight
-
getMousePosition
().
y
)
*
perspectiveFactor
;
if
(
Math
.
abs
(
position
.
y
-
target
)
>
6
)
{
if
(
position
.
y
>
target
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment