diff --git a/Assets/Resources/Sprites/Games/KarateMan/Animations/Joe/Joe.controller b/Assets/Resources/Sprites/Games/KarateMan/Animations/Joe/Joe.controller index 1a638452..b04dee34 100644 --- a/Assets/Resources/Sprites/Games/KarateMan/Animations/Joe/Joe.controller +++ b/Assets/Resources/Sprites/Games/KarateMan/Animations/Joe/Joe.controller @@ -84,7 +84,13 @@ AnimatorController: m_PrefabAsset: {fileID: 0} m_Name: Joe serializedVersion: 5 - m_AnimatorParameters: [] + m_AnimatorParameters: + - m_Name: bop + m_Type: 9 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 0 + m_Controller: {fileID: 0} m_AnimatorLayers: - serializedVersion: 5 m_Name: Base Layer diff --git a/Assets/Resources/Sprites/Games/KarateMan/karate_bg_00_rot (1).png b/Assets/Resources/Sprites/Games/KarateMan/karate_bg_00_rot (1).png new file mode 100644 index 00000000..081f6efd Binary files /dev/null and b/Assets/Resources/Sprites/Games/KarateMan/karate_bg_00_rot (1).png differ diff --git a/Assets/Resources/Sprites/Games/KarateMan/karate_bg_00_rot.png.meta b/Assets/Resources/Sprites/Games/KarateMan/karate_bg_00_rot (1).png.meta similarity index 72% rename from Assets/Resources/Sprites/Games/KarateMan/karate_bg_00_rot.png.meta rename to Assets/Resources/Sprites/Games/KarateMan/karate_bg_00_rot (1).png.meta index c6be7210..aacd589b 100644 --- a/Assets/Resources/Sprites/Games/KarateMan/karate_bg_00_rot.png.meta +++ b/Assets/Resources/Sprites/Games/KarateMan/karate_bg_00_rot (1).png.meta @@ -1,13 +1,16 @@ fileFormatVersion: 2 -guid: 56787d9b67ab042499dbe184fc104c64 +guid: 1fe78dfa0c2320546915f1f2b70c79a7 TextureImporter: internalIDToNameTable: - first: - 213: -3401044921375397511 - second: karate_bg_00_rot_0 + 213: 3927547596512374108 + second: karate_bg_00_rot (1)_0 - first: - 213: 4923284882345810831 - second: karate_bg_00_rot_1 + 213: 6723002177432063909 + second: karate_bg_00_rot (1)_1 + - first: + 213: -5244473057742839103 + second: karate_bg_00_rot (1)_2 externalObjects: {} serializedVersion: 11 mipmaps: @@ -97,34 +100,13 @@ TextureImporter: serializedVersion: 2 sprites: - serializedVersion: 2 - name: karate_bg_00_rot_0 + name: karate_bg_00_rot (1)_0 rect: serializedVersion: 2 x: 0 - y: 584 - width: 256 - height: 440 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - outline: [] - physicsShape: [] - tessellationDetail: 0 - bones: [] - spriteID: 979e54cd9af0dc0d0800000000000000 - internalID: -3401044921375397511 - vertices: [] - indices: - edges: [] - weights: [] - - serializedVersion: 2 - name: karate_bg_00_rot_1 - rect: - serializedVersion: 2 - x: 256 - y: 584 - width: 256 - height: 440 + y: 2336 + width: 1024 + height: 1760 alignment: 0 pivot: {x: 0, y: 0} border: {x: 0, y: 0, z: 0, w: 0} @@ -132,8 +114,50 @@ TextureImporter: physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: f8bd54c0485035440800000000000000 - internalID: 4923284882345810831 + spriteID: c5d2f80eab3718630800000000000000 + internalID: 3927547596512374108 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: karate_bg_00_rot (1)_1 + rect: + serializedVersion: 2 + x: 0 + y: 544 + width: 1024 + height: 1760 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 5af04024cd6ec4d50800000000000000 + internalID: 6723002177432063909 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: karate_bg_00_rot (1)_2 + rect: + serializedVersion: 2 + x: 1024 + y: 2336 + width: 1024 + height: 1760 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 1c2a1275a83e737b0800000000000000 + internalID: -5244473057742839103 vertices: [] indices: edges: [] diff --git a/Assets/Resources/Sprites/Games/KarateMan/karate_bg_00_rot.png b/Assets/Resources/Sprites/Games/KarateMan/karate_bg_00_rot.png deleted file mode 100644 index 4de02874..00000000 Binary files a/Assets/Resources/Sprites/Games/KarateMan/karate_bg_00_rot.png and /dev/null differ diff --git a/Assets/Resources/Sprites/Games/KarateMan/karateman_main.png b/Assets/Resources/Sprites/Games/KarateMan/karateman_main.png index ee3e80c9..0897deb3 100644 Binary files a/Assets/Resources/Sprites/Games/KarateMan/karateman_main.png and b/Assets/Resources/Sprites/Games/KarateMan/karateman_main.png differ diff --git a/Assets/Resources/Sprites/Games/KarateMan/karateman_main.png.meta b/Assets/Resources/Sprites/Games/KarateMan/karateman_main.png.meta index 5e99d2cb..ea8643e1 100644 --- a/Assets/Resources/Sprites/Games/KarateMan/karateman_main.png.meta +++ b/Assets/Resources/Sprites/Games/KarateMan/karateman_main.png.meta @@ -92,6 +92,9 @@ TextureImporter: - first: 213: 2973732670430313046 second: karateman_snow + - first: + 213: -3530312539838775474 + second: karateman_ball externalObjects: {} serializedVersion: 11 mipmaps: @@ -798,7 +801,7 @@ TextureImporter: width: 248 height: 248 alignment: 0 - pivot: {x: 0, y: 0} + pivot: {x: 0.5, y: 0.5} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] @@ -810,6 +813,27 @@ TextureImporter: indices: edges: [] weights: [] + - serializedVersion: 2 + name: karateman_ball + rect: + serializedVersion: 2 + x: 292 + y: 1124 + width: 280 + height: 280 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: e4f7dcc037fc10fc0800000000000000 + internalID: -3530312539838775474 + vertices: [] + indices: + edges: [] + weights: [] outline: [] physicsShape: [] bones: [] diff --git a/Assets/Scenes/Game.unity b/Assets/Scenes/Game.unity index d27384ce..f06805dd 100644 --- a/Assets/Scenes/Game.unity +++ b/Assets/Scenes/Game.unity @@ -7732,7 +7732,7 @@ AudioSource: m_Enabled: 1 serializedVersion: 4 OutputAudioMixerGroup: {fileID: 0} - m_audioClip: {fileID: 8300000, guid: 5fc457d2d31969c44a6734ce4e684ff8, type: 3} + m_audioClip: {fileID: 8300000, guid: e5cf71158cc9bff4a8fbfbca1e73e500, type: 3} m_PlayOnAwake: 0 m_Volume: 1 m_Pitch: 1 @@ -8624,7 +8624,7 @@ ParticleSystem: startSize: serializedVersion: 2 minMaxState: 0 - scalar: 0.65 + scalar: 0.71 minScalar: 1 maxCurve: serializedVersion: 2 @@ -25219,8 +25219,8 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1808581453} m_LocalRotation: {x: -0, y: -0, z: 0.70710576, w: 0.70710784} - m_LocalPosition: {x: -0.2002, y: 0.331, z: 0} - m_LocalScale: {x: 11.974636, y: 20.432762, z: 1} + m_LocalPosition: {x: 0, y: 0.0066, z: 0} + m_LocalScale: {x: 0.73, y: 0.74, z: 1} m_Children: [] m_Father: {fileID: 1106447917} m_RootOrder: 0 @@ -25265,12 +25265,12 @@ SpriteRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: -300 - m_Sprite: {fileID: 7482667652216324306, guid: ef2fa2a75dc283e40b9d4fe1f20dc6fb, type: 3} - m_Color: {r: 1, g: 0.90196085, b: 0.41960788, a: 1} + m_Sprite: {fileID: -5244473057742839103, guid: 1fe78dfa0c2320546915f1f2b70c79a7, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} m_FlipX: 0 m_FlipY: 0 m_DrawMode: 0 - m_Size: {x: 1, y: 1} + m_Size: {x: 14.222222, y: 24.444445} m_AdaptiveModeThreshold: 0.5 m_SpriteTileMode: 0 m_WasSpriteAssigned: 1 @@ -25374,7 +25374,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!4 &1832105476 Transform: m_ObjectHideFlags: 0 @@ -25417,6 +25417,13 @@ MonoBehaviour: - {fileID: 8050164209934277894, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3} - {fileID: 5443719295599431979, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3} - {fileID: -4108414130637688947, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3} + - {fileID: -3530312539838775474, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3} + BGSprites: + - Sprites: + - {fileID: -5244473057742839103, guid: 1fe78dfa0c2320546915f1f2b70c79a7, type: 3} + - {fileID: 3927547596512374108, guid: 1fe78dfa0c2320546915f1f2b70c79a7, type: 3} + - {fileID: 6723002177432063909, guid: 1fe78dfa0c2320546915f1f2b70c79a7, type: 3} + BGSprite: {fileID: 1808581455} --- !u!1 &1834726556 GameObject: m_ObjectHideFlags: 0 @@ -26594,7 +26601,7 @@ MonoBehaviour: playerEntities: [] currentEvent: 0 currentPlayerEvent: 0 - txt: {fileID: 4900000, guid: df453afcce54d5c4e9105c6829ed8f30, type: 3} + txt: {fileID: 4900000, guid: 244c565c8088cfa4597e0ebda9c7de98, type: 3} startOffset: 0.5 GameCamera: {fileID: 519420031} CursorCam: {fileID: 79134728} diff --git a/Assets/Scripts/EventCaller.cs b/Assets/Scripts/EventCaller.cs index 0f335ad6..027eb801 100644 --- a/Assets/Scripts/EventCaller.cs +++ b/Assets/Scripts/EventCaller.cs @@ -91,17 +91,19 @@ namespace RhythmHeavenMania { new GameAction("shoot", delegate { Spaceball.instance.Shoot(currentBeat, false, currentType); }, true ), new GameAction("shootHigh", delegate { Spaceball.instance.Shoot(currentBeat, true, currentType); }, true ), - new GameAction("costume", delegate { Spaceball.instance.Costume(currentType); }, true ), - new GameAction("alien", delegate { Spaceball.instance.alien.Show(currentBeat); }, true ), + new GameAction("costume", delegate { Spaceball.instance.Costume(currentType); } ), + new GameAction("alien", delegate { Spaceball.instance.alien.Show(currentBeat); } ), // new GameAction("cameraZoom", delegate { Spaceball.instance.CameraZoom(currentBeat, currentLength, currentValA); } ), }), new MiniGame("karateman", "F6C135", new List() { - new GameAction("bop", delegate { KarateMan.instance.Bop(); }, true ), + new GameAction("bop", delegate { KarateMan.instance.Bop(); } ), new GameAction("pot", delegate { KarateMan.instance.Shoot(currentBeat, 0); }, true ), new GameAction("bulb", delegate { KarateMan.instance.Shoot(currentBeat, 1); }, true ), new GameAction("rock", delegate { KarateMan.instance.Shoot(currentBeat, 2); }, true ), - // new GameAction("cameraZoom", delegate { Spaceball.instance.CameraZoom(currentBeat, currentLength, currentValA); } ), + new GameAction("ball", delegate { KarateMan.instance.Shoot(currentBeat, 3); }, true ), + new GameAction("bgfxOn", delegate { KarateMan.instance.BGFXOn(); } ), + new GameAction("bgfxOff", delegate { KarateMan.instance.BGFXOff(); }), }) }; diff --git a/Assets/Scripts/GameManager.cs b/Assets/Scripts/GameManager.cs index ba74666d..c70df4d7 100644 --- a/Assets/Scripts/GameManager.cs +++ b/Assets/Scripts/GameManager.cs @@ -75,6 +75,8 @@ namespace RhythmHeavenMania { if (Beatmap.entities.Count < 1) return; + if (!Conductor.instance.musicSource.isPlaying) + return; if (Input.GetKeyDown(KeyCode.A)) { diff --git a/Assets/Scripts/Games/KarateMan/KarateJoe.cs b/Assets/Scripts/Games/KarateMan/KarateJoe.cs index 32f66813..354715fd 100644 --- a/Assets/Scripts/Games/KarateMan/KarateJoe.cs +++ b/Assets/Scripts/Games/KarateMan/KarateJoe.cs @@ -43,7 +43,7 @@ namespace RhythmHeavenMania.Games.KarateMan { Pot p = EligibleHits[currentHitInList].gameObject.GetComponent(); - if (p.type == 2) + if (p.type == 2 || p.type == 3) { punchLeft = false; } diff --git a/Assets/Scripts/Games/KarateMan/KarateMan.cs b/Assets/Scripts/Games/KarateMan/KarateMan.cs index c49db77e..4886f8f0 100644 --- a/Assets/Scripts/Games/KarateMan/KarateMan.cs +++ b/Assets/Scripts/Games/KarateMan/KarateMan.cs @@ -15,11 +15,51 @@ namespace RhythmHeavenMania.Games.KarateMan public Sprite[] ObjectSprites; + public List BGSprites; + public SpriteRenderer BGSprite; + + private bool bgEnabled; + private int newBeat; + + [System.Serializable] + public class BGSpriteC + { + public List Sprites; + } + private void Awake() { instance = this; } + private void Update() + { + if (bgEnabled) + { + if (Conductor.instance.songPositionInBeats > newBeat) + { + if (newBeat % 2 == 0) + BGSprite.sprite = BGSprites[0].Sprites[1]; + else + BGSprite.sprite = BGSprites[0].Sprites[2]; + + newBeat++; + } + } + } + + public void BGFXOn() + { + bgEnabled = true; + newBeat = Mathf.RoundToInt(Conductor.instance.songPositionInBeats); + } + + public void BGFXOff() + { + bgEnabled = false; + BGSprite.sprite = BGSprites[0].Sprites[0]; + } + public void Shoot(float beat, int type) { GameObject pot = Instantiate(Pot); @@ -48,6 +88,10 @@ namespace RhythmHeavenMania.Games.KarateMan Jukebox.PlayOneShotGame("karateman/objectOut"); p.hitSnd = "karateman/rockHit"; break; + case 3: + Jukebox.PlayOneShotGame("karateman/objectOut"); + p.hitSnd = "karateman/soccerHit"; + break; } } diff --git a/Assets/Scripts/Games/Spaceball/Spaceball.cs b/Assets/Scripts/Games/Spaceball/Spaceball.cs index f9481bce..ca628dc2 100644 --- a/Assets/Scripts/Games/Spaceball/Spaceball.cs +++ b/Assets/Scripts/Games/Spaceball/Spaceball.cs @@ -51,7 +51,7 @@ namespace RhythmHeavenMania.Games.Spaceball private void Start() { - UpdateCameraZoom(); + allCameraEvents = EventCaller.GetAllInGameManagerList("spaceball", new string[] { "cameraZoom" }); } private void Update() @@ -85,7 +85,9 @@ namespace RhythmHeavenMania.Games.Spaceball else { if (currentZoomCamLength <= 0) + { GameManager.instance.GameCamera.transform.localPosition = new Vector3(0, 0, currentZoomCamDistance); + } else { float newPosZ = Mathf.Lerp(lastCamDistance, currentZoomCamDistance, normalizedBeat); @@ -96,8 +98,6 @@ namespace RhythmHeavenMania.Games.Spaceball private void UpdateCameraZoom() { - allCameraEvents = EventCaller.GetAllInGameManagerList("spaceball", new string[] { "cameraZoom" }); - if (allCameraEvents.Count == 0) currentZoomCamDistance = -10; @@ -106,7 +106,12 @@ namespace RhythmHeavenMania.Games.Spaceball if (currentZoomIndex - 1 >= 0) lastCamDistance = allCameraEvents[currentZoomIndex - 1].valA * -1; else - lastCamDistance = allCameraEvents[0].valA * -1; + { + if (currentZoomIndex == 0) + lastCamDistance = -10; + else + lastCamDistance = allCameraEvents[0].valA * -1; + } currentZoomCamBeat = allCameraEvents[currentZoomIndex].beat; currentZoomCamLength = allCameraEvents[currentZoomIndex].length; diff --git a/Assets/Scripts/Games/Spaceball/SpaceballPlayer.cs b/Assets/Scripts/Games/Spaceball/SpaceballPlayer.cs index 52473e59..9793c11c 100644 --- a/Assets/Scripts/Games/Spaceball/SpaceballPlayer.cs +++ b/Assets/Scripts/Games/Spaceball/SpaceballPlayer.cs @@ -63,8 +63,8 @@ namespace RhythmHeavenMania.Games.Spaceball if (EligibleHits[currentHitInList].perfect) { Jukebox.PlayOneShotGame("spaceball/hit"); - EligibleHits[currentHitInList].gameObject.GetComponent().Holder.transform.DOLocalMove(new Vector3(Random.Range(25, 60), 0, -600), 7f).SetEase(Ease.Linear); - EligibleHits[currentHitInList].gameObject.GetComponent().Holder.transform.GetChild(0).gameObject.AddComponent().rotateSpeed = -95; + 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; diff --git a/Assets/cointoss.json b/Assets/cointoss.json index 97d3cfa1..3499b49c 100644 --- a/Assets/cointoss.json +++ b/Assets/cointoss.json @@ -1,38 +1,171 @@ { "bpm": 120, "entities": [ + { + "beat": 0, + "datamodel": "clappyTrio/bop" + }, + { + "beat": 1, + "datamodel": "clappyTrio/bop" + }, + { + "beat": 2, + "datamodel": "clappyTrio/bop" + }, + { + "beat": 3, + "datamodel": "clappyTrio/prepare" + }, { "beat": 4, - "datamodel": "spaceball/shootHigh" - }, - { - "beat": 8, - "datamodel": "gameManager/switchGame/clappyTrio" - }, - { - "beat": 9, - "datamodel": "clappyTrio/bop" - }, - { - "beat": 10, - "datamodel": "clappyTrio/bop" - }, - { - "beat": 11, - "datamodel": "clappyTrio/prepare_alt" - }, - { - "beat": 12, "length": 1, "datamodel": "clappyTrio/clap" }, + { + "beat": 7.75, + "datamodel": "gameManager/switchGame/karateman" + }, + { + "beat": 8, + "datamodel": "karateman/bop" + }, + { + "beat": 9, + "datamodel": "karateman/bop" + }, + { + "beat": 10, + "datamodel": "karateman/bop" + }, + { + "beat": 10, + "datamodel": "karateman/pot" + }, + { + "beat": 12, + "datamodel": "karateman/bop" + }, + { + "beat": 13, + "datamodel": "karateman/rock" + }, + { + "beat": 15.75, + "datamodel": "gameManager/switchGame/clappyTrio" + }, { "beat": 16, - "datamodel": "gameManager/switchGame/spaceball" + "datamodel":"clappyTrio/bop" + }, + { + "beat": 17, + "datamodel":"clappyTrio/bop" + }, + { + "beat": 18, + "datamodel":"clappyTrio/bop" + }, + { + "beat": 19, + "datamodel":"clappyTrio/bop" + }, + { + "beat": 20, + "datamodel":"clappyTrio/prepare" }, { "beat": 21, + "length": 0.5, + "datamodel":"clappyTrio/clap" + }, + { + "beat": 23, + "datamodel":"clappyTrio/bop" + }, + { + "beat": 23.75, + "datamodel":"gameManager/switchGame/spaceball" + }, + { + "beat": 24, + "length": 4, + "valA": 20, + "datamodel": "spaceball/cameraZoom" + }, + { + "beat": 24, "datamodel": "spaceball/shoot" }, + { + "beat": 26, + "datamodel": "spaceball/shoot" + }, + { + "beat": 28, + "length": 2, + "valA": 120, + "datamodel": "spaceball/cameraZoom" + }, + { + "beat": 28, + "datamodel": "spaceball/shootHigh" + }, + { + "beat": 31.75, + "datamodel": "gameManager/switchGame/forkLifter" + }, + { + "beat": 32, + "datamodel": "forkLifter/pea" + }, + { + "beat": 36, + "datamodel": "forkLifter/pea" + }, + { + "beat": 39, + "datamodel": "forkLifter/gulp" + }, + { + "beat": 40, + "datamodel":"gameManager/switchGame/karateman" + }, + { + "beat": 40, + "datamodel": "karateman/bgfxOn" + }, + { + "beat": 40, + "datamodel":"karateman/bop" + }, + { + "beat": 41, + "datamodel":"karateman/bop" + }, + { + "beat": 42, + "datamodel":"karateman/bop" + }, + { + "beat": 42, + "datamodel":"karateman/pot" + }, + { + "beat": 44, + "datamodel":"karateman/bop" + }, + { + "beat": 44, + "datamodel": "karateman/bulb" + }, + { + "beat": 46, + "datamodel":"karateman/bop" + }, + { + "beat": 46, + "datamodel": "karateman/ball" + } ] } \ No newline at end of file