table

package
v0.0.0-...-7d424f8 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Generated by tabtoy Version: 2.9.1 DO NOT EDIT!!

Index

Constants

This section is empty.

Variables

View Source
var (
	JobTypeMapperValueByName = map[string]int32{
		"Warrior": 0,
		"Archor":  1,
		"Mage":    2,
	}

	JobTypeMapperNameByValue = map[int32]string{
		0: "Warrior",
		1: "Archor",
		2: "Mage",
	}
)

Functions

This section is empty.

Types

type ConfigDefine

type ConfigDefine struct {

	//索引ID
	ID int64

	//怪物基础攻击cd时间(ms)
	Value int32
}

Defined in table: Config

type JobType

type JobType int32

Defined in table: Globals

const (

	//战士
	JobType_Warrior JobType = 0

	//弓箭手
	JobType_Archor JobType = 1

	//法师
	JobType_Mage JobType = 2
)

func (JobType) String

func (self JobType) String() string

type Table

type Table struct {

	//Config
	Config []*ConfigDefine
}

Defined in table: Table

type TableTable

type TableTable struct {

	// 表格原始数据
	Table

	ConfigByID map[int64]*ConfigDefine
	// contains filtered or unexported fields
}

Table 访问接口

func NewTableTable

func NewTableTable() *TableTable

创建一个Table表读取实例

func (*TableTable) Load

func (self *TableTable) Load(filename string) error

从json文件加载

func (*TableTable) RegisterIndexEntry

func (self *TableTable) RegisterIndexEntry(name string, indexCallback func(*TableTable) error, clearCallback func(*TableTable) error)

注册外部索引入口, 索引回调, 清空回调

func (*TableTable) RegisterPostEntry

func (self *TableTable) RegisterPostEntry(callback func(*TableTable) error)

注册所有完成时回调

func (*TableTable) RegisterPreEntry

func (self *TableTable) RegisterPreEntry(callback func(*TableTable) error)

注册加载前回调

Jump to

Keyboard shortcuts

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