hai i found a way.. but its only go down.. then wont go up anymore in the second click.. do you know whats wrong with my code?
extends Node2D
onready var tween = $BarTween
onready var Bar = $BarBG
onready var barBG = $BarBG
var Revealpos = Vector2(112,176)
var Hidepos = Vector2(112,208)
func onBarUIinputevent(viewport, event, shapeidx):
if event is InputEventMouseButton :
if event.ispressed() && barBG.position.isequalapprox(Revealpos) :
tween.interpolateproperty(Bar, 'position', Revealpos, Hidepos,1.0,Tween.TRANSLINEAR, Tween.EASEINOUT )
tween.start()
if event is InputEventMouseButton :
if event.ispressed() && barBG.position.isequalapprox(Hidepos) :
tween.interpolateproperty(Bar, 'position', Hidepos, Revealpos,1.0,Tween.TRANSLINEAR, Tween.EASEINOUT )
tween.start()