diff options
Diffstat (limited to 'Sprite.gd')
-rw-r--r-- | Sprite.gd | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -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") |