divers changements pour la sortie du second proto
* ajout du panneau solaire #54 * ajout d'un tutoriel #53 * equilibrage du jeu #73 * ajout d'un son pour l'annonce
This commit is contained in:
@@ -2,7 +2,7 @@ extends InspectableEntity
|
||||
class_name UndergroundLoot
|
||||
|
||||
const AREA_WIDTH = 20
|
||||
const LOOTED_ITEM_RANDOM_RANGE = 100
|
||||
const LOOTED_ITEM_RANDOM_RANGE = 50
|
||||
|
||||
const SPRITE_SCENE : PackedScene = preload("res://entities/underground_loot/underground_loot_sprite.tscn")
|
||||
|
||||
@@ -43,15 +43,5 @@ func generate_collision_shape() -> CollisionShape2D:
|
||||
|
||||
func dig():
|
||||
for item in loot:
|
||||
var item_object = planet.drop_item(item, global_position)
|
||||
var tween : Tween = get_tree().create_tween()
|
||||
tween.tween_property(
|
||||
item_object,
|
||||
"position",
|
||||
Vector2(
|
||||
item_object.position.x + randi()%LOOTED_ITEM_RANDOM_RANGE,
|
||||
item_object.position.y + randi()%LOOTED_ITEM_RANDOM_RANGE
|
||||
),
|
||||
0.2
|
||||
)
|
||||
planet.drop_item(item, global_position, LOOTED_ITEM_RANDOM_RANGE)
|
||||
queue_free()
|
||||
|
||||
Reference in New Issue
Block a user