-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1950 from GiganticMinecraft/Separate/fairySound
妖精機能の喋るシステムを別subsystemとして切り出す
- Loading branch information
Showing
14 changed files
with
192 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...m/github/unchama/seichiassist/subsystems/vote/subsystems/fairyspeech/FairySpeechAPI.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.github.unchama.seichiassist.subsystems.vote.subsystems.fairyspeech | ||
|
||
import cats.data.Kleisli | ||
import com.github.unchama.seichiassist.subsystems.vote.subsystems.fairy.domain.property.FairyMessage | ||
|
||
import java.util.UUID | ||
import scala.collection.immutable.Seq | ||
|
||
trait FairySpeechAPI[F[_], Player] { | ||
|
||
/** | ||
* @return `player`に対して`messages`を妖精が喋る作用 | ||
*/ | ||
def speech(player: Player, messages: Seq[FairyMessage]): F[Unit] | ||
|
||
/** | ||
* @return `player`に対して妖精が喋った際に音を再生するかをトグルする作用 | ||
*/ | ||
def togglePlaySoundOnSpeech: Kleisli[F, Player, Unit] | ||
|
||
/** | ||
* @return `player`に対して妖精が喋った際に音を再生するかどうかを取得する作用 | ||
*/ | ||
def playSoundOnSpeech(player: UUID): F[Boolean] | ||
|
||
} | ||
|
||
object FairySpeechAPI { | ||
|
||
def apply[F[_], Player](implicit ev: FairySpeechAPI[F, Player]): FairySpeechAPI[F, Player] = | ||
ev | ||
|
||
} |
Oops, something went wrong.