Working semi animation when picking berries!
This commit is contained in:
parent
a3743007c2
commit
359613895b
@ -53,13 +53,13 @@ func _input(event):
|
|||||||
|
|
||||||
func AnimationOnInteraction(Item):
|
func AnimationOnInteraction(Item):
|
||||||
print(Item, "Animation")
|
print(Item, "Animation")
|
||||||
var img = load("res://pictures/inventory_iconpictures/food_items/herbs/saffron.png")
|
var itemimage = TextureRect.new()
|
||||||
$Sprite.draw_texture(img, Vector2(self.position.x/cell_size.x, self.position.y/cell_size.y))
|
itemimage.texture = load("res://pictures/inventory_iconpictures/food_items/herbs/saffron.png")
|
||||||
|
itemimage.set_position(Vector2(randf()*20-40, randf()*40-20))
|
||||||
#This works, but changes the sprite..
|
add_child(itemimage)
|
||||||
#$Sprite.set_texture(img)
|
yield(get_tree().create_timer(1.0), "timeout")
|
||||||
#img.create(128, 128, false, "res://pictures/inventory_iconpictures/food_items/herbs/saffron.png")
|
remove_child(itemimage)
|
||||||
pass
|
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
Global.player_inventory_items = Database.GetInventoryItems()
|
Global.player_inventory_items = Database.GetInventoryItems()
|
||||||
|
|
||||||
|
175
river_intersection_home2.tscn.tmp
Normal file
175
river_intersection_home2.tscn.tmp
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user