w2d_obj

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

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

Go to latest
Published: Feb 6, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Act

type Act struct {
	Act acttype.ActType

	// accel, fire bullet
	Angle  float64 // degree
	AngleV float64 // pixel /sec

	// homming
	DstObjID string
}

type Background

type Background struct {
	LastMoveTick int64 // time.unixnano
	PosVt        vector2f.Vector2f
	VelVt        vector2f.Vector2f
}

func (*Background) Move

func (o *Background) Move(now int64)

type Cloud

type Cloud struct {
	SpriteNum    int
	LastMoveTick int64 // time.unixnano
	PosVt        vector2f.Vector2f
	VelVt        vector2f.Vector2f
}

func (*Cloud) Move

func (o *Cloud) Move(now int64)

type Effect

type Effect struct {
	EffectType   effecttype.EffectType
	BirthTick    int64
	LastMoveTick int64 // time.unixnano
	PosVt        vector2f.Vector2f
	VelVt        vector2f.Vector2f
}

func (*Effect) CheckLife

func (o *Effect) CheckLife(now int64) bool

func (*Effect) Move

func (o *Effect) Move(now int64)

type GameObj

type GameObj struct {
	GOType       gameobjtype.GameObjType
	UUID         string
	BirthTick    int64
	LastMoveTick int64 // time.unixnano
	PosVt        vector2f.Vector2f
	VelVt        vector2f.Vector2f
	Angle        float64 // move circular
	AngleV       float64
	DstUUID      string // move to dest
}

func (*GameObj) CalcCircularPos

func (o *GameObj) CalcCircularPos(center vector2f.Vector2f, r float64) vector2f.Vector2f

func (*GameObj) MoveCircular

func (o *GameObj) MoveCircular(now int64, center vector2f.Vector2f)

func (*GameObj) MoveHomming

func (o *GameObj) MoveHomming(now int64, dstPosVt vector2f.Vector2f)

func (*GameObj) MoveStraight

func (o *GameObj) MoveStraight(now int64)

type NotiInvalid_data

type NotiInvalid_data struct {
	Dummy uint8
}

type NotiStageChat_data

type NotiStageChat_data struct {
	SenderNick string
	Chat       string
}

type NotiStageInfo_data

type NotiStageInfo_data struct {
	Tick       int64
	Background *Background
	Teams      []*Team
	Effects    []*Effect
	Clouds     []*Cloud
}

type NotiStatsInfo_data

type NotiStatsInfo_data struct {
	UUID  string
	Stats []TeamStat
}

type ReqAct_data

type ReqAct_data struct {
	Dummy uint8
}

type ReqChat_data

type ReqChat_data struct {
	Chat string
}

type ReqHeartbeat_data

type ReqHeartbeat_data struct {
	Tick int64
}

type ReqInvalid_data

type ReqInvalid_data struct {
	Dummy uint8
}

type ReqLogin_data

type ReqLogin_data struct {
	SessionKey string
	NickName   string
	AuthKey    string
}

type RspAct_data

type RspAct_data struct {
	Dummy uint8
}

type RspChat_data

type RspChat_data struct {
	Dummy uint8
}

type RspHeartbeat_data

type RspHeartbeat_data struct {
	Tick int64
}

type RspInvalid_data

type RspInvalid_data struct {
	Dummy uint8
}

type RspLogin_data

type RspLogin_data struct {
	Version         string
	ProtocolVersion string
	DataVersion     string

	SessionKey string
	NickName   string
	CmdList    [w2d_idcmd.CommandID_Count]bool
}

type Team

type Team struct {
	TeamType teamtype.TeamType
	Ball     *GameObj
	Objs     []*GameObj
}

type TeamStat

type TeamStat struct {
	UUID     string
	Alive    bool
	TeamType teamtype.TeamType
	ActStats acttype_vector.ActTypeVector
}

Jump to

Keyboard shortcuts

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