Documentation ¶
Overview ¶
Package obj provides tools to work with game entities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Info ¶
type Info struct { ID ids.Info `json:"id"` // internal name for development Name string `json:"name"` // img or clip to render, objects can be invisible e.g. areas to trigger an action Asset ids.Topic `json:"asset,omitempty"` // text info for obj that can be inspected Descr string `json:"descr,omitempty"` // dialog id for items with a dialog e.g. terminals or keypads Dia ids.Dia `json:"dia,omitempty"` }
func (*Info) MarshalBinary ¶
func (*Info) UnmarshalBinary ¶
type Obj ¶
type Obj struct { ID ids.Obj `json:"id"` // generic info Info ids.Info `json:"info"` // level position and dimension Lvl ids.Lvl `json:"lvl"` geo.Box // specific components: // loot inventory id of lootable items Loot ids.Inv `json:"loot,omitempty"` }
Obj represents all things that can be positioned in levels.
func (*Obj) MarshalBinary ¶
func (*Obj) UnmarshalBinary ¶
Click to show internal directories.
Click to hide internal directories.