ALSO TODO: Create a simple inventory with references to the buttons. We can't just use TileResource as a unique identifier
This commit is contained in:
parent
353c2f8dbc
commit
ff4aa93845
1 changed files with 7 additions and 4 deletions
|
|
@ -79,8 +79,9 @@ func _ready() -> void:
|
|||
insect_icon.texture = insect_resource.ui_texture
|
||||
|
||||
if is_black != GameData.is_player_black:
|
||||
disabled = true
|
||||
return
|
||||
#disabled = true
|
||||
#return
|
||||
pass
|
||||
|
||||
GameEvents.insect_selected.connect(_on_insect_selected)
|
||||
GameEvents.insect_placement_cancelled.connect(_on_placement_cancelled)
|
||||
|
|
@ -94,14 +95,16 @@ func _on_insect_selected(_resource: TileResource, _is_black: bool) -> void:
|
|||
|
||||
func hover() -> void:
|
||||
if GameData.is_player_black != is_black:
|
||||
return
|
||||
pass
|
||||
#return
|
||||
|
||||
var tween = get_tree().create_tween()
|
||||
tween.tween_property(hex, "position", Vector2(0, -16), 0.1).set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_SPRING)
|
||||
|
||||
func unhover() -> void:
|
||||
if GameData.is_player_black != is_black:
|
||||
return
|
||||
pass
|
||||
#return
|
||||
|
||||
var tween = get_tree().create_tween()
|
||||
tween.tween_property(hex, "position", Vector2(0, 0), 0.25).set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_SPRING)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue