-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added star rating calculator, allowing HR, DT, HT, EZ
- Loading branch information
1 parent
1f9fe77
commit e13f62f
Showing
18 changed files
with
1,048 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { hitobject } from 'ojsama' | ||
|
||
export default class DifficultyHitObject { | ||
/** | ||
* @param {hitobject} baseObject | ||
* @param {hitobject} lastObject | ||
* @param {number} clockRate The rate at which the gameplay clock is run at. | ||
*/ | ||
constructor(baseObject, lastObject, clockRate) { | ||
this.baseObject = baseObject | ||
this.lastObject = lastObject | ||
this.deltaTime = (baseObject.time - lastObject.time) / clockRate | ||
} | ||
} |
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,10 @@ | ||
export const HitType = { | ||
/** | ||
* A hit that can be hit by the centre portion of the drum. | ||
*/ | ||
Centre: 0, | ||
/** | ||
* A hit that can be hit by rim portion of the drum. | ||
*/ | ||
Rim: 1, | ||
} |
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,12 @@ | ||
export const ObjectType = { | ||
Hit: 1, | ||
Slider: 2, | ||
Spinner: 12, | ||
} | ||
|
||
export const fromNumber = (num) => { | ||
if (num === 1) return Hit | ||
if (num === 2) return Slider | ||
if (num === 12) return Spinner | ||
return -1 | ||
} |
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,34 @@ | ||
import { modbits } from 'ojsama' | ||
import Skill from '../../skills/skill' | ||
|
||
export default class TaikoDifficultyAttributes { | ||
/** | ||
* @param {number} starRating | ||
* @param {modbits} mods | ||
* @param {number} staminaStrain | ||
* @param {number} rhythmStrain | ||
* @param {number} colourStrain | ||
* @param {number} greatHitWindow | ||
* @param {number} maxCombo | ||
* @param {Skill[]} skills | ||
*/ | ||
constructor( | ||
starRating, | ||
mods, | ||
staminaStrain, | ||
rhythmStrain, | ||
colourStrain, | ||
greatHitWindow, | ||
maxCombo, | ||
skills | ||
) { | ||
this.starRating = starRating | ||
this.mods = mods | ||
this.staminaStrain = staminaStrain | ||
this.rhythmStrain = rhythmStrain | ||
this.colourStrain = colourStrain | ||
this.greatHitWindow = greatHitWindow | ||
this.maxCombo = maxCombo | ||
this.skills = skills | ||
} | ||
} |
Oops, something went wrong.