Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qt3dstudio
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
public-demos
qt3dstudio
Commits
48d58206
Commit
48d58206
authored
7 years ago
by
Jere Tuliniemi
Browse files
Options
Downloads
Patches
Plain Diff
Change tennis game resolution
parent
f3839865
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
TennisGame/game.uip
+2
-2
2 additions, 2 deletions
TennisGame/game.uip
TennisGame/readme.md
+1
-1
1 addition, 1 deletion
TennisGame/readme.md
TennisGame/scripts/Movement.qml
+2
-2
2 additions, 2 deletions
TennisGame/scripts/Movement.qml
with
5 additions
and
5 deletions
TennisGame/game.uip
+
2
−
2
View file @
48d58206
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<UIP
version=
"3"
>
<UIP
version=
"3"
>
<Project
>
<Project
>
<ProjectSettings
author=
""
company=
""
presentationWidth=
"8
0
0"
presentationHeight=
"
48
0"
maintainAspect=
"False"
>
<ProjectSettings
author=
""
company=
""
presentationWidth=
"
12
80"
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>
<CustomColors
count=
"16"
>
#ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff
</CustomColors>
</ProjectSettings>
</ProjectSettings>
<Classes
>
<Classes
>
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
</Graph>
</Graph>
<Logic
>
<Logic
>
<State
name=
"Master Slide"
component=
"#Scene"
>
<State
name=
"Master Slide"
component=
"#Scene"
>
<Add
ref=
"#Layer"
aostrength=
"0"
background=
"Transparent"
blendtype=
"Normal"
disabledepthprepass=
"False"
disabledepthtest=
"False"
height=
"
48
0"
heightunits=
"pixels"
horzfields=
"Left/Width"
left=
"0"
leftunits=
"percent"
progressiveaa=
"None"
sourcepath=
""
temporalaa=
"False"
width=
"8
0
0"
widthunits=
"pixels"
/>
<Add
ref=
"#Layer"
aostrength=
"0"
background=
"Transparent"
blendtype=
"Normal"
disabledepthprepass=
"False"
disabledepthtest=
"False"
height=
"
72
0"
heightunits=
"pixels"
horzfields=
"Left/Width"
left=
"0"
leftunits=
"percent"
progressiveaa=
"None"
sourcepath=
""
temporalaa=
"False"
width=
"
12
80"
widthunits=
"pixels"
/>
<Add
ref=
"#Camera"
orthographic=
"False"
/>
<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"
/>
<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"
>
<State
id=
"Scene-Game"
name=
"Game"
playmode=
"PingPong"
>
...
...
This diff is collapsed.
Click to expand it.
TennisGame/readme.md
+
1
−
1
View file @
48d58206
...
@@ -10,7 +10,7 @@ Movement.qml is the most complex script used. It handles the movement of the pla
...
@@ -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.
It includes collision detection and handles score detection and ball serving also.
Properties that can be set from the studio for Movement.qml are:
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
-
Obstacle 2: Another object that can be collided with
-
Has Physics: Determines if the object is handled as a ball
-
Has Physics: Determines if the object is handled as a ball
-
Has AI: Determines if the object is handled as the AI paddle
-
Has AI: Determines if the object is handled as the AI paddle
...
...
This diff is collapsed.
Click to expand it.
TennisGame/scripts/Movement.qml
+
2
−
2
View file @
48d58206
...
@@ -73,8 +73,8 @@ Behavior {
...
@@ -73,8 +73,8 @@ Behavior {
if
(
mouseDown
)
{
if
(
mouseDown
)
{
//Handle movement with mouse input
//Handle movement with mouse input
var
perspectiveFactor
=
1
.4
;
var
perspectiveFactor
=
1
;
var
halfScreenHeight
=
24
0
;
var
halfScreenHeight
=
36
0
;
var
target
=
(
halfScreenHeight
-
getMousePosition
().
y
)
*
perspectiveFactor
;
var
target
=
(
halfScreenHeight
-
getMousePosition
().
y
)
*
perspectiveFactor
;
if
(
Math
.
abs
(
position
.
y
-
target
)
>
6
)
{
if
(
Math
.
abs
(
position
.
y
-
target
)
>
6
)
{
if
(
position
.
y
>
target
)
if
(
position
.
y
>
target
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment