Commit 48d58206 authored by Jere Tuliniemi's avatar Jere Tuliniemi

Change tennis game resolution

parent f3839865
<?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="800" presentationHeight="480" maintainAspect="False" > <ProjectSettings author="" company="" presentationWidth="1280" presentationHeight="720" 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="480" heightunits="pixels" horzfields="Left/Width" left="0" leftunits="percent" progressiveaa="None" sourcepath="" temporalaa="False" width="800" 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="1280" 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" >
......
...@@ -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: Object that can be collided with - Obstacle 1: An object 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
......
...@@ -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 = 240; var halfScreenHeight = 360;
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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment