Browse Source

Changed ball serving

tags/online1.1
Madiwka 4 years ago
parent
commit
9e425d69b5
3 changed files with 13 additions and 3 deletions
  1. +9
    -1
      eball.lua
  2. +3
    -1
      main.lua
  3. +1
    -1
      src/baseGame.lua

+ 9
- 1
eball.lua View File

@@ -50,7 +50,15 @@ else
self.dx = ball_DIR
end
self.disabled = false
self.x = VIRTUAL_WIDTH /2 - 2
if not player then
self.x = VIRTUAL_WIDTH /2 - 2
elseif player == 1 then
self.x = 50
elseif player == 2 then
self.x = VIRTUAL_WIDTH - 50
else
self.x = VIRTUAL_WIDTH /2 - 2
end
self.y = VIRTUAL_HEIGHT /2 - 2
self.dy = math.random(-1, 1)


+ 3
- 1
main.lua View File

@@ -214,6 +214,7 @@ function love.load()
globalState = "nettest"
AGAINST_AI = 0
gameState = "1serve"
ball[1]:reset(1, 1)
end
)
)
@@ -225,6 +226,7 @@ function love.load()
globalState = "clienttest"
AGAINST_AI = 0
gameState = "1serve"
ball[1]:reset(1, 1)
end
)
)
@@ -1125,7 +1127,7 @@ function love.keypressed(key)
gameState = "1serve"
resettinggenius()
for i = 1, maxBalls do
ball[i]:reset(i)
ball[i]:reset(i, 1)
end
end
else


+ 1
- 1
src/baseGame.lua View File

@@ -391,7 +391,7 @@ function goalManager()
AI_SPEED = difficultyl / 10
for i = 1, maxBalls do
ball[i]:reset(i)
ball[i]:reset(i, 2)
end
if (player2score == ptw and gameMode ~= "practice") then
for i = 1, maxBalls do


Loading…
Cancel
Save