16 lines
244 B
GDScript
16 lines
244 B
GDScript
extends Item
|
|
|
|
class_name Bonus
|
|
|
|
@export var _bonus : String = "mult"
|
|
|
|
func _init():
|
|
layer = 1
|
|
|
|
func set_value(new_value : String):
|
|
_bonus = new_value
|
|
|
|
func calculate_bonus(total : int, value : int):
|
|
if _bonus == "mult":
|
|
return total*value
|