Documentation ¶
Index ¶
- Constants
- Variables
- func CharBodyInteractive(a, b *CharBody, speed int)
- func ColorGanZhi(gz string) color.RGBA
- func ColorNaYin(gz string) color.RGBA
- func DrawFlow(dst *ebiten.Image, sx, sy float32, soul string, cb *CharBody)
- func DrawProBar[T util.Numeric](dst *ebiten.Image, x, y, width, height float32, clr color.Color, val, maxV T)
- func DrawProBarV[T util.Numeric](dst *ebiten.Image, x, y, width, height float32, clr color.Color, val, maxV T)
- func DrawRangeBar(dst *ebiten.Image, x, y, width float32, name string, val, minV, maxV float64, ...)
- func DrawRangeBarV(dst *ebiten.Image, x, y, height float32, name string, val, minV, maxV float64, ...)
- func GetFontFace(size float64) (font.Face, error)
- func GetHideGan(gan string, idx int) string
- func InteractiveBiJie(va, vb *int, ma, mb int, speed int)
- func InteractiveGuan(va, vb *int, ma, mb int, speed int)
- func InteractivePianCai(va, vb *int, ma, mb int, speed int)
- func InteractiveSha(va, vb *int, ma, mb int, speed int)
- func InteractiveShang(va, vb *int, ma, mb int, speed int)
- func InteractiveShi(va, vb *int, ma, mb int, speed int)
- func InteractiveXiao(va, vb *int, ma, mb int, speed int)
- func InteractiveYin(va, vb *int, ma, mb int, speed int)
- func InteractiveZhengCai(va, vb *int, ma, mb int, speed int)
- func NewGame() *game
- func NewWorld() ebiten.Game
- func ShiShenShort(dayGan, gan string) string
- func UIHideQiMen()
- func UIShowMsgBox(text, btnText1, btnText2 string, btnClick1, btnClick2 func(b *ui.Button))
- type Astrolabe
- func (a *Astrolabe) DataQuerying() bool
- func (a *Astrolabe) Draw(dst *ebiten.Image)
- func (a *Astrolabe) DrawGravity(dst *ebiten.Image)
- func (a *Astrolabe) GetEphemeris(tid int, s *calendar.Solar) *ObserveData
- func (a *Astrolabe) GetMoonPos() (float32, float32)
- func (a *Astrolabe) GetNASAData(tid int, sts, ets string) map[string]*observeDataSrc
- func (a *Astrolabe) GetSolarPos() (float32, float32)
- func (a *Astrolabe) QueryNASAData(tid int, sts, ets string)
- func (a *Astrolabe) SetPos(x, y float32)
- func (a *Astrolabe) Update()
- type Body4
- type Camera
- type CelestialBody
- type Char8Pan
- type CharBody
- type ObserveData
- type Player
- type QMShow
- type StarEffect
- type StarLine
- type UIMsgBox
- type UIQiMen
- type UISelect
Constants ¶
View Source
const ( G = 6.67430 * 1e-11 //万有引力常数(Nm²/kg²) C = 299792458 //光速(m/s) AU = 149597870.7e3 //天文单位(m) DataTimeMin = "2006-01-02 15:04" DateTimeNASA = "2006-Jan-02 15:04" NASADataFile = "nasa_data.db" NASADataTimeLast = time.Hour * 24 //一次查询时间范围 NASADataStepSize = "1h" //星体数据步长 1h 1d 1m ObserveDataTable = "observe_data" CelestialBodyTable = "celestial_body" )
View Source
const ( HpGanYear = 80 HpZhiYear = 40 HpGanMonth = 120 HpZhiMonth = 400 HpGanDay = 120 HpZhiDay = 120 HpGanTime = 120 HpZhiTime = 120 )
八字能量比例 年干8 月干12 日元12 时干12 年支4 月支40 日支12 时支12
View Source
const ( GenderFemale = 0 //女♀ GenderMale = 1 //男♂ )
View Source
const (
TPSRate = 30
)
Variables ¶
View Source
var Bodies = map[int]*CelestialBody{ 10: {Id: 10, /* contains filtered or unexported fields */}, 199: {Id: 199, /* contains filtered or unexported fields */}, 299: {Id: 299, /* contains filtered or unexported fields */}, 301: {Id: 301, /* contains filtered or unexported fields */}, 399: {Id: 399, /* contains filtered or unexported fields */}, 3: {Id: 3, /* contains filtered or unexported fields */}, 401: {Id: 401, /* contains filtered or unexported fields */}, 402: {Id: 402, /* contains filtered or unexported fields */}, 499: {Id: 499, /* contains filtered or unexported fields */}, 4: {Id: 4, /* contains filtered or unexported fields */}, 501: {Id: 501, /* contains filtered or unexported fields */}, 502: {Id: 502, /* contains filtered or unexported fields */}, 503: {Id: 503, /* contains filtered or unexported fields */}, 504: {Id: 504, /* contains filtered or unexported fields */}, 599: {Id: 599, /* contains filtered or unexported fields */}, 601: {Id: 601, /* contains filtered or unexported fields */}, 602: {Id: 602, /* contains filtered or unexported fields */}, 603: {Id: 603, /* contains filtered or unexported fields */}, 604: {Id: 604, /* contains filtered or unexported fields */}, 605: {Id: 605, /* contains filtered or unexported fields */}, 606: {Id: 606, /* contains filtered or unexported fields */}, 607: {Id: 607, /* contains filtered or unexported fields */}, 699: {Id: 699, /* contains filtered or unexported fields */}, 799: {Id: 799, /* contains filtered or unexported fields */}, 899: {Id: 899, /* contains filtered or unexported fields */}, 901: {Id: 901, /* contains filtered or unexported fields */}, 999: {Id: 999, /* contains filtered or unexported fields */}, 9: {Id: 9, /* contains filtered or unexported fields */}, }
View Source
var Draws = []int{
10, 199, 299, 399, 499, 599, 699,
}
View Source
var GenderName = []string{"女", "男"}
View Source
var GenderSoul = []string{"坤造", "乾造"}
View Source
var HideGanVal = map[int][]int{
1: {100},
2: {70, 30},
3: {60, 30, 10},
}
HideGanVal 藏干值比例
View Source
var Interactive = map[string]func(va, vb *int, ma, mb int, speed int){ "比肩": InteractiveBiJie, "劫财": InteractiveBiJie, "食神": InteractiveShi, "伤官": InteractiveShang, "正印": InteractiveYin, "偏印": InteractiveXiao, "正官": InteractiveGuan, "七杀": InteractiveSha, "正财": InteractiveZhengCai, "偏财": InteractivePianCai, }
View Source
var (
ThisGame *game
)
Functions ¶
func CharBodyInteractive ¶
func ColorGanZhi ¶
func ColorNaYin ¶
func DrawProBar ¶
func DrawProBar[T util.Numeric](dst *ebiten.Image, x, y, width, height float32, clr color.Color, val, maxV T)
DrawProBar draw a horizontal progress bar
func DrawProBarV ¶
func DrawProBarV[T util.Numeric](dst *ebiten.Image, x, y, width, height float32, clr color.Color, val, maxV T)
DrawProBarV draw a vertical progress bar
func DrawRangeBar ¶
func DrawRangeBar(dst *ebiten.Image, x, y, width float32, name string, val, minV, maxV float64, clr color.Color)
DrawRangeBar draw a range bar
func DrawRangeBarV ¶
func DrawRangeBarV(dst *ebiten.Image, x, y, height float32, name string, val, minV, maxV float64, clr color.Color)
DrawRangeBarV draw a vertical range bar
func GetHideGan ¶
func InteractiveBiJie ¶
InteractiveBiJie 比劫
func InteractiveGuan ¶
InteractiveGuan 正官:a嫁b
func InteractivePianCai ¶
InteractivePianCai 偏财:a抢b
func InteractiveShang ¶
InteractiveShang 伤官 a生b 异阴阳 生力小
func InteractiveShi ¶
InteractiveShi 食神 a生b 同阴阳 生力大. 水衰不生木,木衰不生火,火衰不生土,土衰不生金,金衰不生水。
func InteractiveXiao ¶
InteractiveXiao 偏印:b生a
func InteractiveZhengCai ¶
InteractiveZhengCai 正财:a娶b
func ShiShenShort ¶
func UIHideQiMen ¶
func UIHideQiMen()
func UIShowMsgBox ¶
Types ¶
type Astrolabe ¶
type Astrolabe struct { sync.RWMutex X, Y float32 Ephemeris map[string]*ObserveData ConstellationLoc [12]gongLocation //星座位 AstrolabeLoc [12]gongLocation //宫位 XiuLoc [28]gongLocation //星宿宫位 Sun *ebiten.Image Moon *ebiten.Image // contains filtered or unexported fields }
func NewAstrolabe ¶
func (*Astrolabe) DataQuerying ¶
func (*Astrolabe) DrawGravity ¶
func (a *Astrolabe) DrawGravity(dst *ebiten.Image)
func (*Astrolabe) GetEphemeris ¶
func (a *Astrolabe) GetEphemeris(tid int, s *calendar.Solar) *ObserveData
func (*Astrolabe) GetMoonPos ¶
func (*Astrolabe) GetNASAData ¶
func (*Astrolabe) GetSolarPos ¶
func (*Astrolabe) QueryNASAData ¶
type CelestialBody ¶
type Char8Pan ¶
type Char8Pan struct {
X, Y float32
Flow *Body4 //流气
Player *Player //玩家
BodyShow bool
OverviewShow bool
ui.Container
// contains filtered or unexported fields
}
func NewChar8Pan ¶
func (*Char8Pan) DrawCharHP ¶
type CharBody ¶
type CharBody struct { Gan string //干为头 Zhi string //支为体 Body string //本气为身 Legs string //中气为腿 Feet string //余气为足 HPHead int //干值 HPBody int //本气值 HPLegs int //中气值 HPFeet int //余气值 HPMHead int //干为值Max HPMBody int //本气值Max HPMLegs int //中气值Max HPMFeet int //余气值Max FlowEnergy bool //流气锁值 }
func (*CharBody) InteractiveSelf ¶
type ObserveData ¶
type ObserveData struct { Id string `gorm:"primarykey" xorm:"pk"` Target int `gorm:"index" xorm:"index"` Year int `gorm:"index" xorm:"index"` Month int `gorm:"index" xorm:"index"` Day int `gorm:"index" xorm:"index"` Hour int `gorm:"index" xorm:"index"` Minute int `gorm:"index" xorm:"index"` RA_DEC string // 赤经赤纬 Delta float64 // 距离 AU Deldot float64 // delta-dot 距离变化 KM/S 为正表示远离观察者 SOT float32 // S-O-T 观察者-目标-太阳角度 SOTR string // "/T": TRAILS 目标跟踪S "/L": LEADS 目标引领S STO float32 // S-T-O 太阳-目标-观察者角度 Cnst string // 星座 }
type Player ¶
type Player struct { Gender int //性别0女1男 Birth *calendar.Lunar Body4 //四柱 FYun *CharBody //大运 Mate *Player //配偶 YunIdx0, YunIdx int //当前大运小运索引 Fates0 []string //小运名 Fates []string //大运名 UpdateCount int ShenShaY []string //神煞年 ShenShaM []string //神煞月 ShenShaD []string //神煞日 ShenShaT []string //神煞时 ShenShaYY []string //神煞大运 ShenShaFY []string //神煞流年 ShenShaFM []string //神煞流月 ShenShaFD []string //神煞流日 ShenShaFT []string //神煞流时 // contains filtered or unexported fields }
type StarEffect ¶
type StarEffect struct {
X, Y float32
// contains filtered or unexported fields
}
func NewStarEffect ¶
func NewStarEffect(x, y float32) *StarEffect
func (*StarEffect) Draw ¶
func (se *StarEffect) Draw(dst *ebiten.Image)
func (*StarEffect) SetPos ¶
func (se *StarEffect) SetPos(x, y float32)
func (*StarEffect) Update ¶
func (se *StarEffect) Update()
type StarLine ¶
type StarLine struct {
// contains filtered or unexported fields
}
func NewStarLine ¶
func NewStarLine() StarLine
type UIQiMen ¶
func NewUIQiMen ¶
func NewUIQiMen() *UIQiMen
func UIShowQiMen ¶
func UIShowQiMen() *UIQiMen
type UISelect ¶
func NewUISelect ¶
Click to show internal directories.
Click to hide internal directories.