Documentation
¶
Index ¶
- Variables
- func Init()
- func SetBuffInfoCache(id int64, info *BasicBuffInfo)
- type ActionInfo
- type BasicBuffInfo
- type Buff
- type BuffList
- func (bl *BuffList) Add(buff *Buff)
- func (bl *BuffList) Buffs() []*Buff
- func (bl *BuffList) Clear()
- func (bl *BuffList) DeBuffs() (ret []*Buff)
- func (bl *BuffList) ProcessDamage(damage *Damage)
- func (bl *BuffList) ProcessHeal(heal *Heal)
- func (bl *BuffList) Refresh(buff *Buff)
- func (bl *BuffList) Remove(buff *Buff)
- func (bl *BuffList) SetBuffs(buffs []*Buff)
- func (bl *BuffList) Update(now int64)
- func (bl *BuffList) UpdateExpire(now int64)
- func (bl *BuffList) UpdateStack(id int64, stack int)
- type BuffType
- type CameraData
- func (c *CameraData) ScreenToWorld(x, y float64) (float64, float64)
- func (c *CameraData) Update(v f64.Vec2)
- func (c *CameraData) WindowSize() (float64, float64)
- func (c *CameraData) WorldMatrix() ebiten.GeoM
- func (c *CameraData) WorldMatrixInverted() ebiten.GeoM
- func (c *CameraData) WorldToScreen(x, y float64) (float64, float64)
- type Damage
- type DamageTaken
- type DamageType
- type Event
- type EventCallback
- type GlobalData
- type Heal
- type Instance
- func (i *Instance) AddDamageTaken(damage DamageTaken)
- func (i *Instance) AddTether(tether *Instance)
- func (i *Instance) Cast(gameSkill *Skill)
- func (i *Instance) ClearTether()
- func (i *Instance) DoneCast()
- func (i *Instance) GetCast() *Skill
- func (i *Instance) GetHistoryCast(tick int64) []*Skill
- func (i *Instance) GetHistoryDamageTaken(n int) []DamageTaken
- func (i *Instance) GetTethers() []*Instance
- func (i *Instance) IsActive(tick int64) bool
- func (i *Instance) Reset()
- type MapBoundary
- type MapConfig
- type MapData
- type MapItem
- type MapPreset
- type MapPresetItem
- type Skill
- type SpriteData
- type StatusData
- type TimelineData
- func (t TimelineData) Begin(ecs *ecs.ECS, index int)
- func (t TimelineData) EndTick() int64
- func (t TimelineData) Finish(ecs *ecs.ECS, index int)
- func (t *TimelineData) InstanceWith(tick int64, caster *donburi.Entry, casterInstance int, target *donburi.Entry, ...) *TimelineData
- func (t TimelineData) IsDone(tick int64) bool
- func (t *TimelineData) Reset()
- func (t TimelineData) Update(ecs *ecs.ECS, index int)
- type VelocityData
- type WorldMarkerConfig
- type WorldMarkerData
- type WorldMarkerType
Constants ¶
This section is empty.
Variables ¶
View Source
var BorderTexture = texture.NewTextureFromFile("asset/skillborder.png")
View Source
var BuffFilter = map[int64]bool{}
BuffFilter contains all useless buff id: https://github.com/Xinrea/ffreplay/issues/17
View Source
var MapCache = map[int]MapPresetItem{}
View Source
var MarkerTextures = []*ebiten.Image{}
View Source
var Status = donburi.NewComponentType[StatusData]()
View Source
var WorldMarkerConfigs = map[WorldMarkerType]*WorldMarkerConfig{}
Functions ¶
func SetBuffInfoCache ¶
func SetBuffInfoCache(id int64, info *BasicBuffInfo)
Types ¶
type ActionInfo ¶
func GetAction ¶
func GetAction(id int64) *ActionInfo
type BasicBuffInfo ¶
func GetBuffInfo ¶
func GetBuffInfo(id int64) *BasicBuffInfo
type Buff ¶
type Buff struct {
Type BuffType
ID int64
Name string
Icon string
Stacks int
Remain int64
// buff duration in ms
Duration int64
ApplyTick int64
ECS *ecs.ECS `json:"-"`
Source *donburi.Entry `json:"-"`
Target *donburi.Entry `json:"-"`
ProcessDamage func(damage *Damage) `json:"-"`
ProcessHeal func(heal *Heal) `json:"-"`
RemoveCallback func(*Buff, *ecs.ECS, *donburi.Entry, *donburi.Entry) `json:"-"`
}
func (*Buff) UpdateRemain ¶
type BuffList ¶
type BuffList struct {
// contains filtered or unexported fields
}
func NewBuffList ¶
func NewBuffList() *BuffList
func (*BuffList) ProcessDamage ¶
func (*BuffList) ProcessHeal ¶
func (*BuffList) UpdateExpire ¶
func (*BuffList) UpdateStack ¶
type CameraData ¶
func (*CameraData) ScreenToWorld ¶
func (c *CameraData) ScreenToWorld(x, y float64) (float64, float64)
func (*CameraData) Update ¶
func (c *CameraData) Update(v f64.Vec2)
func (*CameraData) WindowSize ¶
func (c *CameraData) WindowSize() (float64, float64)
func (*CameraData) WorldMatrix ¶
func (c *CameraData) WorldMatrix() ebiten.GeoM
func (*CameraData) WorldMatrixInverted ¶
func (c *CameraData) WorldMatrixInverted() ebiten.GeoM
func (*CameraData) WorldToScreen ¶
func (c *CameraData) WorldToScreen(x, y float64) (float64, float64)
type Damage ¶
type Damage struct {
Type DamageType
Amount int
}
type DamageTaken ¶
type DamageTaken struct {
Tick int64
Type DamageType
SourceID int64
Ability Skill
Amount int64
Multiplier float64
RelatedBuffs []*BasicBuffInfo
}
type DamageType ¶
type DamageType int
const ( Physical DamageType = 128 Magical DamageType = 1024 Special DamageType = 32 )
type Event ¶
type Event struct {
Offset int64
Duration int64
Begin EventCallback
Update EventCallback
Finish EventCallback
Started bool
Finished bool
}
func (Event) DurationTick ¶
func (Event) OffsetTick ¶
type EventCallback ¶
type GlobalData ¶
type GlobalData struct {
// Real tick * 10 for fine speed control
RenderNPC bool
ReplayMode bool
Tick int64
Speed int64
TargetPlayer *donburi.Entry
LimitBreak int
Bar int
Debug bool
RangeDisplay bool
// should not process any event when UI is on focus
UIFocus bool
// Phases is a tick array for phase change
Phases []int64
FightDuration atomic.Int64
Loaded atomic.Bool
LoadCount atomic.Int32
LoadTotal int
ShowTargetRing bool
// WorldMarker selected
WorldMarkerSelected int
// marker for system reset
Reset atomic.Bool
}
type Instance ¶
type Instance struct {
Face float64
Object object.Object
// btick and etick should be set when preloading fflogs
// the first tick when game object is showed
BTick int64
// the last tick when game object is showed
ETick int64
// contains filtered or unexported fields
}
func (*Instance) AddDamageTaken ¶
func (i *Instance) AddDamageTaken(damage DamageTaken)
func (*Instance) ClearTether ¶
func (i *Instance) ClearTether()
func (*Instance) GetHistoryCast ¶
func (*Instance) GetHistoryDamageTaken ¶
func (i *Instance) GetHistoryDamageTaken(n int) []DamageTaken
GetHistoryDamageTaken returns the last n damage taken history.
func (*Instance) GetTethers ¶
type MapBoundary ¶
type MapPreset ¶
type MapPreset struct {
Maps []MapPresetItem
}
type MapPresetItem ¶
type MapPresetItem struct {
ID int
Path string
Offset struct {
X float64
Y float64
}
Phases []struct {
Path string
Offset struct {
X float64
Y float64
}
}
}
func (MapPresetItem) Load ¶
func (m MapPresetItem) Load() *MapConfig
type Skill ¶
type SpriteData ¶
type SpriteData struct {
Texture *ebiten.Image
Scale float64
Instances []*Instance
Initialized bool
}
SpriteData is a struct that contains texture, face, and object. Face is the radian relative to the north direction, range: [-pi, pi].
func (SpriteData) Render ¶
func (s SpriteData) Render(camera *CameraData, screen *ebiten.Image)
type StatusData ¶
type StatusData struct {
GameID int64
ID int64
Name string
Role role.RoleType
HP int
MaxHP int
Mana int
MaxMana int
BuffList *BuffList
Marker int
// contains filtered or unexported fields
}
func (*StatusData) IsDead ¶
func (r *StatusData) IsDead() bool
func (*StatusData) Reset ¶
func (r *StatusData) Reset()
func (StatusData) RoleTexture ¶
func (r StatusData) RoleTexture() *ebiten.Image
func (*StatusData) SetDeath ¶
func (r *StatusData) SetDeath(b bool)
func (*StatusData) TakeDamage ¶
func (r *StatusData) TakeDamage(d Damage)
func (*StatusData) TakeHeal ¶
func (r *StatusData) TakeHeal(h Heal)
type TimelineData ¶
type TimelineData struct {
Name string
StartTick int64
Caster *donburi.Entry
CasterInstance int
Target *donburi.Entry
TargetInstance int
Events []Event
}
func (TimelineData) EndTick ¶
func (t TimelineData) EndTick() int64
func (*TimelineData) InstanceWith ¶
func (t *TimelineData) InstanceWith( tick int64, caster *donburi.Entry, casterInstance int, target *donburi.Entry, targetInstance int, ) *TimelineData
func (TimelineData) IsDone ¶
func (t TimelineData) IsDone(tick int64) bool
func (*TimelineData) Reset ¶
func (t *TimelineData) Reset()
type VelocityData ¶
type VelocityData struct {
AX, AY, X, Y float64
}
func (*VelocityData) Clear ¶
func (v *VelocityData) Clear()
func (*VelocityData) Normalize ¶
func (v *VelocityData) Normalize(m float64)
type WorldMarkerConfig ¶
type WorldMarkerData ¶
type WorldMarkerData struct {
Type WorldMarkerType
Position f64.Vec2
}
type WorldMarkerType ¶
type WorldMarkerType int
const ( WorldMarkerA WorldMarkerType = iota WorldMarkerB WorldMarkerC WorldMarkerD WorldMarker1 WorldMarker2 WorldMarker3 WorldMarker4 )
Source Files
¶
Click to show internal directories.
Click to hide internal directories.