fixed on capture glitch
This commit is contained in:
parent
e51fb4db20
commit
401eb696bd
3 changed files with 7 additions and 5 deletions
|
|
@ -23,7 +23,8 @@ func _init():
|
|||
initializeStartingDeck()
|
||||
|
||||
func initializeStartingDeck():
|
||||
for i in range(9):
|
||||
deck.clear();
|
||||
for i in range(4):
|
||||
deck.append(DoubleTimeCard.new())
|
||||
deck.append(HopscotchCard.new())
|
||||
shuffleDeck()
|
||||
|
|
|
|||
|
|
@ -298,6 +298,7 @@ func resetBoard() -> void:
|
|||
p2String.text = str(p2Points)
|
||||
gamecheckMate = false;
|
||||
gamedraw = false;
|
||||
deckManager.initializeStartingDeck()
|
||||
|
||||
areas.clear()
|
||||
specialArea.clear()
|
||||
|
|
|
|||
|
|
@ -167,15 +167,15 @@ func handleCapture(node: Node) -> void:
|
|||
|
||||
game.updatePoints(capturedPiece)
|
||||
|
||||
if capturedPiece.name == "King":
|
||||
print("Game Over!")
|
||||
game.gamecheckMate = true
|
||||
capturedPiece.free()
|
||||
piece.reparent(node)
|
||||
piece.position = Vector2(25, 25)
|
||||
piece.position = Vector2(25, 25)
|
||||
game.currentlyMovingPiece = piece
|
||||
game.resolveMoveEffects()
|
||||
if capturedPiece.name == "King":
|
||||
print("Game Over!")
|
||||
game.gamecheckMate = true
|
||||
capturedPiece.free()
|
||||
|
||||
func handleRegularMove(node: Node, consume: bool) -> void:
|
||||
print("handleRegularMove", node)
|
||||
|
|
|
|||
Loading…
Reference in a new issue