config

package
v0.0.0-...-2a6a35c Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ScreenWidth  = 384 * 2
	ScreenHeight = 448 * 2
	TotalWidth   = 640 * 2
	TotalHeight  = 480 * 2
)

Variables

View Source
var Bullet = make(BulletDict)
View Source
var Color = make(ColorDict)
View Source
var Enemy = &EnemyDict{
	Data:     make(map[int]*EnemyDetail),
	FrameMap: make(map[int][]*EnemyDetail),
}
View Source
var Generate = make(GenerateDict)

Functions

This section is empty.

Types

type BulletDetail

type BulletDetail struct {
	Id        int     `json:"id"`
	Radius    float64 `json:"radius"`
	Pic       string  `json:"pic"`
	PicScale  float64 `json:"pic_scale"`
	PicX      float64 `json:"pic_x"`
	PicY      float64 `json:"pic_y"`
	PicXSlice int     `json:"pic_x_slice"`
	PicYSlice int     `json:"pic_y_slice"`
	Color     int     `json:"color"`
	CanClean  bool    `json:"can_clean"`
}

type BulletDict

type BulletDict map[int]*BulletDetail

func (BulletDict) Init

func (bullet BulletDict) Init(buf []byte) error

func (BulletDict) InitReader

func (bullet BulletDict) InitReader(reader io.Reader) error

type ColorDetail

type ColorDetail struct {
	Id      int     `json:"id"`
	AScale  float64 `json:"a_scale"`
	BScale  float64 `json:"b_scale"`
	GScale  float64 `json:"g_scale"`
	HRotate float64 `json:"h_rotate"`
	RScale  float64 `json:"r_scale"`
	SScale  float64 `json:"s_scale"`
	VScale  float64 `json:"v_scale"`
}

type ColorDict

type ColorDict map[int]*ColorDetail

func (ColorDict) Init

func (color ColorDict) Init(buf []byte) error

func (ColorDict) InitReader

func (color ColorDict) InitReader(reader io.Reader) error

type EnemyDetail

type EnemyDetail struct {
	Id            int     `json:"id"`
	StartFrame    int     `json:"start_frame"`
	DurationFrame int     `json:"duration_frame"`
	StartX        float64 `json:"start_x"`
	StartY        float64 `json:"start_y"`
	Radius        float64 `json:"radius"`
	Pic           string  `json:"pic"`
	PicScale      float64 `json:"pic_scale"`
	PicX          float64 `json:"pic_x"`
	PicY          float64 `json:"pic_y"`
	PicXSlice     int     `json:"pic_x_slice"`
	PicYSlice     int     `json:"pic_y_slice"`
	Color         int     `json:"color"`
	Hp            int     `json:"hp"`
	Generate      []int   `json:"generate"`
	Move          string  `json:"move"`
	MoveP1        float64 `json:"move_p1"`
	MoveP2        float64 `json:"move_p2"`
	MoveP3        float64 `json:"move_p3"`
	MoveP4        float64 `json:"move_p4"`
	MoveP5        float64 `json:"move_p5"`
	MoveP6        float64 `json:"move_p6"`
	Clean         bool    `json:"clean"`
}

type EnemyDict

type EnemyDict struct {
	Data     map[int]*EnemyDetail
	FrameMap map[int][]*EnemyDetail
}

func (*EnemyDict) Init

func (enemy *EnemyDict) Init(buf []byte) error

func (*EnemyDict) InitReader

func (enemy *EnemyDict) InitReader(reader io.Reader) error

type GenerateDetail

type GenerateDetail struct {
	Id                  int     `json:"id"`
	StartFrame          int     `json:"start_frame"`
	IntervalFrame       int     `json:"interval_frame"`
	DurationFrame       int     `json:"duration_frame"`
	Bullet              int     `json:"bullet"`
	BulletDurationFrame int     `json:"bullet_duration_frame"`
	Move                string  `json:"move"`
	MoveP1              float64 `json:"move_p1"`
	MoveP2              float64 `json:"move_p2"`
	MoveP3              float64 `json:"move_p3"`
	MoveP4              float64 `json:"move_p4"`
	MoveP5              float64 `json:"move_p5"`
	MoveP6              float64 `json:"move_p6"`
}

type GenerateDict

type GenerateDict map[int]*GenerateDetail

func (GenerateDict) Init

func (generate GenerateDict) Init(buf []byte) error

func (GenerateDict) InitReader

func (generate GenerateDict) InitReader(reader io.Reader) error

Jump to

Keyboard shortcuts

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