diff options
author | Daniel Weipert <code@drogueronin.de> | 2020-12-31 11:33:12 +0100 |
---|---|---|
committer | Daniel Weipert <code@drogueronin.de> | 2020-12-31 11:33:12 +0100 |
commit | fb64f15e22acfc1c03c7c5357dd66077454adbcf (patch) | |
tree | 96cdbb8f59bd65609aa76276dfba94f9cdad33d4 /UI/LevelSelectCell.gd |
Initial commit
Diffstat (limited to 'UI/LevelSelectCell.gd')
-rw-r--r-- | UI/LevelSelectCell.gd | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/UI/LevelSelectCell.gd b/UI/LevelSelectCell.gd new file mode 100644 index 0000000..1bd1366 --- /dev/null +++ b/UI/LevelSelectCell.gd @@ -0,0 +1,23 @@ +extends Panel + + +var level_idx = 0 + + +func _ready(): + var level = Global.get_level(self.level_idx) + + $ClearMark.text = "" + if level.cleared_by == Enum.PLAYER.FIRST: + $ClearMark.text = "X" + elif level.cleared_by == Enum.PLAYER.SECOND: + $ClearMark.text = "O" + + $Time.text = String(level.time) + "s" + + +func set_rect_size(x, y): + self.rect_size.x = x + self.rect_size.y = y + $ClearMark.rect_size.x = x + $ClearMark.rect_size.y = y |