mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-05-29 16:20:13 +02:00
General code cleanup
This commit is contained in:
parent
575e47e384
commit
1a7b1b7e07
BIN
Assets/Resources/Music/theclappytrio.ogg
Normal file
BIN
Assets/Resources/Music/theclappytrio.ogg
Normal file
Binary file not shown.
22
Assets/Resources/Music/theclappytrio.ogg.meta
Normal file
22
Assets/Resources/Music/theclappytrio.ogg.meta
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ebc898cbaf3e679438e83c68552e527f
|
||||||
|
AudioImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 6
|
||||||
|
defaultSettings:
|
||||||
|
loadType: 0
|
||||||
|
sampleRateSetting: 0
|
||||||
|
sampleRateOverride: 44100
|
||||||
|
compressionFormat: 1
|
||||||
|
quality: 1
|
||||||
|
conversionMode: 0
|
||||||
|
platformSettingOverrides: {}
|
||||||
|
forceToMono: 0
|
||||||
|
normalize: 1
|
||||||
|
preloadAudioData: 1
|
||||||
|
loadInBackground: 0
|
||||||
|
ambisonic: 0
|
||||||
|
3D: 1
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -138,7 +138,7 @@ GameObject:
|
|||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 0
|
m_IsActive: 1
|
||||||
--- !u!4 &49975355
|
--- !u!4 &49975355
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -1359,7 +1359,7 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 066f6ce2bdafdfb45a8df77dfb111c22, type: 3}
|
m_Script: {fileID: 11500000, guid: 066f6ce2bdafdfb45a8df77dfb111c22, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
songBpm: 130
|
songBpm: 120
|
||||||
secPerBeat: 0
|
secPerBeat: 0
|
||||||
songPosition: 0
|
songPosition: 0
|
||||||
songPositionInBeats: 0
|
songPositionInBeats: 0
|
||||||
@ -1381,7 +1381,7 @@ AudioSource:
|
|||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
serializedVersion: 4
|
serializedVersion: 4
|
||||||
OutputAudioMixerGroup: {fileID: 0}
|
OutputAudioMixerGroup: {fileID: 0}
|
||||||
m_audioClip: {fileID: 8300000, guid: 51af38323954a8d44874780ba4577fb4, type: 3}
|
m_audioClip: {fileID: 8300000, guid: ebc898cbaf3e679438e83c68552e527f, type: 3}
|
||||||
m_PlayOnAwake: 0
|
m_PlayOnAwake: 0
|
||||||
m_Volume: 1
|
m_Volume: 1
|
||||||
m_Pitch: 1
|
m_Pitch: 1
|
||||||
@ -3884,7 +3884,7 @@ GameObject:
|
|||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 1
|
m_IsActive: 0
|
||||||
--- !u!4 &1161847961
|
--- !u!4 &1161847961
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -6634,7 +6634,7 @@ MonoBehaviour:
|
|||||||
playerEntities: []
|
playerEntities: []
|
||||||
currentEvent: 0
|
currentEvent: 0
|
||||||
currentPlayerEvent: 0
|
currentPlayerEvent: 0
|
||||||
txt: {fileID: 4900000, guid: cbe1a43c8ddc790498fde2e01e66d23e, type: 3}
|
txt: {fileID: 4900000, guid: 13908201c7935ea4c8e9d2a58b006b87, type: 3}
|
||||||
startOffset: 1
|
startOffset: 1
|
||||||
--- !u!212 &2072389418
|
--- !u!212 &2072389418
|
||||||
SpriteRenderer:
|
SpriteRenderer:
|
||||||
|
@ -6,7 +6,7 @@ namespace RhythmHeavenMania
|
|||||||
[Serializable]
|
[Serializable]
|
||||||
public class Beatmap
|
public class Beatmap
|
||||||
{
|
{
|
||||||
public double bpm;
|
public float bpm;
|
||||||
public List<Entity> entities;
|
public List<Entity> entities;
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
@ -14,6 +14,7 @@ namespace RhythmHeavenMania
|
|||||||
{
|
{
|
||||||
public float beat;
|
public float beat;
|
||||||
public int track;
|
public int track;
|
||||||
|
public float length;
|
||||||
public string datamodel;
|
public string datamodel;
|
||||||
|
|
||||||
public object Clone()
|
public object Clone()
|
||||||
|
@ -104,6 +104,12 @@ namespace RhythmHeavenMania
|
|||||||
return final;
|
return final;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetBpm(float bpm)
|
||||||
|
{
|
||||||
|
this.songBpm = bpm;
|
||||||
|
secPerBeat = 60f / songBpm;
|
||||||
|
}
|
||||||
|
|
||||||
public bool InThreshold(float beat)
|
public bool InThreshold(float beat)
|
||||||
{
|
{
|
||||||
//Check if the beat sent falls within beatThreshold
|
//Check if the beat sent falls within beatThreshold
|
||||||
|
@ -66,6 +66,10 @@ namespace RhythmHeavenMania
|
|||||||
new GameAction("prepare", delegate { ForkLifter.instance.ForkLifterHand.Prepare(); }),
|
new GameAction("prepare", delegate { ForkLifter.instance.ForkLifterHand.Prepare(); }),
|
||||||
new GameAction("gulp", delegate { ForkLifterPlayer.instance.Eat(); }),
|
new GameAction("gulp", delegate { ForkLifterPlayer.instance.Eat(); }),
|
||||||
new GameAction("sigh", delegate { Jukebox.PlayOneShot("sigh"); })
|
new GameAction("sigh", delegate { Jukebox.PlayOneShot("sigh"); })
|
||||||
|
}),
|
||||||
|
new MiniGame("clappyTrio", new List<GameAction>()
|
||||||
|
{
|
||||||
|
new GameAction("clap", delegate { Debug.Log("bruh"); }, true ),
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -93,7 +97,7 @@ namespace RhythmHeavenMania
|
|||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (GameManager.instance.currentEvent > 0 && GameManager.instance.currentEvent < GameManager.instance.Beatmap.entities.Count)
|
if (GameManager.instance.currentEvent >= 0 && GameManager.instance.currentEvent < GameManager.instance.Beatmap.entities.Count)
|
||||||
currentBeat = GameManager.instance.Beatmap.entities[GameManager.instance.currentEvent].beat;
|
currentBeat = GameManager.instance.Beatmap.entities[GameManager.instance.currentEvent].beat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,16 +34,17 @@ namespace RhythmHeavenMania
|
|||||||
SortEventsList();
|
SortEventsList();
|
||||||
|
|
||||||
string json = txt.text;
|
string json = txt.text;
|
||||||
Beatmap.entities = JsonConvert.DeserializeObject<List<Beatmap.Entity>>(json);
|
Beatmap = JsonConvert.DeserializeObject<Beatmap>(json);
|
||||||
|
|
||||||
SortEventsList();
|
SortEventsList();
|
||||||
|
|
||||||
StartCoroutine(Begin());
|
|
||||||
|
|
||||||
GlobalGameManager.Init();
|
GlobalGameManager.Init();
|
||||||
|
|
||||||
eventCaller = GetComponent<EventCaller>();
|
eventCaller = GetComponent<EventCaller>();
|
||||||
eventCaller.Init();
|
eventCaller.Init();
|
||||||
|
Conductor.instance.SetBpm(Beatmap.bpm);
|
||||||
|
|
||||||
|
StartCoroutine(Begin());
|
||||||
}
|
}
|
||||||
|
|
||||||
private IEnumerator Begin()
|
private IEnumerator Begin()
|
||||||
|
File diff suppressed because it is too large
Load Diff
10
Assets/theclappytrio.json
Normal file
10
Assets/theclappytrio.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"bpm": 117.26,
|
||||||
|
"entities": [
|
||||||
|
{
|
||||||
|
"beat": 9,
|
||||||
|
"length": 3,
|
||||||
|
"datamodel": "clappyTrio/clap"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
7
Assets/theclappytrio.json.meta
Normal file
7
Assets/theclappytrio.json.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 13908201c7935ea4c8e9d2a58b006b87
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Loading…
x
Reference in New Issue
Block a user