- using getter for receiving values from globals (pill _max)
This commit is contained in:
parent
0c3d96030b
commit
130584c4e2
@ -11,7 +11,7 @@ func _ready():
|
|||||||
_pillLevel = get_node("TextureProgress")
|
_pillLevel = get_node("TextureProgress")
|
||||||
|
|
||||||
# TODO: may use global values in Inspector?
|
# TODO: may use global values in Inspector?
|
||||||
_pillLevel.max_value = Pills._max
|
_pillLevel.max_value = Pills.get_max()
|
||||||
|
|
||||||
|
|
||||||
func add_item (name):
|
func add_item (name):
|
||||||
|
@ -8,8 +8,13 @@ var _decrease_per_second: float = 0.2
|
|||||||
var _pill_add_amount: float = 2.0
|
var _pill_add_amount: float = 2.0
|
||||||
|
|
||||||
|
|
||||||
|
# Returns the max level
|
||||||
|
func get_max() -> float:
|
||||||
|
return _max
|
||||||
|
|
||||||
|
|
||||||
# Returns the exact current level as a floating point number between min and max
|
# Returns the exact current level as a floating point number between min and max
|
||||||
func get_level():
|
func get_level() -> float:
|
||||||
return _level
|
return _level
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user