Add data-driven fish selection and catch showcase
This commit is contained in:
parent
ae2f724fe2
commit
bd2768b676
39 changed files with 1226 additions and 58 deletions
17
collection/collection_log.gd
Normal file
17
collection/collection_log.gd
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
class_name CollectionLog
|
||||
extends Node
|
||||
|
||||
signal fish_discovered(fish_id: StringName)
|
||||
|
||||
var _discovered: Dictionary[StringName, bool] = {}
|
||||
|
||||
|
||||
func has_discovered(fish_id: StringName) -> bool:
|
||||
return not fish_id.is_empty() and _discovered.has(fish_id)
|
||||
|
||||
|
||||
func mark_discovered(fish_id: StringName) -> void:
|
||||
if fish_id.is_empty() or has_discovered(fish_id):
|
||||
return
|
||||
_discovered[fish_id] = true
|
||||
fish_discovered.emit(fish_id)
|
||||
1
collection/collection_log.gd.uid
Normal file
1
collection/collection_log.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dwaig3bnt3xy3
|
||||
Loading…
Add table
Add a link
Reference in a new issue