mirror of
				https://github.com/JohnBreaux/Boat-Battle.git
				synced 2025-02-04 12:28:35 +00:00 
			
		
		
		
	Bugfix: audio now plays when changing scenes; added audio to ships being interacted
This commit is contained in:
		| @@ -18,9 +18,10 @@ var click_radius = 16 | ||||
| var orient = 0; | ||||
|  | ||||
| func _input(event): | ||||
| 	if event is InputEventMouseButton and event.button_index == BUTTON_LEFT: | ||||
| 	if event is InputEventMouseButton and event.button_index == BUTTON_LEFT:	 | ||||
| 		if (event.position - position).length() < click_radius: | ||||
| 			if not held and event.pressed: | ||||
| 				AudioBus.emit_signal("button_clicked") | ||||
| 				held = true; | ||||
| 				 | ||||
| 		if held and not event.pressed: | ||||
| @@ -106,6 +107,7 @@ func _input(event): | ||||
| 		if checkOriginalPos(): | ||||
| 			return | ||||
| 		else: | ||||
| 			AudioBus.emit_signal("button_clicked")			 | ||||
| 			if originalPos == null: | ||||
| 				if position == originalPos: | ||||
| 					return | ||||
|   | ||||
		Reference in New Issue
	
	Block a user