Item refactor and more (#1)

This commit is contained in:
Héctor Giménez
2023-08-18 22:33:54 +09:00
committed by GitHub
parent 9a3b131826
commit 1c8aab1580
13 changed files with 213 additions and 64 deletions

View File

@@ -40,6 +40,7 @@ type Data struct {
Rooms []Room
OpenMenus OpenMenus
Roster Roster
HoverData HoverData
}
type Room struct {
@@ -48,6 +49,12 @@ type Room struct {
Height int
}
type HoverData struct {
IsHovered bool
UnitID
UnitType int
}
func (r Room) GetCenter() Position {
return Position{
X: r.Position.X + r.Width/2,
@@ -98,10 +105,9 @@ func (r Roster) FindByName(name string) (RosterMember, bool) {
}
type Level struct {
Area area.Area
Position Position
IsGoodExit bool
CanInteract bool
Area area.Area
Position Position
IsEntrance bool // This means the area can not be accessed just walking through it, needs to be clicked
}
type Class uint
@@ -129,6 +135,7 @@ type Position struct {
type PlayerUnit struct {
Name string
ID UnitID
Area area.Area
Position Position
Stats map[stat.ID]int
@@ -226,4 +233,5 @@ type OpenMenus struct {
QuitMenu bool
Cube bool
SkillSelect bool
Anvil bool
}