#57 rework des inputs et actions
This commit is contained in:
@@ -67,10 +67,16 @@ func get_contamination(point : Vector2) -> float:
|
||||
Vector2(point) / float(TERRAIN_IMAGE_GAME_FACTOR)
|
||||
- Vector2.ONE / 2
|
||||
)
|
||||
return contamination.get_pixel(
|
||||
int(round(pixel_point.x)),
|
||||
int(round(pixel_point.y))
|
||||
).r
|
||||
if (
|
||||
pixel_point.x > 0
|
||||
and pixel_point.y > 0
|
||||
and pixel_point.x < contamination.get_width()
|
||||
and pixel_point.y < contamination.get_height()):
|
||||
return contamination.get_pixel(
|
||||
int(round(pixel_point.x)),
|
||||
int(round(pixel_point.y))
|
||||
).r
|
||||
return 0
|
||||
|
||||
func get_decontamination_coverage() -> float:
|
||||
return ImageTools.get_color_coverage(contamination)
|
||||
|
||||
Reference in New Issue
Block a user