diff --git a/Assets/Resources/Games/workingDough.prefab b/Assets/Resources/Games/workingDough.prefab index b7bda868f..a2344f6c2 100644 --- a/Assets/Resources/Games/workingDough.prefab +++ b/Assets/Resources/Games/workingDough.prefab @@ -1148,6 +1148,36 @@ SpriteRenderer: m_WasSpriteAssigned: 1 m_MaskInteraction: 0 m_SpriteSortPoint: 0 +--- !u!1 &3885336978366137036 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6649979826100345915} + m_Layer: 0 + m_Name: Curves + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &6649979826100345915 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3885336978366137036} + 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: 8664857966238409550} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &4178277750703538361 GameObject: m_ObjectHideFlags: 0 @@ -2168,6 +2198,7 @@ Transform: - {fileID: 3144963930116768411} - {fileID: 4612207789681334008} - {fileID: 2428094795195615793} + - {fileID: 6649979826100345915} m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -2754,16 +2785,16 @@ GameObject: m_CorrespondingSourceObject: {fileID: 1571991866295846512, guid: 081ed264ff8a94f4081ee6b1dbb4b144, type: 3} m_PrefabInstance: {fileID: 7873819805929247186} m_PrefabAsset: {fileID: 0} ---- !u!4 &4612207789681334008 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 3261934242483390250, guid: 081ed264ff8a94f4081ee6b1dbb4b144, type: 3} - m_PrefabInstance: {fileID: 7873819805929247186} - m_PrefabAsset: {fileID: 0} --- !u!1 &7812265005354607313 stripped GameObject: m_CorrespondingSourceObject: {fileID: 85516462381953795, guid: 081ed264ff8a94f4081ee6b1dbb4b144, type: 3} m_PrefabInstance: {fileID: 7873819805929247186} m_PrefabAsset: {fileID: 0} +--- !u!4 &4612207789681334008 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 3261934242483390250, guid: 081ed264ff8a94f4081ee6b1dbb4b144, type: 3} + m_PrefabInstance: {fileID: 7873819805929247186} + m_PrefabAsset: {fileID: 0} --- !u!1001 &7887385672556259939 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Games/WorkingDough/NPCDoughBall.cs b/Assets/Scripts/Games/WorkingDough/NPCDoughBall.cs new file mode 100644 index 000000000..7d0005440 --- /dev/null +++ b/Assets/Scripts/Games/WorkingDough/NPCDoughBall.cs @@ -0,0 +1,18 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using NaughtyBezierCurves; +using HeavenStudio.Util; + +namespace HeavenStudio.Games.Scripts_WorkingDough +{ + public class NPCDoughBall : PlayerActionObject + { + private WorkingDough game; + + private void Awake() + { + game = WorkingDough.instance; + } + } +} diff --git a/Assets/Scripts/Games/WorkingDough/NPCDoughBall.cs.meta b/Assets/Scripts/Games/WorkingDough/NPCDoughBall.cs.meta new file mode 100644 index 000000000..2b5b2010c --- /dev/null +++ b/Assets/Scripts/Games/WorkingDough/NPCDoughBall.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f589a35cd43c5a146b78729182754157 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Games/WorkingDough/WorkingDough.cs b/Assets/Scripts/Games/WorkingDough/WorkingDough.cs index 3c9e2efad..6d986b74a 100644 --- a/Assets/Scripts/Games/WorkingDough/WorkingDough.cs +++ b/Assets/Scripts/Games/WorkingDough/WorkingDough.cs @@ -35,7 +35,7 @@ namespace HeavenStudio.Games.Loaders namespace HeavenStudio.Games { - //using Scripts_WorkingDough; + using Scripts_WorkingDough; public class WorkingDough : Minigame { [Header("Components")] @@ -90,30 +90,16 @@ namespace HeavenStudio.Games public void SpawnBall(float beat, bool isBig) { - if (isBig) + BeatAction.New(doughDudesNPC, new List() { - BeatAction.New(doughDudesNPC, new List() - { - //Jump and play sound - new BeatAction.Action(beat + 0.5f, delegate { doughDudesNPC.GetComponent().Play("BigDoughJump", 0, 0); }), - new BeatAction.Action(beat + 0.5f, delegate { Jukebox.PlayOneShotGame("workingDough/NPCBigBall"); }), - new BeatAction.Action(beat + 0.5f, delegate { Jukebox.PlayOneShotGame("workingDough/SmallBall"); }), - new BeatAction.Action(beat + 0.5f, delegate { npcImpact.SetActive(true); }), - new BeatAction.Action(beat + 0.6f, delegate { npcImpact.SetActive(false); }), - }); - } - else - { - BeatAction.New(doughDudesNPC, new List() - { - //Jump and play sound - new BeatAction.Action(beat + 0.5f, delegate { doughDudesNPC.GetComponent().Play("SmallDoughJump", 0, 0); }), - new BeatAction.Action(beat + 0.5f, delegate { Jukebox.PlayOneShotGame("workingDough/NPCSmallBall"); }), - new BeatAction.Action(beat + 0.5f, delegate { Jukebox.PlayOneShotGame("workingDough/SmallBall"); }), - new BeatAction.Action(beat + 0.5f, delegate { npcImpact.SetActive(true); }), - new BeatAction.Action(beat + 0.6f, delegate { npcImpact.SetActive(false); }), - }); - } + //Jump and play sound + new BeatAction.Action(beat + 0.5f, delegate { doughDudesNPC.GetComponent().Play(isBig ? "BigDoughJump" :"SmallDoughJump", 0, 0); }), + new BeatAction.Action(beat + 0.5f, delegate { Jukebox.PlayOneShotGame(isBig ? "workingDough/NPCBigBall" : "workingDough/NPCSmallBall"); }), + new BeatAction.Action(beat + 0.5f, delegate { Jukebox.PlayOneShotGame("workingDough/SmallBall"); }), + new BeatAction.Action(beat + 0.5f, delegate { npcImpact.SetActive(true); }), + new BeatAction.Action(beat + 0.6f, delegate { npcImpact.SetActive(false); }), + }); + } void Update()