Przeglądaj źródła

Changed ball serving

tags/online1.1
Madiwka 4 lat temu
rodzic
commit
9e425d69b5
3 zmienionych plików z 13 dodań i 3 usunięć
  1. +9
    -1
      eball.lua
  2. +3
    -1
      main.lua
  3. +1
    -1
      src/baseGame.lua

+ 9
- 1
eball.lua Wyświetl plik

@@ -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 Wyświetl plik

@@ -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 Wyświetl plik

@@ -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


Ładowanie…
Anuluj
Zapisz