Skip to content

Commit

Permalink
Change appearance
Browse files Browse the repository at this point in the history
  • Loading branch information
JLChnToZ committed Oct 9, 2016
1 parent 3dd9a61 commit e0e721c
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 58 deletions.
62 changes: 32 additions & 30 deletions Assets/Scenes/ClassicGameScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ RectTransform:
m_Children:
- {fileID: 1956387429}
- {fileID: 156314638}
- {fileID: 1305263416}
- {fileID: 184944853}
- {fileID: 1663607441}
- {fileID: 1671102499}
Expand Down Expand Up @@ -665,15 +666,14 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 1305263416}
m_Children: []
m_Father: {fileID: 92738949}
m_RootOrder: 2
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 20}
m_RootOrder: 3
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 20, y: -45}
m_SizeDelta: {x: 100, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
m_Pivot: {x: 0, y: 1}
--- !u!114 &184944854
MonoBehaviour:
m_ObjectHideFlags: 0
Expand All @@ -700,7 +700,7 @@ MonoBehaviour:
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 60
m_Alignment: 4
m_Alignment: 0
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
Expand Down Expand Up @@ -1190,7 +1190,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 92738949}
m_RootOrder: 5
m_RootOrder: 6
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
Expand Down Expand Up @@ -1638,9 +1638,10 @@ MonoBehaviour:
spawnerId: 1
clampRangeStart: -1.6
clampRangeEnd: 1.6
startDistance: 30
startDistance: 60
targetDistance: 0.1
offset: 0.8
startOffset: -0.8
maxNoteDistance: 0.25
centroid: {x: 0, y: 0, z: 0}
scoreDisplayPack: {fileID: 11400000, guid: 3f88466b5221e754baf9e743bf54c732, type: 2}
Expand Down Expand Up @@ -1693,7 +1694,7 @@ RectTransform:
- {fileID: 205253431}
- {fileID: 462639664}
m_Father: {fileID: 92738949}
m_RootOrder: 10
m_RootOrder: 11
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
Expand Down Expand Up @@ -1840,7 +1841,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 92738949}
m_RootOrder: 7
m_RootOrder: 8
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: 0, y: 10}
Expand Down Expand Up @@ -3100,7 +3101,7 @@ RectTransform:
m_Children:
- {fileID: 1158903701}
m_Father: {fileID: 92738949}
m_RootOrder: 9
m_RootOrder: 10
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
Expand Down Expand Up @@ -3192,9 +3193,10 @@ MonoBehaviour:
spawnerId: 0
clampRangeStart: -1.6
clampRangeEnd: 1.6
startDistance: 30
startDistance: 60
targetDistance: 0.1
offset: -0.8
startOffset: -0.8
maxNoteDistance: 0.25
centroid: {x: 0, y: 0, z: 0}
scoreDisplayPack: {fileID: 11400000, guid: 3f88466b5221e754baf9e743bf54c732, type: 2}
Expand Down Expand Up @@ -3639,8 +3641,8 @@ RectTransform:
m_RootOrder: 0
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: -5}
m_SizeDelta: {x: 0, y: -10}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1140749596
MonoBehaviour:
Expand Down Expand Up @@ -3888,10 +3890,10 @@ Transform:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1258345985}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -6.25}
m_LocalRotation: {x: 0.043619405, y: 0, z: 0, w: 0.9990483}
m_LocalPosition: {x: 0, y: 0.55, z: -6.25}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 5, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1050942001}
m_RootOrder: 0
Expand Down Expand Up @@ -4098,12 +4100,12 @@ RectTransform:
m_Children:
- {fileID: 1546044196}
- {fileID: 1561228372}
m_Father: {fileID: 184944853}
m_RootOrder: 0
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 10}
m_Father: {fileID: 92738949}
m_RootOrder: 2
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: -50, y: -130}
m_SizeDelta: {x: 100, y: 10}
m_Pivot: {x: 0, y: 1}
--- !u!1 &1318587001
GameObject:
Expand Down Expand Up @@ -4566,7 +4568,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 92738949}
m_RootOrder: 8
m_RootOrder: 9
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
Expand Down Expand Up @@ -4652,7 +4654,7 @@ RectTransform:
- {fileID: 2073731827}
- {fileID: 1922579743}
m_Father: {fileID: 92738949}
m_RootOrder: 11
m_RootOrder: 12
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
Expand Down Expand Up @@ -4757,7 +4759,7 @@ RectTransform:
m_Children:
- {fileID: 106329898}
m_Father: {fileID: 92738949}
m_RootOrder: 6
m_RootOrder: 7
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: 0, y: 10}
Expand Down Expand Up @@ -5163,7 +5165,7 @@ RectTransform:
m_Children:
- {fileID: 1791410178}
m_Father: {fileID: 92738949}
m_RootOrder: 3
m_RootOrder: 4
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
Expand Down Expand Up @@ -5303,7 +5305,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 92738949}
m_RootOrder: 4
m_RootOrder: 5
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
Expand Down
52 changes: 26 additions & 26 deletions Assets/Scenes/GameScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ RectTransform:
m_Children:
- {fileID: 1956387429}
- {fileID: 156314638}
- {fileID: 1867011416}
- {fileID: 184944853}
- {fileID: 1663607441}
- {fileID: 1671102499}
Expand Down Expand Up @@ -686,15 +687,14 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 1867011416}
m_Children: []
m_Father: {fileID: 92738949}
m_RootOrder: 2
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 20}
m_RootOrder: 3
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 20, y: -45}
m_SizeDelta: {x: 100, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
m_Pivot: {x: 0, y: 1}
--- !u!114 &184944854
MonoBehaviour:
m_ObjectHideFlags: 0
Expand All @@ -721,7 +721,7 @@ MonoBehaviour:
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 60
m_Alignment: 4
m_Alignment: 0
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
Expand Down Expand Up @@ -1142,7 +1142,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 92738949}
m_RootOrder: 5
m_RootOrder: 6
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
Expand Down Expand Up @@ -1522,7 +1522,7 @@ MonoBehaviour:
spawnerId: 1
clampRangeStart: 70
clampRangeEnd: 110
startDistance: 30
startDistance: 60
targetDistance: 0.1
offset: 1.9
maxNoteDistance: 360
Expand Down Expand Up @@ -1577,7 +1577,7 @@ RectTransform:
- {fileID: 205253431}
- {fileID: 462639664}
m_Father: {fileID: 92738949}
m_RootOrder: 10
m_RootOrder: 11
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
Expand Down Expand Up @@ -1724,7 +1724,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 92738949}
m_RootOrder: 7
m_RootOrder: 8
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: 0, y: 10}
Expand Down Expand Up @@ -2984,7 +2984,7 @@ RectTransform:
m_Children:
- {fileID: 1158903701}
m_Father: {fileID: 92738949}
m_RootOrder: 9
m_RootOrder: 10
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
Expand Down Expand Up @@ -3076,7 +3076,7 @@ MonoBehaviour:
spawnerId: 0
clampRangeStart: 210
clampRangeEnd: 330
startDistance: 30
startDistance: 60
targetDistance: 0.1
offset: 1.9
maxNoteDistance: 15
Expand Down Expand Up @@ -3831,7 +3831,7 @@ Camera:
width: 1
height: 1
near clip plane: 0.3
far clip plane: 50
far clip plane: 100
field of view: 20
orthographic: 0
orthographic size: 1.1
Expand Down Expand Up @@ -4518,7 +4518,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 92738949}
m_RootOrder: 8
m_RootOrder: 9
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
Expand Down Expand Up @@ -4604,7 +4604,7 @@ RectTransform:
- {fileID: 2073731827}
- {fileID: 1922579743}
m_Father: {fileID: 92738949}
m_RootOrder: 11
m_RootOrder: 12
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
Expand Down Expand Up @@ -4709,7 +4709,7 @@ RectTransform:
m_Children:
- {fileID: 1203970544}
m_Father: {fileID: 92738949}
m_RootOrder: 6
m_RootOrder: 7
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: 0, y: 10}
Expand Down Expand Up @@ -5115,7 +5115,7 @@ RectTransform:
m_Children:
- {fileID: 1791410178}
m_Father: {fileID: 92738949}
m_RootOrder: 3
m_RootOrder: 4
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
Expand Down Expand Up @@ -5166,7 +5166,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 92738949}
m_RootOrder: 4
m_RootOrder: 5
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
Expand Down Expand Up @@ -5527,12 +5527,12 @@ RectTransform:
m_Children:
- {fileID: 1524913367}
- {fileID: 1558397903}
m_Father: {fileID: 184944853}
m_RootOrder: 0
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 10}
m_Father: {fileID: 92738949}
m_RootOrder: 2
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -50, y: -5}
m_SizeDelta: {x: 100, y: 10}
m_Pivot: {x: 0, y: 1}
--- !u!1 &1922579742
GameObject:
Expand Down
4 changes: 3 additions & 1 deletion Assets/Scripts/Handlers/ClassicNoteHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ public class ClassicNoteHandler: NoteHandler {
public float clampRangeStart, clampRangeEnd;
[NonSerialized]
public float startDistance, targetDistance, offset;
[NonSerialized]
public float startOffset;

float delta1 = 0, delta2 = 0;

Expand Down Expand Up @@ -129,7 +131,7 @@ public class ClassicNoteHandler: NoteHandler {
} else if(overTime) {
handler.transform.localPosition = Vector3.up * offset + Vector3.back * (targetDistance + Mathf.Abs(targetDistance - startDistance) * Mathf.Pow(delta, 0.5F) / 16);
} else {
handler.transform.localPosition = Vector3.up * offset + Vector3.forward * Mathf.Lerp(startDistance, targetDistance, 1 - delta);
handler.transform.localPosition = Vector3.up * Mathf.Lerp(startOffset, offset, 1 - delta) + Vector3.forward * Mathf.Lerp(startDistance, targetDistance, 1 - delta);
}
}

Expand Down
2 changes: 2 additions & 0 deletions Assets/Scripts/Handlers/NoteSpawnerClassic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public class NoteSpawnerClassic: NoteSpawner {

public float clampRangeStart = -1, clampRangeEnd = 1;
public float startDistance = 0F, targetDistance = 1F, offset;
public float startOffset;
public float maxNoteDistance = 360F;
public Vector3 centroid;
public ScoreDisplayPack scoreDisplayPack;
Expand All @@ -36,6 +37,7 @@ public class NoteSpawnerClassic: NoteSpawner {
noteHandler.clampRangeEnd = clampRangeEnd;
noteHandler.startDistance = startDistance;
noteHandler.targetDistance = targetDistance;
noteHandler.startOffset = startOffset;
noteHandler.offset = offset;
noteHandler.scoreDisplayPack = scoreDisplayPack;
return noteHandler;
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/Loader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class Loader : SingletonBehaviour<Loader> {
bmsManager.DetuneEnabled = enableDetune;
bmsManager.BGAEnabled = enableBGA;
bmsManager.DynamicPreEventOffset = dynamicSpeed;
bmsManager.PreEventOffset = TimeSpan.FromSeconds(2 - speed);
bmsManager.PreEventOffset = TimeSpan.FromSeconds((2 - speed) * 2);
bmsManager.LoadBMS(bmsContent, fileInfo.Directory.FullName, fileInfo.Extension);
while(!bmsManager.BMSLoaded) yield return null;

Expand Down

0 comments on commit e0e721c

Please sign in to comment.