ajout des actions demandant un clic long et dev des region modifier
This commit is contained in:
@@ -11,12 +11,10 @@ func get_color_image(ind: int) -> Image:
|
||||
if color_images.size() == 0:
|
||||
color_images.resize(color_textures.size())
|
||||
if color_images[ind] == null:
|
||||
print("get image")
|
||||
color_images[ind] = color_textures[ind].get_image()
|
||||
return color_images[ind]
|
||||
|
||||
func get_outline_image() -> Image:
|
||||
if outline_image == null:
|
||||
print("get image outilne")
|
||||
outline_image = outline_texture.get_image()
|
||||
return outline_image
|
||||
|
||||
@@ -6,6 +6,8 @@ const ACTION_ICON = preload("res://common/icons/swipe-down.svg")
|
||||
const ENERGY_ICON = preload("res://common/icons/bolt.svg")
|
||||
const ONE_TIME_ICON = preload("res://common/icons/circle-number-1.svg")
|
||||
|
||||
const DEFAULT_PRESS_TIME = 0.7
|
||||
|
||||
enum ItemType {TOOL_ITEM, CONSUMABLE_ITEM}
|
||||
|
||||
@export var name: String : get = get_item_name
|
||||
@@ -36,6 +38,12 @@ func get_usage_zone_radius() -> int:
|
||||
func is_usage_need_proximity() -> bool:
|
||||
return true
|
||||
|
||||
func is_action_need_press_time() -> bool:
|
||||
return get_energy_used() > 0
|
||||
|
||||
func get_action_press_time() -> float:
|
||||
return DEFAULT_PRESS_TIME
|
||||
|
||||
func get_usage_object_affected(_i : InspectableEntity) -> bool:
|
||||
return false
|
||||
|
||||
|
||||
@@ -22,6 +22,9 @@ func get_usage_zone_radius() -> int:
|
||||
func is_usage_need_proximity() -> bool:
|
||||
return false
|
||||
|
||||
func is_action_need_press_time() -> bool:
|
||||
return true
|
||||
|
||||
func can_use(_player : Player, _zone: Player.ActionZone) -> bool:
|
||||
return true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user