construct

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2022 License: MIT Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConstructNameToKey = map[string]GeoConstructType{
	"ningguang":      GeoConstructNingSkill,
	"zhongli":        GeoConstructZhongliSkill,
	"traveler_skill": GeoConstructTravellerSkill,
	"traveler_burst": GeoConstructTravellerBurst,
	"albedo":         GeoConstructAlbedoSkill,
	"itto":           GeoConstructIttoSkill,
}
View Source
var ConstructString = [...]string{
	"Invalid",
	"NingSkill",
	"ZhongliSkill",
	"TravellerSkill",
	"TravellerBurst",
	"AlbedoSkill",
	"IttoSkill",
}

Functions

This section is empty.

Types

type Construct

type Construct interface {
	OnDestruct()
	Key() int
	Type() GeoConstructType
	Expiry() int
	IsLimited() bool
	Count() int
}

type GeoConstructType

type GeoConstructType int
const (
	GeoConstructInvalid GeoConstructType = iota
	GeoConstructNingSkill
	GeoConstructZhongliSkill
	GeoConstructTravellerSkill
	GeoConstructTravellerBurst
	GeoConstructAlbedoSkill
	GeoConstructIttoSkill
	EndGeoConstructType
)

func (GeoConstructType) String

func (c GeoConstructType) String() string

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func New

func New(f *int, log glog.Logger) *Handler

func (*Handler) Count

func (h *Handler) Count() int

how many of the given

func (*Handler) CountByType

func (h *Handler) CountByType(t GeoConstructType) int

func (*Handler) Destroy

func (h *Handler) Destroy(key int) bool

destroy key if exist, return true if destroyed

func (*Handler) Expiry

func (h *Handler) Expiry(t GeoConstructType) int

func (*Handler) Has

func (h *Handler) Has(key int) bool

func (*Handler) New

func (h *Handler) New(c Construct, refresh bool)

func (*Handler) NewNoLimitCons

func (h *Handler) NewNoLimitCons(c Construct, refresh bool)

func (*Handler) Tick

func (h *Handler) Tick()

Jump to

Keyboard shortcuts

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