Dev Démo 1.2
* les plantes se placent désormais sur une grille * ajouts de curseurs relatifs à l'item * ajout de settings sur la sensibilité à la souris * ajout d'un défi en fin de run
This commit is contained in:
@@ -65,15 +65,21 @@ func get_icon() -> Texture2D:
|
||||
stored_icon = PlantTextureBuilder.build_seed_texture(plant_name.hash())
|
||||
return stored_icon
|
||||
|
||||
func get_pointer() -> Texture2D:
|
||||
return preload("res://gui/pointer/assets/cursors/pointer-seed.svg")
|
||||
|
||||
func get_energy_used() -> int:
|
||||
return 1
|
||||
|
||||
func get_usage_zone_radius() -> int:
|
||||
return 50
|
||||
return 10
|
||||
|
||||
func get_usage_object_affected(i : Area2D) -> bool:
|
||||
return i is PlantSprite
|
||||
|
||||
func snap_usage_to_grid():
|
||||
return true
|
||||
|
||||
func use_text() -> String:
|
||||
return tr("PLANT_%s") % plant_name
|
||||
|
||||
@@ -88,13 +94,12 @@ func can_use(player : Player, zone : Player.ActionZone) -> bool:
|
||||
|
||||
var is_there_a_plant_here = false
|
||||
for area in zone.get_affected_areas():
|
||||
if area is PlantSprite:
|
||||
if area is PlantSprite or area is TruckRecharge:
|
||||
is_there_a_plant_here = true
|
||||
|
||||
var plant_tiles = Math.get_tiles_in_circle(
|
||||
var plant_tiles = [Math.get_tile_from_pos(
|
||||
zone.get_global_position(),
|
||||
20
|
||||
)
|
||||
)] as Array[Vector2i]
|
||||
|
||||
return (
|
||||
not is_there_a_plant_here
|
||||
|
||||
Reference in New Issue
Block a user