savedata

package
v0.0.0-...-9c7fcfc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CurrentSave = &SaveData{
	Chara1: &Character{},
	Chara2: &Character{},
	Chara3: &Character{},
	S: &Ship{
		Inventory: make(map[string]*Item),
	},
}

Functions

This section is empty.

Types

type Character

type Character struct {
	Job, Name     string
	MaxHP, MaxMP  int
	Atk, Def, Spd int
}

type Item

type Item struct {
	Name     string
	Quantity int
}

type SaveData

type SaveData struct {
	Chara1, Chara2, Chara3 *Character
	S                      *Ship
	Scene                  string
}

func (*SaveData) GetItemQty

func (d *SaveData) GetItemQty(name string) int

func (*SaveData) Load

func (dat *SaveData) Load() error

func (*SaveData) Save

func (data *SaveData) Save() error

func (*SaveData) SetItemQty

func (d *SaveData) SetItemQty(name string, qty int)

type Ship

type Ship struct {
	Money     int
	Inventory map[string]*Item
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL