class Rosegold::DataComponents::Food

Overview

Food component

Defined in:

rosegold/inventory/slot.cr

Constructors

Instance Method Summary

Instance methods inherited from class Rosegold::DataComponent

write(io) : Nil write

Constructor methods inherited from class Rosegold::DataComponent

create_component(component_type : UInt32, io) : DataComponent create_component, create_component_by_name(name : String | Nil, component_type : UInt32, io) : DataComponent create_component_by_name

Constructor Detail

def self.new(nutrition : UInt32 = 0_u32, saturation : Float32 = 0.0_f32, can_always_eat : Bool = false) #

[View source]
def self.read(io) : self #

[View source]

Instance Method Detail

def can_always_eat=(can_always_eat : Bool) #

[View source]
def can_always_eat? : Bool #

[View source]
def nutrition : UInt32 #

[View source]
def nutrition=(nutrition : UInt32) #

[View source]
def saturation : Float32 #

[View source]
def saturation=(saturation : Float32) #

[View source]
def write(io) : Nil #

[View source]