summaryrefslogtreecommitdiff
path: root/Sprite.gd
diff options
context:
space:
mode:
authorjake <jake@jakes-mail.top>2023-02-18 17:23:22 -0500
committerjake <jake@jakes-mail.top>2023-02-18 17:23:22 -0500
commit74580ebfa942187821f4c4db65dbba90828b65f6 (patch)
tree334a06eb86a1308a6050365d1264c3bfc220347b /Sprite.gd
parentdc24d163a26fddd670514627daa4b381253e55ce (diff)
appese debugger warnings and remove/change unneeded/unused code
Diffstat (limited to 'Sprite.gd')
-rw-r--r--Sprite.gd12
1 files changed, 4 insertions, 8 deletions
diff --git a/Sprite.gd b/Sprite.gd
index 5e3802a..e227c11 100644
--- a/Sprite.gd
+++ b/Sprite.gd
@@ -11,10 +11,6 @@ export var team = 0
export var has_moved = false
export var in_check = false
-const move_patterns = {
- pawn = [[0,0,0],[2,0,0],[0,0,0]]
-}
-
func get_move_pattern():
return self.move_patterns.get(piece)
@@ -52,12 +48,12 @@ func _ready():
#position = Vector2(500,500)
pass
-func init(piece, color, team = 0):
- get_texture().set_region(Rect2(piece, color, CELL_W, CELL_H))
+func init(new_piece, color, new_team = 0):
+ get_texture().set_region(Rect2(new_piece, color, CELL_W, CELL_H))
self.set_piece(self.get_piece_name_by_region())
- self.set_team(team)
+ self.set_team(new_team)
-func _on_Area2D_input_event(viewport, event, shape_idx):
+func _on_Area2D_input_event(_viewport, event, _shape_idx):
if event.is_action_pressed("mouse1"):
emit_signal("clicked")