-
Notifications
You must be signed in to change notification settings - Fork 1
/
stock.gd
79 lines (63 loc) · 1.24 KB
/
stock.gd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
extends Node2D
class_name Stock
var _stock_max:int
var _or:int
var _argent:int
var _quartz:int
var _platine:int
var _violet:int
var _emeraude:int
var _fer:int
var _magma:int
var _boule:int
var _marron:int
func _init(stock_max):
_or = 0
_argent = 0
_quartz = 0
_platine = 0
_violet = 0
_emeraude = 0
_fer = 0
_magma = 0
_boule = 0
_marron = 0
_stock_max = stock_max
func set_stock(ore, argent, quartz, platine, violet, emeraude, fer, magma, boule, marron):
_or += ore
_argent += argent
_quartz += quartz
_platine += platine
_violet += violet
_emeraude += emeraude
_fer += fer
_magma += magma
_boule += boule
_marron += marron
func what_is_in_stock()->int:
return _or + _argent + _quartz + _platine + _violet + _emeraude + _fer + _magma + _boule + _marron
func check_stock()->bool:
if what_is_in_stock() == 10:
return false
else:
return true
func get_or()->int:
return _or
func get_argent()->int:
return _argent
func get_quartz()->int:
return _quartz
func get_platine()->int:
return _platine
func get_violet()->int:
return _violet
func get_emeraude()->int:
return _emeraude
func get_fer()->int:
return _fer
func get_magma()->int:
return _magma
func get_boule()->int:
return _boule
func get_marron()->int:
return _marron