mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-12 20:55:08 +00:00
Performance Improvements (#173)
* improve performance with new render settings - fix letterboxing losing camera references * fin in missing params? needs testing * finish default param check * scale jump animation of fan club spectators * fix missing references in a karate man method * more liberal use of Double in conductor beatkeeping is now absolute instead of being additive * optimize Conductor more reduce caching from constantly sorting tempo changes despite game manager doing it for us moved metronome logic to LateUpdate
This commit is contained in:
parent
af8dd6142e
commit
695f6671fb
26 changed files with 398 additions and 248 deletions
|
@ -1,5 +1,56 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &5584137290458315811
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 455520442982280351}
|
||||
- component: {fileID: 6060748659854770895}
|
||||
m_Layer: 0
|
||||
m_Name: LetterboxFullscreen
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!4 &455520442982280351
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5584137290458315811}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 6234653029009288364}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &6060748659854770895
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5584137290458315811}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: e188ee899633d0b49870a5ae38b7359d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
ratio: {x: 16, y: 9}
|
||||
forceRatioOnAwake: 1
|
||||
listenForWindowChanges: 1
|
||||
createCameraForLetterBoxRendering: 0
|
||||
findCamerasAutomatically: 1
|
||||
letterBoxCameraColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
cameras: []
|
||||
letterBoxCamera: {fileID: 5997098664667581191}
|
||||
--- !u!1 &6234653028281991659
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -202,9 +253,85 @@ Transform:
|
|||
- {fileID: 6234653028453841262}
|
||||
- {fileID: 6234653028281991656}
|
||||
- {fileID: 1942359490671534657}
|
||||
- {fileID: 455520442982280351}
|
||||
- {fileID: 3022914124654306410}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &7745146194305554249
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3022914124654306410}
|
||||
- component: {fileID: 5997098664667581191}
|
||||
m_Layer: 0
|
||||
m_Name: LetterboxBgCam
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3022914124654306410
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7745146194305554249}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 6234653029009288364}
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!20 &5997098664667581191
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7745146194305554249}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_FocalLength: 50
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 1
|
||||
orthographic size: 5
|
||||
m_Depth: -100
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!1 &8463691957270393964
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -100,6 +100,15 @@ AnimationClip:
|
|||
weightedMode: 0
|
||||
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
- serializedVersion: 3
|
||||
time: 0.5
|
||||
value: {x: -0.521, y: 2.32, z: 0}
|
||||
inSlope: {x: Infinity, y: Infinity, z: Infinity}
|
||||
outSlope: {x: Infinity, y: Infinity, z: Infinity}
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
|
@ -141,6 +150,15 @@ AnimationClip:
|
|||
weightedMode: 0
|
||||
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
- serializedVersion: 3
|
||||
time: 0.5
|
||||
value: {x: 0.521, y: 2.32, z: 0}
|
||||
inSlope: {x: Infinity, y: Infinity, z: Infinity}
|
||||
outSlope: {x: Infinity, y: Infinity, z: Infinity}
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
|
@ -198,6 +216,15 @@ AnimationClip:
|
|||
weightedMode: 0
|
||||
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
- serializedVersion: 3
|
||||
time: 0.5
|
||||
value: {x: 0, y: 1.63, z: 0}
|
||||
inSlope: {x: Infinity, y: Infinity, z: Infinity}
|
||||
outSlope: {x: Infinity, y: Infinity, z: Infinity}
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
|
@ -333,6 +360,8 @@ AnimationClip:
|
|||
value: {fileID: -198993962868910611, guid: 3ceb27c8c676e7a428cf6e15cd11b7ef, type: 3}
|
||||
- time: 0.033333335
|
||||
value: {fileID: 1143994186590036386, guid: 3ceb27c8c676e7a428cf6e15cd11b7ef, type: 3}
|
||||
- time: 0.5
|
||||
value: {fileID: 1143994186590036386, guid: 3ceb27c8c676e7a428cf6e15cd11b7ef, type: 3}
|
||||
attribute: m_Sprite
|
||||
path: root_motion/Body/fan_Body00
|
||||
classID: 212
|
||||
|
@ -491,12 +520,13 @@ AnimationClip:
|
|||
- {fileID: 3272263371775538141, guid: 3ceb27c8c676e7a428cf6e15cd11b7ef, type: 3}
|
||||
- {fileID: -198993962868910611, guid: 3ceb27c8c676e7a428cf6e15cd11b7ef, type: 3}
|
||||
- {fileID: 1143994186590036386, guid: 3ceb27c8c676e7a428cf6e15cd11b7ef, type: 3}
|
||||
- {fileID: 1143994186590036386, guid: 3ceb27c8c676e7a428cf6e15cd11b7ef, type: 3}
|
||||
m_AnimationClipSettings:
|
||||
serializedVersion: 2
|
||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||
m_AdditiveReferencePoseTime: 0
|
||||
m_StartTime: 0
|
||||
m_StopTime: 0.050000004
|
||||
m_StopTime: 0.51666665
|
||||
m_OrientationOffsetY: 0
|
||||
m_Level: 0
|
||||
m_CycleOffset: 0.05
|
||||
|
@ -533,6 +563,15 @@ AnimationClip:
|
|||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 0.5
|
||||
value: -0.521
|
||||
inSlope: Infinity
|
||||
outSlope: Infinity
|
||||
tangentMode: 103
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
|
@ -561,6 +600,15 @@ AnimationClip:
|
|||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 0.5
|
||||
value: 2.32
|
||||
inSlope: Infinity
|
||||
outSlope: Infinity
|
||||
tangentMode: 103
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
|
@ -589,6 +637,15 @@ AnimationClip:
|
|||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 0.5
|
||||
value: 0
|
||||
inSlope: Infinity
|
||||
outSlope: Infinity
|
||||
tangentMode: 103
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
|
@ -807,6 +864,15 @@ AnimationClip:
|
|||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 0.5
|
||||
value: 0.521
|
||||
inSlope: Infinity
|
||||
outSlope: Infinity
|
||||
tangentMode: 103
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
|
@ -835,6 +901,15 @@ AnimationClip:
|
|||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 0.5
|
||||
value: 2.32
|
||||
inSlope: Infinity
|
||||
outSlope: Infinity
|
||||
tangentMode: 103
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
|
@ -863,6 +938,15 @@ AnimationClip:
|
|||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 0.5
|
||||
value: 0
|
||||
inSlope: Infinity
|
||||
outSlope: Infinity
|
||||
tangentMode: 103
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
|
@ -1157,6 +1241,15 @@ AnimationClip:
|
|||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 0.5
|
||||
value: 0
|
||||
inSlope: Infinity
|
||||
outSlope: Infinity
|
||||
tangentMode: 103
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
|
@ -1185,6 +1278,15 @@ AnimationClip:
|
|||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 0.5
|
||||
value: 1.63
|
||||
inSlope: Infinity
|
||||
outSlope: Infinity
|
||||
tangentMode: 103
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
|
@ -1213,6 +1315,15 @@ AnimationClip:
|
|||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 0.5
|
||||
value: 0
|
||||
inSlope: Infinity
|
||||
outSlope: Infinity
|
||||
tangentMode: 103
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
|
|
|
@ -3041,57 +3041,6 @@ MonoBehaviour:
|
|||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
Content: {fileID: 1750038561}
|
||||
--- !u!1 &89978021
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 89978023}
|
||||
- component: {fileID: 89978022}
|
||||
m_Layer: 0
|
||||
m_Name: LetterboxFullscreen
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!114 &89978022
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 89978021}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: e188ee899633d0b49870a5ae38b7359d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
ratio: {x: 16, y: 9}
|
||||
forceRatioOnAwake: 1
|
||||
listenForWindowChanges: 1
|
||||
createCameraForLetterBoxRendering: 0
|
||||
findCamerasAutomatically: 1
|
||||
letterBoxCameraColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
cameras: []
|
||||
letterBoxCamera: {fileID: 1186982022}
|
||||
--- !u!4 &89978023
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 89978021}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 6
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &93132552
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -4820,7 +4769,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 0}
|
||||
m_AnchoredPosition: {x: -289.15005, y: 2}
|
||||
m_AnchoredPosition: {x: -289.15002, y: 2}
|
||||
m_SizeDelta: {x: -578.29, y: 49.92}
|
||||
m_Pivot: {x: 0.5, y: 0}
|
||||
--- !u!114 &156962255
|
||||
|
@ -5203,7 +5152,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -39.001007}
|
||||
m_AnchoredPosition: {x: 0, y: -39.000977}
|
||||
m_SizeDelta: {x: 0, y: -78.32001}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &172566393
|
||||
|
@ -10484,7 +10433,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0}
|
||||
m_AnchorMax: {x: 0.5, y: 0}
|
||||
m_AnchoredPosition: {x: -0.0050354004, y: 0.000061035156}
|
||||
m_AnchoredPosition: {x: -0.0050354004, y: 0}
|
||||
m_SizeDelta: {x: 1280, y: 281.88}
|
||||
m_Pivot: {x: 0.5, y: 0}
|
||||
--- !u!114 &382658482
|
||||
|
@ -11823,7 +11772,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -39.001007}
|
||||
m_AnchoredPosition: {x: 0, y: -39.000977}
|
||||
m_SizeDelta: {x: 0, y: -78.32001}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &435667403
|
||||
|
@ -12269,7 +12218,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -39.001007}
|
||||
m_AnchoredPosition: {x: 0, y: -39.000977}
|
||||
m_SizeDelta: {x: 0, y: -78.32001}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &454315226
|
||||
|
@ -14758,7 +14707,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0}
|
||||
m_AnchorMax: {x: 0.5, y: 1}
|
||||
m_AnchoredPosition: {x: 119.83, y: -19.690994}
|
||||
m_AnchoredPosition: {x: 119.83, y: -19.690979}
|
||||
m_SizeDelta: {x: 578.29, y: -43.6}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &546272878
|
||||
|
@ -15986,7 +15935,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -49.99994}
|
||||
m_AnchoredPosition: {x: 0, y: -50}
|
||||
m_SizeDelta: {x: -48, y: -148}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &572765323
|
||||
|
@ -17475,7 +17424,7 @@ MonoBehaviour:
|
|||
m_HandleRect: {fileID: 704039020}
|
||||
m_Direction: 0
|
||||
m_Value: 0
|
||||
m_Size: 0.03287128
|
||||
m_Size: 0.032871276
|
||||
m_NumberOfSteps: 0
|
||||
m_OnValueChanged:
|
||||
m_PersistentCalls:
|
||||
|
@ -19222,7 +19171,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -39.001007}
|
||||
m_AnchoredPosition: {x: 0, y: -39.000977}
|
||||
m_SizeDelta: {x: 0, y: -78.32001}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &673880752
|
||||
|
@ -25344,8 +25293,8 @@ MonoBehaviour:
|
|||
m_TargetGraphic: {fileID: 1589389272}
|
||||
m_HandleRect: {fileID: 1589389271}
|
||||
m_Direction: 2
|
||||
m_Value: 1
|
||||
m_Size: 0.9999893
|
||||
m_Value: 0
|
||||
m_Size: 1
|
||||
m_NumberOfSteps: 0
|
||||
m_OnValueChanged:
|
||||
m_PersistentCalls:
|
||||
|
@ -25843,7 +25792,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -39.001007}
|
||||
m_AnchoredPosition: {x: 0, y: -39.000977}
|
||||
m_SizeDelta: {x: 0, y: -78.32001}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &926134725
|
||||
|
@ -26534,7 +26483,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -39.001007}
|
||||
m_AnchoredPosition: {x: 0, y: -39.000977}
|
||||
m_SizeDelta: {x: 0, y: -78.32001}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &948189509
|
||||
|
@ -29483,7 +29432,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0}
|
||||
m_AnchorMax: {x: 0.5, y: 1}
|
||||
m_AnchoredPosition: {x: 120.830025, y: -19.690964}
|
||||
m_AnchoredPosition: {x: 120.830025, y: -19.690979}
|
||||
m_SizeDelta: {x: 576.29, y: -43.38}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1056099133
|
||||
|
@ -30892,7 +30841,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0.5}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: -408.98004, y: -17}
|
||||
m_AnchoredPosition: {x: -408.97998, y: -17}
|
||||
m_SizeDelta: {x: -817.96, y: -46.29}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &1118147045
|
||||
|
@ -32369,7 +32318,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0.5}
|
||||
m_AnchorMax: {x: 1, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 129.90404}
|
||||
m_AnchoredPosition: {x: 0, y: 129.8829}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 1}
|
||||
--- !u!114 &1154875944
|
||||
|
@ -33172,7 +33121,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -49.99991}
|
||||
m_AnchoredPosition: {x: 0, y: -49.999878}
|
||||
m_SizeDelta: {x: -48, y: -148}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1182686745
|
||||
|
@ -33411,80 +33360,6 @@ CanvasRenderer:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1186810248}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1186982020
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1186982023}
|
||||
- component: {fileID: 1186982022}
|
||||
m_Layer: 0
|
||||
m_Name: LetterboxBgCam
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!20 &1186982022
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1186982020}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_FocalLength: 50
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 1
|
||||
orthographic size: 5
|
||||
m_Depth: -100
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &1186982023
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1186982020}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 7
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1192611371
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -38150,7 +38025,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: -0.0012207031, y: 0.000061035156}
|
||||
m_AnchoredPosition: {x: -0.0012207031, y: 0}
|
||||
m_SizeDelta: {x: 0, y: -0.000030517578}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1336470763
|
||||
|
@ -39252,7 +39127,7 @@ MonoBehaviour:
|
|||
m_EditorClassIdentifier:
|
||||
MainCanvas: {fileID: 1791483802}
|
||||
EditorCamera: {fileID: 2047408675}
|
||||
GameLetterbox: {fileID: 89978021}
|
||||
GameLetterbox: {fileID: 0}
|
||||
ScreenRenderTexture: {fileID: 8400000, guid: d3f3d6ca32122da4d9e3a8e7aa2ede16, type: 2}
|
||||
Screen: {fileID: 558010761}
|
||||
GridGameSelector: {fileID: 1154875943}
|
||||
|
@ -39277,6 +39152,7 @@ MonoBehaviour:
|
|||
- {fileID: 1265865542}
|
||||
- {fileID: 1336470763}
|
||||
- {fileID: 1946344932}
|
||||
- {fileID: 292323699}
|
||||
tooltipText: {fileID: 1196204504}
|
||||
fullscreen: 0
|
||||
discordDuringTesting: 0
|
||||
|
@ -45885,7 +45761,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 111.50012, y: -29.533981}
|
||||
m_AnchoredPosition: {x: 111.50012, y: -29.533966}
|
||||
m_SizeDelta: {x: 223, y: -108.27}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1671351976
|
||||
|
@ -49282,7 +49158,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -84.99002}
|
||||
m_AnchoredPosition: {x: 0, y: -84.99005}
|
||||
m_SizeDelta: {x: 320, y: -84.99}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!1 &1852819572
|
||||
|
@ -52665,7 +52541,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -29.530014}
|
||||
m_AnchoredPosition: {x: 0, y: -29.529999}
|
||||
m_SizeDelta: {x: 0, y: -108.26}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1980243267
|
||||
|
@ -56143,7 +56019,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -39.001007}
|
||||
m_AnchoredPosition: {x: 0, y: -39.000977}
|
||||
m_SizeDelta: {x: 0, y: -78.32001}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &2122610459
|
||||
|
|
|
@ -355,6 +355,21 @@ namespace HeavenStudio
|
|||
if (!dynamicData.ContainsKey(param.propertyName))
|
||||
{
|
||||
type = param.parameter.GetType();
|
||||
//FUTURE: attempt to convert to a new entity if a converter exists for this datamodel
|
||||
//add property if it doesn't exist
|
||||
if (!e.DynamicData.ContainsKey(param.propertyName))
|
||||
{
|
||||
Debug.LogWarning($"Property {param.propertyName} does not exist in the entity's dynamic data! Adding...");
|
||||
if (type == typeof(EntityTypes.Integer))
|
||||
dynamicData.Add(param.propertyName, (int)param.parameter);
|
||||
else if (type == typeof(EntityTypes.Float))
|
||||
dynamicData.Add(param.propertyName, (float)param.parameter);
|
||||
else if (type.IsEnum && param.propertyName != "ease")
|
||||
dynamicData.Add(param.propertyName, (int)param.parameter);
|
||||
else
|
||||
dynamicData.Add(param.propertyName, Convert.ChangeType(param.parameter, type));
|
||||
continue;
|
||||
}
|
||||
pType = e[param.propertyName].GetType();
|
||||
if (pType == type)
|
||||
{
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
using System.Collections;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Audio;
|
||||
|
||||
using Starpelly;
|
||||
|
||||
|
@ -21,15 +20,15 @@ namespace HeavenStudio
|
|||
public float pitchedSecPerBeat => (secPerBeat / musicSource.pitch);
|
||||
|
||||
// Current song position, in seconds
|
||||
private float songPos; // for Conductor use only
|
||||
public float songPosition;
|
||||
private double songPos; // for Conductor use only
|
||||
public float songPosition => (float) songPos;
|
||||
|
||||
// Current song position, in beats
|
||||
private float songPosBeat; // for Conductor use only
|
||||
public float songPositionInBeats;
|
||||
private double songPosBeat; // for Conductor use only
|
||||
public float songPositionInBeats => (float) songPosBeat;
|
||||
|
||||
// Current time of the song
|
||||
private float time;
|
||||
private double time;
|
||||
|
||||
double lastAbsTime;
|
||||
|
||||
|
@ -54,7 +53,7 @@ namespace HeavenStudio
|
|||
// Metronome tick sound enabled
|
||||
public bool metronome = false;
|
||||
|
||||
public float timeSinceLastTempoChange = 0;
|
||||
public float timeSinceLastTempoChange = Single.MinValue;
|
||||
|
||||
private bool beat;
|
||||
|
||||
|
@ -67,7 +66,7 @@ namespace HeavenStudio
|
|||
|
||||
public void SetBeat(float beat)
|
||||
{
|
||||
float secFromBeat = GetSongPosFromBeat(beat);
|
||||
float secFromBeat = (float) GetSongPosFromBeat(beat);
|
||||
|
||||
if (musicSource.clip != null)
|
||||
{
|
||||
|
@ -79,11 +78,11 @@ namespace HeavenStudio
|
|||
|
||||
GameManager.instance.SetCurrentEventToClosest(beat);
|
||||
songPosBeat = beat;
|
||||
songPositionInBeats = songPosBeat;
|
||||
}
|
||||
|
||||
public void Play(float beat)
|
||||
{
|
||||
GameManager.instance.SortEventsList();
|
||||
bool negativeOffset = firstBeatOffset < 0f;
|
||||
bool negativeStartTime = false;
|
||||
|
||||
|
@ -119,12 +118,12 @@ namespace HeavenStudio
|
|||
|
||||
if (musicStartTime < 0f)
|
||||
{
|
||||
musicSource.time = startPos;
|
||||
musicSource.time = (float) startPos;
|
||||
musicSource.PlayScheduled(AudioSettings.dspTime - firstBeatOffset / musicSource.pitch);
|
||||
}
|
||||
else
|
||||
{
|
||||
musicSource.time = musicStartTime;
|
||||
musicSource.time = (float) musicStartTime;
|
||||
musicSource.PlayScheduled(AudioSettings.dspTime);
|
||||
}
|
||||
}
|
||||
|
@ -132,11 +131,11 @@ namespace HeavenStudio
|
|||
{
|
||||
if (negativeStartTime)
|
||||
{
|
||||
musicSource.time = startPos;
|
||||
musicSource.time = (float) startPos;
|
||||
}
|
||||
else
|
||||
{
|
||||
musicSource.time = startPos + firstBeatOffset;
|
||||
musicSource.time = (float) startPos + firstBeatOffset;
|
||||
}
|
||||
|
||||
musicSource.PlayScheduled(AudioSettings.dspTime);
|
||||
|
@ -160,7 +159,6 @@ namespace HeavenStudio
|
|||
this.time = time;
|
||||
|
||||
songPosBeat = 0;
|
||||
songPositionInBeats = 0;
|
||||
|
||||
isPlaying = false;
|
||||
isPaused = false;
|
||||
|
@ -171,33 +169,31 @@ namespace HeavenStudio
|
|||
|
||||
public void Update()
|
||||
{
|
||||
secPerBeat = 60f / songBpm;
|
||||
|
||||
if (isPlaying)
|
||||
{
|
||||
double absTime = Time.realtimeSinceStartupAsDouble;
|
||||
float dt = (float) (absTime - lastAbsTime) * musicSource.pitch;
|
||||
double dt = (absTime - lastAbsTime) * musicSource.pitch;
|
||||
lastAbsTime = absTime;
|
||||
|
||||
time += dt;
|
||||
|
||||
songPos = time;
|
||||
songPosition = songPos;
|
||||
|
||||
songPosBeat += (dt / secPerBeat);
|
||||
songPositionInBeats = songPosBeat;
|
||||
// songPositionInBeats = Time.deltaTime / secPerBeat;
|
||||
songPosBeat = GetBeatFromSongPos(songPos - firstBeatOffset);
|
||||
}
|
||||
}
|
||||
|
||||
if (metronome)
|
||||
public void LateUpdate()
|
||||
{
|
||||
if (metronome)
|
||||
{
|
||||
if (ReportBeat(ref lastReportedBeat))
|
||||
{
|
||||
if (ReportBeat(ref lastReportedBeat))
|
||||
{
|
||||
Util.Jukebox.PlayOneShot("metronome");
|
||||
}
|
||||
else if (songPositionInBeats < lastReportedBeat)
|
||||
{
|
||||
lastReportedBeat = Mathf.Round(songPositionInBeats);
|
||||
}
|
||||
Util.Jukebox.PlayOneShot("metronome");
|
||||
}
|
||||
else if (songPositionInBeats < lastReportedBeat)
|
||||
{
|
||||
lastReportedBeat = Mathf.Round(songPositionInBeats);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -242,87 +238,60 @@ namespace HeavenStudio
|
|||
return GetBeatFromPosition(position, targetBeat - margin, margin);
|
||||
}
|
||||
|
||||
private List<Beatmap.TempoChange> GetSortedTempoChanges(Beatmap chart)
|
||||
{
|
||||
//iterate over all tempo changes, adding to counter
|
||||
List<Beatmap.TempoChange> tempoChanges = chart.tempoChanges;
|
||||
tempoChanges.Sort((x, y) => x.beat.CompareTo(y.beat)); //sorts all tempo changes by ascending time (GameManager already does this but juste en cas...)
|
||||
return tempoChanges;
|
||||
}
|
||||
|
||||
private List<DynamicBeatmap.TempoChange> GetSortedTempoChanges(DynamicBeatmap chart)
|
||||
{
|
||||
//iterate over all tempo changes, adding to counter
|
||||
List<DynamicBeatmap.TempoChange> tempoChanges = chart.tempoChanges;
|
||||
tempoChanges.Sort((x, y) => x.beat.CompareTo(y.beat)); //sorts all tempo changes by ascending time (GameManager already does this but juste en cas...)
|
||||
return tempoChanges;
|
||||
GameManager.instance.SortEventsList();
|
||||
return GameManager.instance.Beatmap.tempoChanges;
|
||||
}
|
||||
|
||||
public float GetSongPosFromBeat(float beat)
|
||||
public double GetSongPosFromBeat(float beat)
|
||||
{
|
||||
var chart = GameManager.instance.Beatmap;
|
||||
SetBpm(chart.bpm);
|
||||
|
||||
//initial counter
|
||||
float counter = 0f;
|
||||
double counter = 0f;
|
||||
|
||||
//time of last tempo change, to know how much to add to counter
|
||||
float lastTempoChangeBeat = 0f;
|
||||
|
||||
//iterate over all tempo changes, adding to counter
|
||||
var tempoChanges = GetSortedTempoChanges(chart);
|
||||
foreach (var t in tempoChanges)
|
||||
foreach (var t in GameManager.instance.Beatmap.tempoChanges)
|
||||
{
|
||||
if (t.beat > beat)
|
||||
{
|
||||
// this tempo change is past our requested time, abort
|
||||
break;
|
||||
}
|
||||
// Debug.Log("tempo change at " + t.beat);
|
||||
|
||||
counter += (t.beat - lastTempoChangeBeat) * secPerBeat;
|
||||
// Debug.Log("counter is now " + counter);
|
||||
|
||||
// now update to new bpm
|
||||
SetBpm(t.tempo);
|
||||
lastTempoChangeBeat = t.beat;
|
||||
}
|
||||
|
||||
//passed all past tempo changes, now extrapolate from last tempo change until requested position
|
||||
counter += (beat - lastTempoChangeBeat) * secPerBeat;
|
||||
|
||||
// Debug.Log("GetSongPosFromBeat returning " + counter);
|
||||
return counter;
|
||||
}
|
||||
|
||||
//thank you @wooningcharithri#7419 for the psuedo-code
|
||||
private float BeatsToSecs(float beats, float bpm)
|
||||
private double BeatsToSecs(double beats, float bpm)
|
||||
{
|
||||
// Debug.Log("BeatsToSecs returning " + beats / bpm * 60);
|
||||
return beats / bpm * 60f;
|
||||
}
|
||||
private float SecsToBeats(float s, float bpm)
|
||||
private double SecsToBeats(double s, float bpm)
|
||||
{
|
||||
// Debug.Log("SecsToBeats returning " + s / 60f / bpm);
|
||||
return s / 60f * bpm;
|
||||
}
|
||||
|
||||
public float GetBeatFromSongPos(float seconds)
|
||||
public double GetBeatFromSongPos(double seconds)
|
||||
{
|
||||
// Debug.Log("Getting beat of seconds " + seconds);
|
||||
var chart = GameManager.instance.Beatmap;
|
||||
float lastTempoChangeBeat = 0f;
|
||||
float lastBpm = chart.bpm;
|
||||
float counterSeconds = -firstBeatOffset;
|
||||
double lastTempoChangeBeat = 0f;
|
||||
double counterSeconds = -firstBeatOffset;
|
||||
float lastBpm = GameManager.instance.Beatmap.bpm;
|
||||
|
||||
var tempoChanges = GetSortedTempoChanges(chart);
|
||||
foreach (var t in tempoChanges)
|
||||
foreach (var t in GameManager.instance.Beatmap.tempoChanges)
|
||||
{
|
||||
float beatToNext = t.beat - lastTempoChangeBeat;
|
||||
float secToNext = BeatsToSecs(beatToNext, lastBpm);
|
||||
float nextSecs = counterSeconds + secToNext;
|
||||
double beatToNext = t.beat - lastTempoChangeBeat;
|
||||
double secToNext = BeatsToSecs(beatToNext, lastBpm);
|
||||
double nextSecs = counterSeconds + secToNext;
|
||||
|
||||
// Debug.Log("nextSecs is " + nextSecs + ", seconds " + seconds);
|
||||
if (nextSecs >= seconds)
|
||||
break;
|
||||
|
||||
|
@ -330,9 +299,6 @@ namespace HeavenStudio
|
|||
lastBpm = t.tempo;
|
||||
counterSeconds = nextSecs;
|
||||
}
|
||||
|
||||
// Debug.Log("lastTempoChangeBeat is " + lastTempoChangeBeat + ", counterSeconds is " + counterSeconds);
|
||||
|
||||
return lastTempoChangeBeat + SecsToBeats(seconds - counterSeconds, lastBpm);
|
||||
}
|
||||
//
|
||||
|
@ -357,7 +323,7 @@ namespace HeavenStudio
|
|||
public float SongLengthInBeats()
|
||||
{
|
||||
if (!musicSource.clip) return 0;
|
||||
return GetBeatFromSongPos(musicSource.clip.length);
|
||||
return (float) GetBeatFromSongPos(musicSource.clip.length);
|
||||
}
|
||||
|
||||
public bool SongPosLessThanClipLength(float t)
|
||||
|
@ -368,6 +334,14 @@ namespace HeavenStudio
|
|||
return false;
|
||||
}
|
||||
|
||||
public bool SongPosLessThanClipLength(double t)
|
||||
{
|
||||
if (musicSource.clip != null)
|
||||
return t < musicSource.clip.length;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool NotStopped()
|
||||
{
|
||||
return Conductor.instance.isPlaying == true || Conductor.instance.isPaused == true;
|
||||
|
|
|
@ -21,6 +21,7 @@ namespace HeavenStudio
|
|||
[Header("Components")]
|
||||
public TextAsset txt;
|
||||
public Camera GameCamera, CursorCam, OverlayCamera;
|
||||
public GameObject GameLetterbox;
|
||||
public CircleCursor CircleCursor;
|
||||
[HideInInspector] public GameObject GamesHolder;
|
||||
public Games.Global.Flash fade;
|
||||
|
@ -237,7 +238,6 @@ namespace HeavenStudio
|
|||
if (Conductor.instance.songPositionInBeats >= tempoChanges[currentTempoEvent])
|
||||
{
|
||||
Conductor.instance.SetBpm(Beatmap.tempoChanges[currentTempoEvent].tempo);
|
||||
Conductor.instance.timeSinceLastTempoChange = Time.time;
|
||||
currentTempoEvent++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -189,6 +189,21 @@ namespace HeavenStudio.Games
|
|||
//coin.perfectOnly = true;
|
||||
}
|
||||
|
||||
public void TossCoin(float beat)
|
||||
{
|
||||
if (coin != null) return;
|
||||
|
||||
//Play sound and animations
|
||||
Jukebox.PlayOneShotGame("coinToss/throw");
|
||||
handAnimator.Play("Throw", 0, 0);
|
||||
//Game state says the hand is throwing the coin
|
||||
isThrowing = true;
|
||||
this.audienceReacting = false;
|
||||
|
||||
coin = ScheduleInput(beat, 6f, InputType.STANDARD_DOWN, CatchSuccess, CatchMiss, CatchEmpty);
|
||||
//coin.perfectOnly = true;
|
||||
}
|
||||
|
||||
public void CatchSuccess(PlayerActionEvent caller, float state)
|
||||
{
|
||||
Jukebox.PlayOneShotGame("coinToss/catch");
|
||||
|
|
|
@ -108,6 +108,7 @@ namespace HeavenStudio.Games.Scripts_FanClub
|
|||
{
|
||||
if (clappingStartTime != Single.MinValue && cond.songPositionInBeats > clappingStartTime + 2f && !stopCharge)
|
||||
{
|
||||
animator.speed = 1f;
|
||||
animator.Play("FanClapCharge", -1, 0);
|
||||
stopCharge = true;
|
||||
}
|
||||
|
@ -120,6 +121,7 @@ namespace HeavenStudio.Games.Scripts_FanClub
|
|||
}
|
||||
else
|
||||
{
|
||||
animator.speed = 1f;
|
||||
animator.Play("FanFree", -1, 0);
|
||||
stopBeat = false;
|
||||
clappingStartTime = Single.MinValue;
|
||||
|
@ -135,7 +137,7 @@ namespace HeavenStudio.Games.Scripts_FanClub
|
|||
float yWeight = -(yMul*yMul) + 1f;
|
||||
motionRoot.transform.localPosition = new Vector3(0, 3f * yWeight);
|
||||
shadow.transform.localScale = new Vector3((1f-yWeight*0.8f) * 1.4f, (1f-yWeight*0.8f) * 1.4f, 1f);
|
||||
animator.Play("FanJump", -1, 0);
|
||||
animator.DoScaledAnimation("FanJump", jumpStartTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -150,6 +152,7 @@ namespace HeavenStudio.Games.Scripts_FanClub
|
|||
stopBeat = false;
|
||||
}
|
||||
}
|
||||
animator.speed = 1f;
|
||||
hasJumped = false;
|
||||
}
|
||||
}
|
||||
|
@ -165,6 +168,7 @@ namespace HeavenStudio.Games.Scripts_FanClub
|
|||
hasJumped = false;
|
||||
stopBeat = true;
|
||||
jumpStartTime = -99f;
|
||||
animator.speed = 1f;
|
||||
animator.Play("FanClap", -1, 0);
|
||||
Jukebox.PlayOneShotGame("fanClub/play_clap");
|
||||
Jukebox.PlayOneShotGame("fanClub/crap_impact");
|
||||
|
@ -219,7 +223,10 @@ namespace HeavenStudio.Games.Scripts_FanClub
|
|||
public void Bop()
|
||||
{
|
||||
if (!stopBeat)
|
||||
{
|
||||
animator.speed = 1f;
|
||||
animator.Play("FanBeat");
|
||||
}
|
||||
}
|
||||
|
||||
public void ClapParticle()
|
||||
|
|
|
@ -945,6 +945,9 @@ namespace HeavenStudio.Games
|
|||
|
||||
void UpdateFilterColour(Color bgColor, Color filterColor)
|
||||
{
|
||||
bgGradientRenderer = BGGradient.GetComponent<SpriteRenderer>();
|
||||
bgBloodRenderer = BGBlood.GetComponent<SpriteRenderer>();
|
||||
bgRadialRenderer = BGRadial.GetComponent<SpriteRenderer>();
|
||||
Color col;
|
||||
if (textureFilterType == (int) ShadowType.Tinted)
|
||||
col = Color.LerpUnclamped(bgColor, ShadowBlendColor, 0.45f);
|
||||
|
|
|
@ -20,6 +20,7 @@ namespace HeavenStudio
|
|||
GameObject MainCamera = Cameras.transform.GetChild(0).gameObject;
|
||||
GameObject CursorCamera = Cameras.transform.GetChild(1).gameObject;
|
||||
GameObject OverlayCamera = Cameras.transform.GetChild(2).gameObject;
|
||||
GameObject GameLetterbox = Cameras.transform.GetChild(3).gameObject;
|
||||
|
||||
GameObject Cursor = Instantiate(Resources.Load<GameObject>("Prefabs/Cursor"));
|
||||
Cursor.name = "Cursor";
|
||||
|
@ -38,6 +39,7 @@ namespace HeavenStudio
|
|||
gameManager.GameCamera = MainCamera.GetComponent<Camera>();
|
||||
gameManager.CursorCam = CursorCamera.GetComponent<Camera>();
|
||||
gameManager.OverlayCamera = OverlayCamera.GetComponent<Camera>();
|
||||
gameManager.GameLetterbox = GameLetterbox;
|
||||
|
||||
GameObject Profiler = Instantiate(Resources.Load<GameObject>("Prefabs/GameProfiler"));
|
||||
Profiler.name = "GameProfiler";
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace HeavenStudio.Editor
|
|||
[SerializeField] public Camera EditorCamera;
|
||||
|
||||
// [SerializeField] public GameObject EditorLetterbox;
|
||||
[SerializeField] public GameObject GameLetterbox;
|
||||
public GameObject GameLetterbox;
|
||||
|
||||
[Header("Rect")]
|
||||
[SerializeField] private RenderTexture ScreenRenderTexture;
|
||||
|
@ -93,6 +93,7 @@ namespace HeavenStudio.Editor
|
|||
GameCamera.instance.camera.targetTexture = ScreenRenderTexture;
|
||||
GameManager.instance.CursorCam.targetTexture = ScreenRenderTexture;
|
||||
GameManager.instance.OverlayCamera.targetTexture = ScreenRenderTexture;
|
||||
GameLetterbox = GameManager.instance.GameLetterbox;
|
||||
Screen.texture = ScreenRenderTexture;
|
||||
|
||||
GameManager.instance.Init();
|
||||
|
|
|
@ -332,7 +332,7 @@ namespace HeavenStudio.Editor.Track
|
|||
if (!Conductor.instance.isPlaying && !Conductor.instance.isPaused)
|
||||
{
|
||||
SongBeat.text = $"Beat {string.Format("{0:0.000}", TimelineSlider.localPosition.x)}";
|
||||
SongPos.text = FormatTime(Conductor.instance.GetSongPosFromBeat(TimelineSlider.localPosition.x));
|
||||
SongPos.text = FormatTime((float) Conductor.instance.GetSongPosFromBeat(TimelineSlider.localPosition.x));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Binary file not shown.
|
@ -1,5 +1,5 @@
|
|||
ManifestFileVersion: 0
|
||||
CRC: 1516953164
|
||||
CRC: 2362860034
|
||||
AssetBundleManifest:
|
||||
AssetBundleInfos:
|
||||
Info_0:
|
||||
|
|
Binary file not shown.
|
@ -1,9 +1,9 @@
|
|||
ManifestFileVersion: 0
|
||||
CRC: 1091441775
|
||||
CRC: 1499416464
|
||||
Hashes:
|
||||
AssetFileHash:
|
||||
serializedVersion: 2
|
||||
Hash: f85b652eadac4ff300c579adfa67313b
|
||||
Hash: 7dbbb737179d1cc7db1edb0a31c7e1ab
|
||||
TypeTreeHash:
|
||||
serializedVersion: 2
|
||||
Hash: 2b92e6f111bbb24dabe3a2c56ea02b28
|
||||
|
|
Binary file not shown.
|
@ -1,9 +1,9 @@
|
|||
ManifestFileVersion: 0
|
||||
CRC: 3145129048
|
||||
CRC: 3719062968
|
||||
Hashes:
|
||||
AssetFileHash:
|
||||
serializedVersion: 2
|
||||
Hash: accf70966bae19a4dbcad02679a20b19
|
||||
Hash: eee37f302cb3e8cbe079bb5500cb45ed
|
||||
TypeTreeHash:
|
||||
serializedVersion: 2
|
||||
Hash: 1341d321cd8444a4f78a51a8a0c6daff
|
||||
|
|
Binary file not shown.
|
@ -1,9 +1,9 @@
|
|||
ManifestFileVersion: 0
|
||||
CRC: 2094393231
|
||||
CRC: 2386252366
|
||||
Hashes:
|
||||
AssetFileHash:
|
||||
serializedVersion: 2
|
||||
Hash: a425cbbebe1a8006a4fc4fe6127c84fa
|
||||
Hash: 6f57f7727dc4903488ea4956307caac1
|
||||
TypeTreeHash:
|
||||
serializedVersion: 2
|
||||
Hash: 6f0c5ebd30d7d3be8aad1c86837b5cc9
|
||||
|
|
Binary file not shown.
|
@ -1,9 +1,9 @@
|
|||
ManifestFileVersion: 0
|
||||
CRC: 3054716629
|
||||
CRC: 1695511499
|
||||
Hashes:
|
||||
AssetFileHash:
|
||||
serializedVersion: 2
|
||||
Hash: 7de7ed1ceb30a914c04951332a09f02e
|
||||
Hash: 24892cdb3bebaf86064204efdc197727
|
||||
TypeTreeHash:
|
||||
serializedVersion: 2
|
||||
Hash: 788d5843115df613774b9a4b273d2334
|
||||
|
|
|
@ -7,6 +7,7 @@ PhysicsManager:
|
|||
m_Gravity: {x: 0, y: -9.81, z: 0}
|
||||
m_DefaultMaterial: {fileID: 0}
|
||||
m_BounceThreshold: 2
|
||||
m_DefaultMaxDepenetrationVelocity: 10
|
||||
m_SleepThreshold: 0.005
|
||||
m_DefaultContactOffset: 0.01
|
||||
m_DefaultSolverIterations: 6
|
||||
|
@ -17,7 +18,7 @@ PhysicsManager:
|
|||
m_ClothInterCollisionDistance: 0.1
|
||||
m_ClothInterCollisionStiffness: 0.2
|
||||
m_ContactsGeneration: 1
|
||||
m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
m_LayerCollisionMatrix: ff8fffffff8fffffff8fffffff8fffffff8fffffff8fffffff8fffffff8fffffff8fffffff8fffffff8fffffff8fffff0080ffff0080ffff0080ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
m_AutoSimulation: 1
|
||||
m_AutoSyncTransforms: 0
|
||||
m_ReuseCollisionCallbacks: 1
|
||||
|
|
|
@ -46,7 +46,24 @@ GraphicsSettings:
|
|||
m_TransparencySortAxis: {x: 0, y: 0, z: 1}
|
||||
m_DefaultRenderingPath: 1
|
||||
m_DefaultMobileRenderingPath: 1
|
||||
m_TierSettings: []
|
||||
m_TierSettings:
|
||||
- serializedVersion: 5
|
||||
m_BuildTarget: 1
|
||||
m_Tier: 2
|
||||
m_Settings:
|
||||
standardShaderQuality: 2
|
||||
renderingPath: 1
|
||||
hdrMode: 1
|
||||
realtimeGICPUUsage: 50
|
||||
useReflectionProbeBoxProjection: 1
|
||||
useReflectionProbeBlending: 1
|
||||
useHDR: 0
|
||||
useDetailNormalMap: 1
|
||||
useCascadedShadowMaps: 1
|
||||
prefer32BitShadowMaps: 0
|
||||
enableLPPV: 1
|
||||
useDitherMaskForAlphaBlendedShadows: 1
|
||||
m_Automatic: 1
|
||||
m_LightmapStripping: 0
|
||||
m_FogStripping: 0
|
||||
m_InstancingStripping: 0
|
||||
|
|
|
@ -294,7 +294,7 @@ PlayerSettings:
|
|||
- m_BuildTarget: iOSSupport
|
||||
m_GraphicsJobs: 0
|
||||
- m_BuildTarget: WindowsStandaloneSupport
|
||||
m_GraphicsJobs: 0
|
||||
m_GraphicsJobs: 1
|
||||
- m_BuildTarget: XboxOnePlayer
|
||||
m_GraphicsJobs: 0
|
||||
- m_BuildTarget: LuminSupport
|
||||
|
@ -587,7 +587,8 @@ PlayerSettings:
|
|||
platformArchitecture: {}
|
||||
scriptingBackend: {}
|
||||
il2cppCompilerConfiguration: {}
|
||||
managedStrippingLevel: {}
|
||||
managedStrippingLevel:
|
||||
Standalone: 0
|
||||
incrementalIl2cppBuild: {}
|
||||
suppressCommonWarnings: 1
|
||||
allowUnsafeCode: 0
|
||||
|
|
|
@ -98,7 +98,7 @@ QualitySettings:
|
|||
softVegetation: 0
|
||||
realtimeReflectionProbes: 0
|
||||
billboardsFaceCameraPosition: 0
|
||||
vSyncCount: 1
|
||||
vSyncCount: 0
|
||||
lodBias: 0.7
|
||||
maximumLODLevel: 0
|
||||
streamingMipmapsActive: 0
|
||||
|
@ -134,7 +134,7 @@ QualitySettings:
|
|||
softVegetation: 1
|
||||
realtimeReflectionProbes: 1
|
||||
billboardsFaceCameraPosition: 1
|
||||
vSyncCount: 1
|
||||
vSyncCount: 0
|
||||
lodBias: 1
|
||||
maximumLODLevel: 0
|
||||
streamingMipmapsActive: 0
|
||||
|
@ -170,7 +170,7 @@ QualitySettings:
|
|||
softVegetation: 1
|
||||
realtimeReflectionProbes: 1
|
||||
billboardsFaceCameraPosition: 1
|
||||
vSyncCount: 1
|
||||
vSyncCount: 0
|
||||
lodBias: 1.5
|
||||
maximumLODLevel: 0
|
||||
streamingMipmapsActive: 0
|
||||
|
@ -196,7 +196,7 @@ QualitySettings:
|
|||
shadowDistance: 150
|
||||
shadowNearPlaneOffset: 3
|
||||
shadowCascade2Split: 0.33333334
|
||||
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
|
||||
shadowCascade4Split: {x: 0.06666667, y: 0.19999999, z: 0.45785606}
|
||||
shadowmaskMode: 1
|
||||
skinWeights: 255
|
||||
textureQuality: 0
|
||||
|
@ -206,7 +206,7 @@ QualitySettings:
|
|||
softVegetation: 1
|
||||
realtimeReflectionProbes: 1
|
||||
billboardsFaceCameraPosition: 1
|
||||
vSyncCount: 1
|
||||
vSyncCount: 0
|
||||
lodBias: 2
|
||||
maximumLODLevel: 0
|
||||
streamingMipmapsActive: 0
|
||||
|
|
Loading…
Reference in a new issue