Text fixes + plant grid around mouse + max score particule + can abandon in relay bases again
This commit is contained in:
@@ -60,7 +60,7 @@ stretch_mode = 2
|
||||
[node name="SubViewport" type="SubViewport" parent="ViewPortTexture" unique_id=1891358676]
|
||||
own_world_3d = true
|
||||
transparent_bg = true
|
||||
size = Vector2i(1000, 100)
|
||||
size = Vector2i(1500, 100)
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="ViewPortTexture/SubViewport" unique_id=604331804]
|
||||
environment = ExtResource("3_g6k02")
|
||||
|
||||
@@ -2,6 +2,7 @@ extends CanvasLayer
|
||||
class_name GameGui
|
||||
|
||||
const SCORE_ICON : Texture = preload("res://common/icons/growth.svg")
|
||||
const MAX_SCORE_PARTICULE : int = 100
|
||||
|
||||
var score_by_plant : Dictionary[String, int] = {}
|
||||
|
||||
@@ -106,7 +107,7 @@ func plant_changing_score(plant_data: PlantData, amount : int):
|
||||
if amount <= 0:
|
||||
score_mirror += amount
|
||||
else :
|
||||
for i in range(amount):
|
||||
for i in range(min(amount, MAX_SCORE_PARTICULE)):
|
||||
var camera = get_viewport().get_camera_2d()
|
||||
var screen_size = get_viewport().get_visible_rect().size
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ func get_current_inspected() -> Node:
|
||||
if dist < closest_dist:
|
||||
closest_dist = dist
|
||||
closest_ind = i
|
||||
elif closest_ind < 0:
|
||||
else:
|
||||
closest_ind = i
|
||||
if all_inspected.size() > 0:
|
||||
return all_inspected[closest_ind]
|
||||
@@ -183,6 +183,8 @@ func inspect(node: Node):
|
||||
all_inspected.append(node)
|
||||
if node is InventoryGuiItemMouseDetector:
|
||||
inspected_inventory_slot = node
|
||||
if node == inspected:
|
||||
no_inspect_previously_dragged = false
|
||||
|
||||
func update_card():
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user