class Game::ResourceBag

Defined in:

game/resources.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(vals : ResourceHash | Nil = nil) #

[View source]

Instance Method Detail

def [](res_type : Resource::Type) #

[View source]
def dec(res_type : Resource::Type, value : Capacity) #

[View source]
def dec(other : self) #

[View source]
def has(res_type : Resource::Type, value : Capacity) : Bool #

[View source]
def has(res : Resource) : Bool #

[View source]
def has(vs : ResourceHash) : Bool #

[View source]
def has(vs : self) : Bool #

[View source]
def inc(res_type : Resource::Type, value : Capacity) #

[View source]
def inc(res : Resource) #

[View source]
def inc(vs : ResourceHash) #

[View source]
def inc(other : self) #

[View source]