diff --git a/Assets/Plugins/Starpelly/Colors.cs b/Assets/Plugins/Starpelly/Colors.cs
index 761b7bd2..248a22ec 100644
--- a/Assets/Plugins/Starpelly/Colors.cs
+++ b/Assets/Plugins/Starpelly/Colors.cs
@@ -2,9 +2,9 @@ using UnityEngine;
namespace Starpelly
{
- public class Colors
+ public static class Colors
{
- public static string Color2Hex(Color32 color)
+ public static string Color2Hex(this Color32 color)
{
string hex = color.r.ToString("X2") + color.g.ToString("X2") + color.b.ToString("X2");
return hex;
@@ -13,7 +13,7 @@ namespace Starpelly
///
/// Converts a Hexadecimal Color to an RGB Color.
///
- public static Color Hex2RGB(string hex)
+ public static Color Hex2RGB(this string hex)
{
try
{
diff --git a/Assets/Scenes/Editor.unity b/Assets/Scenes/Editor.unity
index 1f7770c3..2d2416cf 100644
--- a/Assets/Scenes/Editor.unity
+++ b/Assets/Scenes/Editor.unity
@@ -648,6 +648,81 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 258006091}
m_CullTransparentMesh: 1
+--- !u!1 &308927844
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 308927845}
+ - component: {fileID: 308927847}
+ - component: {fileID: 308927846}
+ m_Layer: 5
+ m_Name: Image (1)
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &308927845
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 308927844}
+ 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: 1671351975}
+ m_RootOrder: 1
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 0, y: 0}
+ m_AnchoredPosition: {x: 0, y: 0}
+ m_SizeDelta: {x: 224, y: 51.3415}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!114 &308927846
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 308927844}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Material: {fileID: 0}
+ m_Color: {r: 0.13207549, g: 0.13207549, b: 0.13207549, a: 1}
+ m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_Sprite: {fileID: 0}
+ m_Type: 0
+ m_PreserveAspect: 0
+ m_FillCenter: 1
+ m_FillMethod: 4
+ m_FillAmount: 1
+ m_FillClockwise: 1
+ m_FillOrigin: 0
+ m_UseSpriteMesh: 0
+ m_PixelsPerUnitMultiplier: 1
+--- !u!222 &308927847
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 308927844}
+ m_CullTransparentMesh: 1
--- !u!1 &355353077
GameObject:
m_ObjectHideFlags: 0
@@ -1828,6 +1903,81 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: -20, y: -20}
m_Pivot: {x: 0.5, y: 0.5}
+--- !u!1 &618060599
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 618060600}
+ - component: {fileID: 618060602}
+ - component: {fileID: 618060601}
+ m_Layer: 5
+ m_Name: Image (3)
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &618060600
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 618060599}
+ 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: 1671351975}
+ m_RootOrder: 3
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 0, y: 0}
+ m_AnchoredPosition: {x: 0, y: 0}
+ m_SizeDelta: {x: 224, y: 51.3415}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!114 &618060601
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 618060599}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Material: {fileID: 0}
+ m_Color: {r: 0.13207549, g: 0.13207549, b: 0.13207549, a: 1}
+ m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_Sprite: {fileID: 0}
+ m_Type: 0
+ m_PreserveAspect: 0
+ m_FillCenter: 1
+ m_FillMethod: 4
+ m_FillAmount: 1
+ m_FillClockwise: 1
+ m_FillOrigin: 0
+ m_UseSpriteMesh: 0
+ m_PixelsPerUnitMultiplier: 1
+--- !u!222 &618060602
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 618060599}
+ m_CullTransparentMesh: 1
--- !u!1 &660967736
GameObject:
m_ObjectHideFlags: 0
@@ -2425,8 +2575,6 @@ MonoBehaviour:
selected: 0
mouseHovering: 0
NormalCol: {r: 0.8470589, g: 0.8470589, b: 1, a: 1}
- SelectedCol: {r: 0.8470589, g: 1, b: 1, a: 1}
- DeleteCol: {r: 0.89019614, g: 0.7254902, b: 0.7254902, a: 1}
--- !u!222 &798021451
CanvasRenderer:
m_ObjectHideFlags: 0
@@ -3231,6 +3379,81 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Padding: {x: 0, y: 0, z: 0, w: 0}
m_Softness: {x: 0, y: 0}
+--- !u!1 &1073072586
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 1073072587}
+ - component: {fileID: 1073072589}
+ - component: {fileID: 1073072588}
+ m_Layer: 5
+ m_Name: Image (2)
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &1073072587
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1073072586}
+ 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: 1671351975}
+ m_RootOrder: 2
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 0, y: 0}
+ m_AnchoredPosition: {x: 0, y: 0}
+ m_SizeDelta: {x: 224, y: 51.3415}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!114 &1073072588
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1073072586}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Material: {fileID: 0}
+ m_Color: {r: 0.13207549, g: 0.13207549, b: 0.13207549, a: 1}
+ m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_Sprite: {fileID: 0}
+ m_Type: 0
+ m_PreserveAspect: 0
+ m_FillCenter: 1
+ m_FillMethod: 4
+ m_FillAmount: 1
+ m_FillClockwise: 1
+ m_FillOrigin: 0
+ m_UseSpriteMesh: 0
+ m_PixelsPerUnitMultiplier: 1
+--- !u!222 &1073072589
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1073072586}
+ m_CullTransparentMesh: 1
--- !u!1 &1110073994
GameObject:
m_ObjectHideFlags: 0
@@ -3757,6 +3980,7 @@ GameObject:
- component: {fileID: 1423699436}
- component: {fileID: 1423699438}
- component: {fileID: 1423699437}
+ - component: {fileID: 1423699442}
- component: {fileID: 1423699439}
- component: {fileID: 1423699440}
- component: {fileID: 1423699441}
@@ -3811,8 +4035,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: f86858990a87c764892672104bdaef1f, type: 3}
m_Name:
m_EditorClassIdentifier:
- level: {fileID: 4900000, guid: df453afcce54d5c4e9105c6829ed8f30, type: 3}
- music: {fileID: 8300000, guid: 5fc457d2d31969c44a6734ce4e684ff8, type: 3}
+ level: {fileID: 4900000, guid: ac276edd56ab99249a2a413e6ac2783d, type: 3}
+ music: {fileID: 8300000, guid: d6aa7955da64b284589e923dc18c67fb, type: 3}
debugUI: 0
playOnStart: 0
editor: 1
@@ -3855,6 +4079,24 @@ MonoBehaviour:
m_EditorClassIdentifier:
boxVisual: {fileID: 411779174}
selecting: 0
+--- !u!114 &1423699442
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1423699435}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: c6b7fb8acdd40984c8ae195548f05680, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ ThemeTXT: {fileID: 4900000, guid: 2764bae4979406541a0596e739f420fd, type: 3}
+ Layers:
+ - {fileID: 1906769994}
+ - {fileID: 308927846}
+ - {fileID: 1073072588}
+ - {fileID: 618060601}
--- !u!1 &1527251879
GameObject:
m_ObjectHideFlags: 0
@@ -4383,6 +4625,7 @@ GameObject:
- component: {fileID: 1671351977}
- component: {fileID: 1671351976}
- component: {fileID: 1671351978}
+ - component: {fileID: 1671351979}
m_Layer: 5
m_Name: Layers
m_TagString: Untagged
@@ -4400,14 +4643,18 @@ RectTransform:
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_Children:
+ - {fileID: 1906769993}
+ - {fileID: 308927845}
+ - {fileID: 1073072587}
+ - {fileID: 618060600}
m_Father: {fileID: 1861169746}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
- m_AnchoredPosition: {x: -528, y: -15.808}
- m_SizeDelta: {x: 224, y: 239.36}
+ m_AnchoredPosition: {x: -528, y: -32.802}
+ m_SizeDelta: {x: 224, y: 205.366}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1671351976
MonoBehaviour:
@@ -4462,6 +4709,32 @@ MonoBehaviour:
m_EffectColor: {r: 1, g: 1, b: 1, a: 1}
m_EffectDistance: {x: 2, y: -2}
m_UseGraphicAlpha: 1
+--- !u!114 &1671351979
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1671351974}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Padding:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_ChildAlignment: 0
+ m_Spacing: 0
+ m_ChildForceExpandWidth: 1
+ m_ChildForceExpandHeight: 0
+ m_ChildControlWidth: 0
+ m_ChildControlHeight: 0
+ m_ChildScaleWidth: 0
+ m_ChildScaleHeight: 0
+ m_ReverseArrangement: 0
--- !u!1 &1671868845
GameObject:
m_ObjectHideFlags: 0
@@ -4922,6 +5195,81 @@ MonoBehaviour:
TimelineContent: {fileID: 1852819573}
TimelineSongPosLineRef: {fileID: 580861938}
TimelineEventObjRef: {fileID: 798021449}
+--- !u!1 &1906769992
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 1906769993}
+ - component: {fileID: 1906769995}
+ - component: {fileID: 1906769994}
+ m_Layer: 5
+ m_Name: Image
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &1906769993
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1906769992}
+ 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: 1671351975}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 0, y: 0}
+ m_AnchoredPosition: {x: 0, y: 0}
+ m_SizeDelta: {x: 224, y: 51.3415}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!114 &1906769994
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1906769992}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Material: {fileID: 0}
+ m_Color: {r: 0.13207549, g: 0.13207549, b: 0.13207549, a: 1}
+ m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_Sprite: {fileID: 0}
+ m_Type: 0
+ m_PreserveAspect: 0
+ m_FillCenter: 1
+ m_FillMethod: 4
+ m_FillAmount: 1
+ m_FillClockwise: 1
+ m_FillOrigin: 0
+ m_UseSpriteMesh: 0
+ m_PixelsPerUnitMultiplier: 1
+--- !u!222 &1906769995
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1906769992}
+ m_CullTransparentMesh: 1
--- !u!1 &1921041734
GameObject:
m_ObjectHideFlags: 0
diff --git a/Assets/Scripts/Conductor.cs b/Assets/Scripts/Conductor.cs
index 28e3fbfd..3d1c76ec 100644
--- a/Assets/Scripts/Conductor.cs
+++ b/Assets/Scripts/Conductor.cs
@@ -80,7 +80,7 @@ namespace RhythmHeavenMania
musicSource.PlayScheduled(Time.time);
}
- GameManager.instance.SetCurrentEventToClosest(songPositionInBeats);
+ // GameManager.instance.SetCurrentEventToClosest(songPositionInBeats);
}
public void Pause()
diff --git a/Assets/Scripts/GameManager.cs b/Assets/Scripts/GameManager.cs
index 3104f15f..ac0cf277 100644
--- a/Assets/Scripts/GameManager.cs
+++ b/Assets/Scripts/GameManager.cs
@@ -141,8 +141,12 @@ namespace RhythmHeavenMania
private IEnumerator PlayCo(float beat)
{
yield return null;
+ bool paused = Conductor.instance.isPaused;
Conductor.instance.Play(beat);
- SetCurrentEventToClosest(beat);
+ if (!paused)
+ {
+ SetCurrentEventToClosest(beat);
+ }
}
public void Pause()
diff --git a/Assets/Scripts/Games/KarateMan/KarateJoe.cs b/Assets/Scripts/Games/KarateMan/KarateJoe.cs
index b328482a..aa1cad9d 100644
--- a/Assets/Scripts/Games/KarateMan/KarateJoe.cs
+++ b/Assets/Scripts/Games/KarateMan/KarateJoe.cs
@@ -70,6 +70,8 @@ namespace RhythmHeavenMania.Games.KarateMan
private void Swing()
{
+ // you cant hit two pots at a time like this so i should fix this before a public build is eventually made.
+
var EligibleHits = KarateMan.instance.EligibleHits;
bool canHit = (EligibleHits.Count > 0) && (currentHitInList < EligibleHits.Count);
diff --git a/Assets/Scripts/Games/Spaceball/SpaceballBall.cs b/Assets/Scripts/Games/Spaceball/SpaceballBall.cs
index cc5fd5c1..f1463a5d 100644
--- a/Assets/Scripts/Games/Spaceball/SpaceballBall.cs
+++ b/Assets/Scripts/Games/Spaceball/SpaceballBall.cs
@@ -4,6 +4,8 @@ using UnityEngine;
using RhythmHeavenMania.Util;
+using DG.Tweening;
+
namespace RhythmHeavenMania.Games.Spaceball
{
public class SpaceballBall : MonoBehaviour
@@ -83,6 +85,34 @@ namespace RhythmHeavenMania.Games.Spaceball
Instantiate(Spaceball.instance.Dust, Spaceball.instance.Dust.transform.parent).SetActive(true);
Destroy(this.gameObject);
}
+
+ if (PlayerInput.Pressed())
+ {
+ if (e.perfect)
+ {
+ Jukebox.PlayOneShotGame("spaceball/hit");
+ Holder.transform.DOLocalMove(new Vector3(Random.Range(5, 18), 0, -600), 4f).SetEase(Ease.Linear);
+ Holder.transform.GetChild(0).gameObject.AddComponent().rotateSpeed = -245;
+
+ this.enabled = false;
+ gameObject.GetComponent().enabled = false;
+ }
+ else if (e.late || e.early)
+ {
+ Holder.transform.GetChild(0).gameObject.AddComponent().rotateSpeed = -55;
+
+ this.enabled = false;
+ gameObject.GetComponent().enabled = false;
+
+ Rigidbody2D rb = gameObject.AddComponent();
+ rb.bodyType = RigidbodyType2D.Dynamic;
+ rb.AddForce(transform.up * 1100);
+ rb.AddForce(transform.right * 400);
+ rb.gravityScale = 9;
+
+ Jukebox.PlayOneShot("miss");
+ }
+ }
}
public void MakeEligible(bool early, bool perfect, bool late)
diff --git a/Assets/Scripts/Games/Spaceball/SpaceballPlayer.cs b/Assets/Scripts/Games/Spaceball/SpaceballPlayer.cs
index 9793c11c..9cc2d5aa 100644
--- a/Assets/Scripts/Games/Spaceball/SpaceballPlayer.cs
+++ b/Assets/Scripts/Games/Spaceball/SpaceballPlayer.cs
@@ -58,37 +58,7 @@ namespace RhythmHeavenMania.Games.Spaceball
{
bool canHit = (EligibleHits.Count > 0) && (currentHitInList < EligibleHits.Count);
- if (canHit)
- {
- if (EligibleHits[currentHitInList].perfect)
- {
- Jukebox.PlayOneShotGame("spaceball/hit");
- EligibleHits[currentHitInList].gameObject.GetComponent().Holder.transform.DOLocalMove(new Vector3(Random.Range(5, 18), 0, -600), 4f).SetEase(Ease.Linear);
- EligibleHits[currentHitInList].gameObject.GetComponent().Holder.transform.GetChild(0).gameObject.AddComponent().rotateSpeed = -245;
-
- EligibleHits[currentHitInList].gameObject.GetComponent().enabled = false;
- EligibleHits[currentHitInList].gameObject.GetComponent().enabled = false;
-
- }
- else
- {
- EligibleHits[currentHitInList].gameObject.GetComponent().Holder.transform.GetChild(0).gameObject.AddComponent().rotateSpeed = -55;
-
- EligibleHits[currentHitInList].gameObject.GetComponent().enabled = false;
- EligibleHits[currentHitInList].gameObject.GetComponent().enabled = false;
-
- Rigidbody2D rb = EligibleHits[currentHitInList].gameObject.AddComponent();
- rb.bodyType = RigidbodyType2D.Dynamic;
- rb.AddForce(transform.up * 1100);
- rb.AddForce(transform.right * 400);
- rb.gravityScale = 9;
-
- Jukebox.PlayOneShot("miss");
- }
- RemoveBall();
- }
- else
- Jukebox.PlayOneShotGame("spaceball/swing");
+ Jukebox.PlayOneShotGame("spaceball/swing");
anim.Play("Swing", 0, 0);
}
@@ -97,14 +67,5 @@ namespace RhythmHeavenMania.Games.Spaceball
{
PlayerSprite.sprite = PlayerSpriteSheets[costume].sprites[id];
}
-
- private void RemoveBall()
- {
- if (currentHitInList < EligibleHits.Count)
- {
- EligibleHits.Remove(EligibleHits[currentHitInList]);
- currentHitInList++;
- }
- }
}
}
\ No newline at end of file
diff --git a/Assets/Scripts/LevelEditor/BoxSelection.cs b/Assets/Scripts/LevelEditor/BoxSelection.cs
index 393fdad4..95c1ea87 100644
--- a/Assets/Scripts/LevelEditor/BoxSelection.cs
+++ b/Assets/Scripts/LevelEditor/BoxSelection.cs
@@ -1,6 +1,9 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
+using UnityEngine.UI;
+
+using Starpelly;
namespace RhythmHeavenMania.Editor
{
@@ -24,6 +27,9 @@ namespace RhythmHeavenMania.Editor
private void Start()
{
DrawVisual();
+
+ Color boxCol = EditorTheme.theme.properties.BoxSelectionCol.Hex2RGB();
+ boxVisual.GetComponent().color = new Color(boxCol.r, boxCol.g, boxCol.b, 0.3f);
}
private void Update()
diff --git a/Assets/Scripts/LevelEditor/Editor.cs b/Assets/Scripts/LevelEditor/Editor.cs
index aa341dee..ce6b9bc1 100644
--- a/Assets/Scripts/LevelEditor/Editor.cs
+++ b/Assets/Scripts/LevelEditor/Editor.cs
@@ -4,6 +4,8 @@ using UnityEngine;
using UnityEngine.UI;
+using Newtonsoft.Json;
+
namespace RhythmHeavenMania.Editor
{
public class Editor : MonoBehaviour
diff --git a/Assets/Scripts/LevelEditor/EditorTheme.cs b/Assets/Scripts/LevelEditor/EditorTheme.cs
new file mode 100644
index 00000000..c50f6fbf
--- /dev/null
+++ b/Assets/Scripts/LevelEditor/EditorTheme.cs
@@ -0,0 +1,33 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+
+using Newtonsoft.Json;
+
+namespace RhythmHeavenMania.Editor
+{
+ public class EditorTheme : MonoBehaviour
+ {
+ public TextAsset ThemeTXT;
+ public static Theme theme;
+
+ [Header("Components")]
+ [SerializeField] private Image[] Layers;
+
+ private void Awake()
+ {
+ theme = JsonConvert.DeserializeObject(ThemeTXT.text);
+ }
+
+ private void Start()
+ {
+
+ Layers[0].color = Starpelly.Colors.Hex2RGB(theme.properties.Layer1Col);
+ Layers[1].color = Starpelly.Colors.Hex2RGB(theme.properties.Layer2Col);
+ Layers[2].color = Starpelly.Colors.Hex2RGB(theme.properties.Layer3Col);
+ Layers[3].color = Starpelly.Colors.Hex2RGB(theme.properties.Layer4Col);
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/Assets/Scripts/LevelEditor/EditorTheme.cs.meta b/Assets/Scripts/LevelEditor/EditorTheme.cs.meta
new file mode 100644
index 00000000..2c3df728
--- /dev/null
+++ b/Assets/Scripts/LevelEditor/EditorTheme.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c6b7fb8acdd40984c8ae195548f05680
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/LevelEditor/GridGameSelector.cs b/Assets/Scripts/LevelEditor/GridGameSelector.cs
index 7872f565..63f4d6ac 100644
--- a/Assets/Scripts/LevelEditor/GridGameSelector.cs
+++ b/Assets/Scripts/LevelEditor/GridGameSelector.cs
@@ -1,9 +1,11 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
+using UnityEngine.UI;
using TMPro;
using DG.Tweening;
+using Starpelly;
namespace RhythmHeavenMania.Editor
{
@@ -114,10 +116,11 @@ namespace RhythmHeavenMania.Editor
{
for (int i = 0; i < EventRef.transform.parent.childCount; i++)
{
- EventRef.transform.parent.GetChild(i).GetComponent().color = Color.white;
+ EventRef.transform.parent.GetChild(i).GetComponent().color = EditorTheme.theme.properties.EventNormalCol.Hex2RGB();
}
- EventRef.transform.parent.GetChild(ind + 1).GetComponent().color = Color.cyan;
+ EventRef.transform.parent.GetChild(ind + 1).GetComponent().color = EditorTheme.theme.properties.EventSelectedCol.Hex2RGB();
+ CurrentSelected.GetComponent().color = EditorTheme.theme.properties.EventSelectedCol.Hex2RGB();
}
private void DestroyEvents()
diff --git a/Assets/Scripts/LevelEditor/Theme.cs b/Assets/Scripts/LevelEditor/Theme.cs
new file mode 100644
index 00000000..f1055fdc
--- /dev/null
+++ b/Assets/Scripts/LevelEditor/Theme.cs
@@ -0,0 +1,29 @@
+using System;
+using UnityEngine;
+
+namespace RhythmHeavenMania.Editor
+{
+ [Serializable]
+ public class Theme
+ {
+ public string name;
+ public Properties properties;
+
+ [Serializable]
+ public class Properties
+ {
+ public string Layer1Col;
+ public string Layer2Col;
+ public string Layer3Col;
+ public string Layer4Col;
+
+ public string EventSelectedCol;
+ public string EventNormalCol;
+
+ public string BeatMarkerCol;
+ public string CurrentTimeMarkerCol;
+
+ public string BoxSelectionCol;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Assets/Scripts/LevelEditor/Theme.cs.meta b/Assets/Scripts/LevelEditor/Theme.cs.meta
new file mode 100644
index 00000000..7843f5ff
--- /dev/null
+++ b/Assets/Scripts/LevelEditor/Theme.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 80e5467f2435b6b4089b73747ac8fc71
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/LevelEditor/Timeline.cs b/Assets/Scripts/LevelEditor/Timeline.cs
index 64b694f7..270f94f4 100644
--- a/Assets/Scripts/LevelEditor/Timeline.cs
+++ b/Assets/Scripts/LevelEditor/Timeline.cs
@@ -43,6 +43,12 @@ namespace RhythmHeavenMania.Editor
AddEventObject(e.datamodel, false, new Vector3(e.beat, Mathp.Round2Nearest(Random.Range(0, -205.36f), 51.34f)), i);
}
+
+ TimelineSlider.GetChild(0).GetComponent().color = EditorTheme.theme.properties.BeatMarkerCol.Hex2RGB();
+ TimelineSlider.GetChild(1).GetComponent().color = EditorTheme.theme.properties.BeatMarkerCol.Hex2RGB();
+ TimelineSlider.GetChild(2).GetComponent().color = EditorTheme.theme.properties.BeatMarkerCol.Hex2RGB();
+ TimelineSlider.GetChild(3).GetComponent().color = EditorTheme.theme.properties.BeatMarkerCol.Hex2RGB();
+ TimelineSongPosLineRef.GetComponent().color = EditorTheme.theme.properties.CurrentTimeMarkerCol.Hex2RGB();
}
#endregion
diff --git a/Assets/Scripts/LevelEditor/TimelineEventObj.cs b/Assets/Scripts/LevelEditor/TimelineEventObj.cs
index c8cea130..cc3f898c 100644
--- a/Assets/Scripts/LevelEditor/TimelineEventObj.cs
+++ b/Assets/Scripts/LevelEditor/TimelineEventObj.cs
@@ -31,8 +31,6 @@ namespace RhythmHeavenMania.Editor
[Header("Colors")]
public Color NormalCol;
- public Color SelectedCol;
- public Color DeleteCol;
private void Update()
{
@@ -56,20 +54,16 @@ namespace RhythmHeavenMania.Editor
#endregion
+ SetColor(GetTrack());
+
if (selected)
{
- SetColor(1);
-
if (Input.GetKeyDown(KeyCode.Delete))
{
Selections.instance.Deselect(this);
Timeline.instance.DestroyEventObject(entity);
}
}
- else
- {
- SetColor(0);
- }
if (Conductor.instance.NotStopped())
{
@@ -137,7 +131,7 @@ namespace RhythmHeavenMania.Editor
{
entity.beat = this.transform.localPosition.x;
GameManager.instance.SortEventsList();
- entity.track = (int)(this.transform.localPosition.y / 51.34f) * -1;
+ entity.track = GetTrack();
}
#region ClickEvents
@@ -203,19 +197,27 @@ namespace RhythmHeavenMania.Editor
switch (type)
{
case 0:
- c = NormalCol;
+ c = EditorTheme.theme.properties.Layer1Col.Hex2RGB();
break;
case 1:
- c = SelectedCol;
+ c = EditorTheme.theme.properties.Layer2Col.Hex2RGB();
break;
case 2:
- c = DeleteCol;
+ c = EditorTheme.theme.properties.Layer3Col.Hex2RGB();
+ break;
+ case 3:
+ c = EditorTheme.theme.properties.Layer4Col.Hex2RGB();
break;
}
transform.GetChild(0).GetComponent().color = c;
}
+ public int GetTrack()
+ {
+ return (int)(this.transform.localPosition.y / 51.34f) * -1;
+ }
+
private void OnDestroy()
{
// better safety net than canada's healthcare system
diff --git a/Assets/Scripts/LevelEditor/editortheme.json b/Assets/Scripts/LevelEditor/editortheme.json
new file mode 100644
index 00000000..0a74dcb6
--- /dev/null
+++ b/Assets/Scripts/LevelEditor/editortheme.json
@@ -0,0 +1,18 @@
+{
+ "name": "Rhythm Heaven Mania Default Editor Theme",
+
+ "properties": {
+ "Layer1Col": "E1F1DD",
+ "Layer2Col": "CDC7BE",
+ "Layer3Col": "87A7B3",
+ "Layer4Col": "766161",
+
+ "EventSelectedCol": "ffbc36",
+ "EventNormalCol": "FFFFFF",
+
+ "BeatMarkerCol": "ffbc36",
+ "CurrentTimeMarkerCol": "ffc95c",
+
+ "BoxSelectionCol": "ffd175"
+ }
+}
\ No newline at end of file
diff --git a/Assets/Scripts/LevelEditor/editortheme.json.meta b/Assets/Scripts/LevelEditor/editortheme.json.meta
new file mode 100644
index 00000000..b95d3222
--- /dev/null
+++ b/Assets/Scripts/LevelEditor/editortheme.json.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 2764bae4979406541a0596e739f420fd
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant: