Documentation ¶
Index ¶
- Constants
- type Buttons
- type Circle
- func (circle *Circle) GetFadeTime() int64
- func (circle *Circle) GetNumber() int64
- func (circle *Circle) GetObject() objects.IHitObject
- func (circle *Circle) Init(ruleSet *OsuRuleSet, object objects.IHitObject, players []*difficultyPlayer)
- func (circle *Circle) IsHit(player *difficultyPlayer) bool
- func (circle *Circle) MissForcefully(player *difficultyPlayer, time int64)
- func (circle *Circle) UpdateClickFor(player *difficultyPlayer, time int64) bool
- func (circle *Circle) UpdateFor(_ *difficultyPlayer, _ int64, _ bool) bool
- func (circle *Circle) UpdatePost(_ int64) bool
- func (circle *Circle) UpdatePostFor(player *difficultyPlayer, time int64, _ bool) bool
- type ClickAction
- type ComboResult
- type FailListener
- type Grade
- type HealthProcessor
- func (hp *HealthProcessor) AddFailListener(listener FailListener)
- func (hp *HealthProcessor) AddResult(result JudgementResult)
- func (hp *HealthProcessor) CalculateRate()
- func (hp *HealthProcessor) GetDrainRate() float64
- func (hp *HealthProcessor) GetHealth() float64
- func (hp *HealthProcessor) Increase(amount float64, fromHitObject bool)
- func (hp *HealthProcessor) IncreaseRelative(amount float64, fromHitObject bool)
- func (hp *HealthProcessor) ResetHp()
- func (hp *HealthProcessor) Update(time int64)
- type HealthProcessorV2
- func (hp *HealthProcessorV2) AddFailListener(listener FailListener)
- func (hp *HealthProcessorV2) AddResult(result JudgementResult)
- func (hp *HealthProcessorV2) CalculateRate()
- func (hp *HealthProcessorV2) GetDrainRate() float64
- func (hp *HealthProcessorV2) GetHealth() float64
- func (hp *HealthProcessorV2) Increase(amount float64, fromHitObject bool)
- func (hp *HealthProcessorV2) IncreaseRelative(amount float64, fromHitObject bool)
- func (hp *HealthProcessorV2) ResetHp()
- func (hp *HealthProcessorV2) Update(time int64)
- type HitObject
- type HitResult
- type IHealthProcessor
- type JudgementResult
- type OsuRuleSet
- func (set *OsuRuleSet) CanBeHit(time int64, object HitObject, player *difficultyPlayer) ClickAction
- func (set *OsuRuleSet) CanBeHitLazer(time int64, object HitObject, player *difficultyPlayer) ClickAction
- func (set *OsuRuleSet) CanBeHitStable(time int64, object HitObject, player *difficultyPlayer) ClickAction
- func (set *OsuRuleSet) GetBeatMap() *beatmap.BeatMap
- func (set *OsuRuleSet) GetHP(cursor *graphics.Cursor) float64
- func (set *OsuRuleSet) GetPlayer(cursor *graphics.Cursor) *difficultyPlayer
- func (set *OsuRuleSet) GetPlayerDifficulty(cursor *graphics.Cursor) *difficulty.Difficulty
- func (set *OsuRuleSet) GetProcessed() []HitObject
- func (set *OsuRuleSet) GetResultForDelta(player *difficultyPlayer, delta float64) HitResult
- func (set *OsuRuleSet) GetScore(cursor *graphics.Cursor) Score
- func (set *OsuRuleSet) PlayerStopped(cursor *graphics.Cursor, time int64)
- func (set *OsuRuleSet) PostHit(time int64, object HitObject, player *difficultyPlayer)
- func (set *OsuRuleSet) SendResult(cursor *graphics.Cursor, judgementResult JudgementResult)
- func (set *OsuRuleSet) SetEndListener(listener endListener)
- func (set *OsuRuleSet) SetFailListener(listener failListener)
- func (set *OsuRuleSet) SetListener(listener hitListener)
- func (set *OsuRuleSet) Update(time int64)
- func (set *OsuRuleSet) UpdateClickFor(cursor *graphics.Cursor, time int64)
- func (set *OsuRuleSet) UpdateNormalFor(cursor *graphics.Cursor, time int64, processSliderEndsAhead bool)
- func (set *OsuRuleSet) UpdatePostFor(cursor *graphics.Cursor, time int64, processSliderEndsAhead bool)
- type Score
- type Slider
- func (slider *Slider) GetFadeTime() int64
- func (slider *Slider) GetNumber() int64
- func (slider *Slider) GetObject() objects.IHitObject
- func (slider *Slider) GetStartResult(pl *difficultyPlayer) HitResult
- func (slider *Slider) Init(ruleSet *OsuRuleSet, object objects.IHitObject, players []*difficultyPlayer)
- func (slider *Slider) IsHit(pl *difficultyPlayer) bool
- func (slider *Slider) IsSliding(player *difficultyPlayer) bool
- func (slider *Slider) IsStartHit(pl *difficultyPlayer) bool
- func (slider *Slider) MissForcefully(player *difficultyPlayer, time int64)
- func (slider *Slider) UpdateClickFor(player *difficultyPlayer, time int64) bool
- func (slider *Slider) UpdateFor(player *difficultyPlayer, time int64, processSliderEndsAhead bool) bool
- func (slider *Slider) UpdatePost(_ int64) bool
- func (slider *Slider) UpdatePostFor(player *difficultyPlayer, time int64, processSliderEndsAhead bool) bool
- type Spinner
- func (spinner *Spinner) GetFadeTime() int64
- func (spinner *Spinner) GetNumber() int64
- func (spinner *Spinner) GetObject() objects.IHitObject
- func (spinner *Spinner) Init(ruleSet *OsuRuleSet, object objects.IHitObject, players []*difficultyPlayer)
- func (spinner *Spinner) IsHit(pl *difficultyPlayer) bool
- func (spinner *Spinner) MissForcefully(_ *difficultyPlayer, _ int64)
- func (spinner *Spinner) UpdateClickFor(*difficultyPlayer, int64) bool
- func (spinner *Spinner) UpdateFor(player *difficultyPlayer, time int64, _ bool) bool
- func (spinner *Spinner) UpdatePost(_ int64) bool
- func (spinner *Spinner) UpdatePostFor(player *difficultyPlayer, time int64, _ bool) bool
Constants ¶
View Source
const ( NONE = Grade(iota) D C B A S SH SS SSH )
View Source
const ( HpMu = 6.0 HpKatu = 10.0 HpGeki = 14.0 Hp50 = 0.4 Hp100 = 2.2 Hp300 = 6.0 HpSliderTick = 3.0 HpSliderRepeat = 4.0 HpSpinnerSpin = 1.7 HpSpinnerBonus = 2.0 MaxHp = 200.0 )
View Source
const ( Ignore = HitResult(0) SliderMiss = HitResult(1 << iota) Miss Hit50 Hit100 Hit300 SliderStart SliderPoint SliderRepeat LegacySliderEnd SliderEnd SliderFinish // For lazer health processor SpinnerSpin SpinnerPoints SpinnerBonus MuAddition KatuAddition GekiAddition PositionalMiss Additions = MuAddition | KatuAddition | GekiAddition Hit50m = Hit50 | MuAddition Hit100m = Hit100 | MuAddition Hit300m = Hit300 | MuAddition Hit100k = Hit100 | KatuAddition Hit300k = Hit300 | KatuAddition Hit300g = Hit300 | GekiAddition BaseHits = Hit50 | Hit100 | Hit300 BaseHitsM = BaseHits | Miss HitValues = Hit50 | Hit100 | Hit300 | GekiAddition | KatuAddition SliderHits = SliderStart | SliderPoint | SliderRepeat | LegacySliderEnd | SliderEnd SpinnerHits = SpinnerSpin | SpinnerPoints | SpinnerBonus RawHits = SliderHits | SpinnerHits )
View Source
const ( Reset = ComboResult(iota) Hold Increase )
View Source
const ( Ignored = ClickAction(iota) Shake Click )
View Source
const FrameTime = 1000.0 / 60
View Source
const Left = Buttons(1)
View Source
const Right = Buttons(2)
View Source
const Tolerance2B = 3
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Circle ¶
type Circle struct {
// contains filtered or unexported fields
}
func (*Circle) GetFadeTime ¶
func (*Circle) GetObject ¶
func (circle *Circle) GetObject() objects.IHitObject
func (*Circle) Init ¶
func (circle *Circle) Init(ruleSet *OsuRuleSet, object objects.IHitObject, players []*difficultyPlayer)
func (*Circle) MissForcefully ¶
func (*Circle) UpdateClickFor ¶
func (*Circle) UpdatePost ¶
type ClickAction ¶
type ClickAction uint8
type ComboResult ¶
type ComboResult uint8
type FailListener ¶
type FailListener func()
type HealthProcessor ¶
type HealthProcessor struct { PassiveDrain float64 HpMultiplierNormal float64 HpMultiplierComboEnd float64 // contains filtered or unexported fields }
func NewHealthProcessor ¶
func NewHealthProcessor(beatMap *beatmap.BeatMap, player *difficultyPlayer, lowerSpinnerDrain bool) *HealthProcessor
func (*HealthProcessor) AddFailListener ¶
func (hp *HealthProcessor) AddFailListener(listener FailListener)
func (*HealthProcessor) AddResult ¶
func (hp *HealthProcessor) AddResult(result JudgementResult)
func (*HealthProcessor) CalculateRate ¶
func (hp *HealthProcessor) CalculateRate()
func (*HealthProcessor) GetDrainRate ¶
func (hp *HealthProcessor) GetDrainRate() float64
func (*HealthProcessor) GetHealth ¶
func (hp *HealthProcessor) GetHealth() float64
func (*HealthProcessor) Increase ¶
func (hp *HealthProcessor) Increase(amount float64, fromHitObject bool)
func (*HealthProcessor) IncreaseRelative ¶
func (hp *HealthProcessor) IncreaseRelative(amount float64, fromHitObject bool)
func (*HealthProcessor) ResetHp ¶
func (hp *HealthProcessor) ResetHp()
func (*HealthProcessor) Update ¶
func (hp *HealthProcessor) Update(time int64)
type HealthProcessorV2 ¶
type HealthProcessorV2 struct {
// contains filtered or unexported fields
}
func NewHealthProcessorV2 ¶
func NewHealthProcessorV2(beatMap *beatmap.BeatMap, player *difficultyPlayer) *HealthProcessorV2
func (*HealthProcessorV2) AddFailListener ¶
func (hp *HealthProcessorV2) AddFailListener(listener FailListener)
func (*HealthProcessorV2) AddResult ¶
func (hp *HealthProcessorV2) AddResult(result JudgementResult)
func (*HealthProcessorV2) CalculateRate ¶
func (hp *HealthProcessorV2) CalculateRate()
func (*HealthProcessorV2) GetDrainRate ¶
func (hp *HealthProcessorV2) GetDrainRate() float64
func (*HealthProcessorV2) GetHealth ¶
func (hp *HealthProcessorV2) GetHealth() float64
func (*HealthProcessorV2) Increase ¶
func (hp *HealthProcessorV2) Increase(amount float64, fromHitObject bool)
func (*HealthProcessorV2) IncreaseRelative ¶
func (hp *HealthProcessorV2) IncreaseRelative(amount float64, fromHitObject bool)
func (*HealthProcessorV2) ResetHp ¶
func (hp *HealthProcessorV2) ResetHp()
func (*HealthProcessorV2) Update ¶
func (hp *HealthProcessorV2) Update(time int64)
type HitObject ¶
type HitObject interface { Init(ruleset *OsuRuleSet, object objects.IHitObject, players []*difficultyPlayer) UpdateFor(player *difficultyPlayer, time int64, processSliderEndsAhead bool) bool UpdateClickFor(player *difficultyPlayer, time int64) bool UpdatePostFor(player *difficultyPlayer, time int64, processSliderEndsAhead bool) bool UpdatePost(time int64) bool MissForcefully(player *difficultyPlayer, time int64) IsHit(player *difficultyPlayer) bool GetFadeTime() int64 GetNumber() int64 GetObject() objects.IHitObject }
type HitResult ¶
type HitResult int64
func (HitResult) AffectsAccLZ ¶
func (HitResult) AffectsAccV1 ¶
func (HitResult) ScoreValue ¶
func (HitResult) ScoreValueLazer ¶
func (HitResult) ScoreValueMod ¶
func (r HitResult) ScoreValueMod(mod difficulty.Modifier) int64
func (HitResult) ScoreValueV2 ¶
type IHealthProcessor ¶
type IHealthProcessor interface { CalculateRate() ResetHp() AddResult(result JudgementResult) Increase(amount float64, fromHitObject bool) IncreaseRelative(amount float64, fromHitObject bool) Update(time int64) AddFailListener(listener FailListener) GetHealth() float64 GetDrainRate() float64 }
type JudgementResult ¶
type OsuRuleSet ¶
type OsuRuleSet struct {
// contains filtered or unexported fields
}
func NewOsuRuleset ¶
func NewOsuRuleset(beatMap *beatmap.BeatMap, cursors []*graphics.Cursor, diffs []*difficulty.Difficulty) *OsuRuleSet
func (*OsuRuleSet) CanBeHit ¶
func (set *OsuRuleSet) CanBeHit(time int64, object HitObject, player *difficultyPlayer) ClickAction
func (*OsuRuleSet) CanBeHitLazer ¶
func (set *OsuRuleSet) CanBeHitLazer(time int64, object HitObject, player *difficultyPlayer) ClickAction
func (*OsuRuleSet) CanBeHitStable ¶
func (set *OsuRuleSet) CanBeHitStable(time int64, object HitObject, player *difficultyPlayer) ClickAction
func (*OsuRuleSet) GetBeatMap ¶
func (set *OsuRuleSet) GetBeatMap() *beatmap.BeatMap
func (*OsuRuleSet) GetPlayer ¶
func (set *OsuRuleSet) GetPlayer(cursor *graphics.Cursor) *difficultyPlayer
func (*OsuRuleSet) GetPlayerDifficulty ¶
func (set *OsuRuleSet) GetPlayerDifficulty(cursor *graphics.Cursor) *difficulty.Difficulty
func (*OsuRuleSet) GetProcessed ¶
func (set *OsuRuleSet) GetProcessed() []HitObject
func (*OsuRuleSet) GetResultForDelta ¶
func (set *OsuRuleSet) GetResultForDelta(player *difficultyPlayer, delta float64) HitResult
func (*OsuRuleSet) PlayerStopped ¶
func (set *OsuRuleSet) PlayerStopped(cursor *graphics.Cursor, time int64)
func (*OsuRuleSet) PostHit ¶
func (set *OsuRuleSet) PostHit(time int64, object HitObject, player *difficultyPlayer)
func (*OsuRuleSet) SendResult ¶
func (set *OsuRuleSet) SendResult(cursor *graphics.Cursor, judgementResult JudgementResult)
func (*OsuRuleSet) SetEndListener ¶
func (set *OsuRuleSet) SetEndListener(listener endListener)
func (*OsuRuleSet) SetFailListener ¶
func (set *OsuRuleSet) SetFailListener(listener failListener)
func (*OsuRuleSet) SetListener ¶
func (set *OsuRuleSet) SetListener(listener hitListener)
func (*OsuRuleSet) Update ¶
func (set *OsuRuleSet) Update(time int64)
func (*OsuRuleSet) UpdateClickFor ¶
func (set *OsuRuleSet) UpdateClickFor(cursor *graphics.Cursor, time int64)
func (*OsuRuleSet) UpdateNormalFor ¶
func (set *OsuRuleSet) UpdateNormalFor(cursor *graphics.Cursor, time int64, processSliderEndsAhead bool)
func (*OsuRuleSet) UpdatePostFor ¶
func (set *OsuRuleSet) UpdatePostFor(cursor *graphics.Cursor, time int64, processSliderEndsAhead bool)
type Score ¶
type Score struct { Score int64 Accuracy float64 Grade Grade Combo uint PerfectCombo bool Count300 uint CountGeki uint Count100 uint CountKatu uint Count50 uint CountMiss uint CountSB uint MaxTicks uint SliderEnd uint MaxSliderEnd uint PP api.PPv2Results // contains filtered or unexported fields }
func (*Score) AddResult ¶
func (s *Score) AddResult(result JudgementResult)
func (*Score) CalculateGrade ¶
func (s *Score) CalculateGrade(mods difficulty.Modifier)
func (*Score) ToPerfScore ¶
type Slider ¶
type Slider struct {
// contains filtered or unexported fields
}
func (*Slider) GetFadeTime ¶
func (*Slider) GetObject ¶
func (slider *Slider) GetObject() objects.IHitObject
func (*Slider) GetStartResult ¶
func (*Slider) Init ¶
func (slider *Slider) Init(ruleSet *OsuRuleSet, object objects.IHitObject, players []*difficultyPlayer)
func (*Slider) IsStartHit ¶
func (*Slider) MissForcefully ¶
func (*Slider) UpdateClickFor ¶
func (*Slider) UpdatePost ¶
type Spinner ¶
type Spinner struct {
// contains filtered or unexported fields
}
func (*Spinner) GetFadeTime ¶
func (*Spinner) GetObject ¶
func (spinner *Spinner) GetObject() objects.IHitObject
func (*Spinner) Init ¶
func (spinner *Spinner) Init(ruleSet *OsuRuleSet, object objects.IHitObject, players []*difficultyPlayer)
func (*Spinner) MissForcefully ¶
func (*Spinner) UpdateClickFor ¶
func (*Spinner) UpdatePost ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.