mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2025-06-01 19:19:31 +02:00
Refactor arrow scene, give it reversibility and color
This commit is contained in:
parent
6b612c083d
commit
25d8905df8
6 changed files with 41 additions and 138 deletions
scenes
|
@ -15,7 +15,6 @@ var hovered = false
|
|||
var start_pos = null
|
||||
|
||||
var arrow = preload("res://scenes/arrow.tscn")
|
||||
var time_arrow = preload("res://scenes/time_arrow.tscn")
|
||||
|
||||
func _ready():
|
||||
content_set(content)
|
||||
|
@ -101,9 +100,13 @@ func children_set(new_children):
|
|||
if not children.has(c):
|
||||
var a = arrow.instance()
|
||||
if type == "commit":
|
||||
a = time_arrow.instance()
|
||||
a.source = id
|
||||
a.target = c
|
||||
#a = time_arrow.instance()
|
||||
a.source = c
|
||||
a.target = id
|
||||
a.color = Color("c2bf26")
|
||||
else:
|
||||
a.source = id
|
||||
a.target = c
|
||||
a.repository = repository
|
||||
$Arrows.add_child(a)
|
||||
children = new_children
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue