diff options
author | jacopograndi <jacopo.grandi@outlook.it> | 2021-12-24 21:11:39 +0100 |
---|---|---|
committer | jacopograndi <jacopo.grandi@outlook.it> | 2021-12-24 21:11:39 +0100 |
commit | 7cb4290601010459b09376396c7833ec391c25bf (patch) | |
tree | be6243e49ad764f90418e6d41641f99209da2b29 /scripts/resources.gd | |
parent | e9598b88841374301646a7115253ab38ac904e4c (diff) |
working on it
Diffstat (limited to 'scripts/resources.gd')
-rw-r--r-- | scripts/resources.gd | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/scripts/resources.gd b/scripts/resources.gd new file mode 100644 index 0000000..1fc50c5 --- /dev/null +++ b/scripts/resources.gd @@ -0,0 +1,27 @@ +extends Node + +var T : float = 500 +var k : float = 0 +var a : float = 0 +var d : float = 0 +var s : float = 0 + +func get_names(): return "Tkads" + +func dict_to_str (cost): + var st = "" + for n in cost.keys(): + st += str(cost[n]) + n + return st + +func add (cost): + for n in cost.keys(): self[n] += cost[n] + +func sub (cost): + for n in cost.keys(): self[n] -= cost[n] + +func greater_than (cost): + for n in cost.keys(): + if self[n] < cost[n]: + return false + return true |