Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified assets/images/koma_sp_back.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/kurona_sp_back.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/shishimaru_sp_back.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 8 additions & 5 deletions internal/character/player.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,6 @@ func (p *Player) Draw(screen *ebiten.Image) {
return
}

if p.current == move.SkillEffect {
screen.DrawImage(p.skillImage, p.spOp)
return
}

if p.current == move.SkillDash || p.current == move.SkillWalk || p.current == move.SkillAscending || p.current == move.SkillDescending {
screen.DrawImage(p.skillEffect, p.spEffectOp)
}
Expand All @@ -270,6 +265,14 @@ func (p *Player) Draw(screen *ebiten.Image) {
}
}

// DrawSpEffect draws the character's special skill effect.
func (p *Player) DrawSpEffect(screen *ebiten.Image) {
if p.current == move.SkillEffect {
screen.DrawImage(p.skillImage, p.spOp)
return
}
}

// GetPosition return the current position of this player.
func (p *Player) GetPosition() *view.Vector {
return p.stateMachine.GetPosition()
Expand Down
7 changes: 7 additions & 0 deletions internal/scenes/scene_stage01.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,17 +314,22 @@ func (s *Stage01Scene) run() {

// Draw draws background and characters.
func (s *Stage01Scene) Draw(screen *ebiten.Image) {
// 遠くの背景や奥側のオブジェクト、プレイヤー、プレイヤーよりも手前のオブジェクトの順に描画する
s.field.DrawFarther(screen)
s.player.Draw(screen)
s.field.DrawCloser(screen)

// UI部品やユーザーに向けたメッセージ、SPエフェクトなどを描画する
s.drawUI(screen)
s.drawWithState(screen)

// FPSを表示する
tOp := &text.DrawOptions{}
tOp.GeoM.Translate(10, view.ScreenHeight-15)
tOp.ColorScale.ScaleWithColor(color.White)
text.Draw(screen, fmt.Sprintf("FPS: %3.1f", ebiten.ActualFPS()), fonts.GamerFontSS, tOp)

// 画面遷移時のカーテン描画や、ステージクリアのエフェクトを描画する
if s.isStarting || s.isClosing {
s.curtain.Draw(screen)
} else if s.state == stageClear {
Expand Down Expand Up @@ -412,6 +417,8 @@ func (s *Stage01Scene) drawWithState(screen *ebiten.Image) {
tOp.GeoM.Translate(10, 20)
tOp.ColorScale.ScaleWithColor(color.White)
text.Draw(screen, fmt.Sprintf("Music: %s", s.disc.Name), fonts.GamerFontS, tOp)
case skillEffect:
s.player.DrawSpEffect(screen)
case stageClear:
musicTextOp := &text.DrawOptions{}
musicTextOp.GeoM.Translate(10, 20)
Expand Down
Loading