diff --git a/Assets/Resources/Games/monkeyWatch.prefab b/Assets/Resources/Games/monkeyWatch.prefab
index a5f46719f..2bcdc5f5d 100644
--- a/Assets/Resources/Games/monkeyWatch.prefab
+++ b/Assets/Resources/Games/monkeyWatch.prefab
@@ -1554,6 +1554,60 @@ SpriteRenderer:
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
+--- !u!1 &866930355223492279
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 6302321823436949001}
+ - component: {fileID: 6946175553819886035}
+ m_Layer: 0
+ m_Name: CameraAnchor
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!4 &6302321823436949001
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 866930355223492279}
+ 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_ConstrainProportionsScale: 0
+ m_Children:
+ - {fileID: 16600283237656001}
+ m_Father: {fileID: 1686621416582726728}
+ m_RootOrder: 4
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!95 &6946175553819886035
+Animator:
+ serializedVersion: 5
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 866930355223492279}
+ m_Enabled: 1
+ m_Avatar: {fileID: 0}
+ m_Controller: {fileID: 9100000, guid: 246b91fc181c3804db2dacda8bcbffdd, type: 2}
+ m_CullingMode: 0
+ m_UpdateMode: 0
+ m_ApplyRootMotion: 0
+ m_LinearVelocityBlending: 0
+ m_StabilizeFeet: 0
+ m_WarningMessage:
+ m_HasTransformHierarchy: 1
+ m_AllowConstantClipSamplingOptimization: 1
+ m_KeepAnimatorStateOnDisable: 0
+ m_WriteDefaultValuesOnDisable: 0
--- !u!1 &870218628151596111
GameObject:
m_ObjectHideFlags: 0
@@ -7106,7 +7160,7 @@ Transform:
- {fileID: 161246764106563782}
- {fileID: 37240736623304726}
m_Father: {fileID: 1686621416582726728}
- m_RootOrder: 4
+ m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1093770155466988112
GameObject:
@@ -16370,7 +16424,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
- m_IsActive: 1
+ m_IsActive: 0
--- !u!4 &8942068904010798964
Transform:
m_ObjectHideFlags: 0
@@ -17089,9 +17143,9 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4083551090923112138}
- m_LocalRotation: {x: 0, y: 0, z: 0.02478112, w: 0.9996929}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 0.686, y: 0.686, z: 1}
+ m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 3728413059694664764}
@@ -17101,7 +17155,7 @@ Transform:
- {fileID: 3385939890402042842}
m_Father: {fileID: 1686621416582726728}
m_RootOrder: 1
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 2.84}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &8661769715595319216
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -19991,6 +20045,121 @@ SpriteRenderer:
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
+--- !u!1 &5647123591156934173
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 3236094004826115546}
+ - component: {fileID: 3165267991157936857}
+ m_Layer: 0
+ m_Name: InnerShadow2_1
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!4 &3236094004826115546
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 5647123591156934173}
+ m_LocalRotation: {x: -0, y: -0, z: -0.2935897, w: -0.9559316}
+ m_LocalPosition: {x: -0.15, y: 30.58, z: 0}
+ m_LocalScale: {x: 1.6764871, y: 1.6764871, z: 1}
+ m_ConstrainProportionsScale: 0
+ m_Children: []
+ m_Father: {fileID: 799078516484724495}
+ m_RootOrder: 12
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 394.146}
+--- !u!212 &3165267991157936857
+SpriteRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 5647123591156934173}
+ m_Enabled: 1
+ m_CastShadows: 0
+ m_ReceiveShadows: 0
+ m_DynamicOccludee: 1
+ m_StaticShadowCaster: 0
+ m_MotionVectors: 1
+ m_LightProbeUsage: 1
+ m_ReflectionProbeUsage: 1
+ m_RayTracingMode: 0
+ m_RayTraceProcedural: 0
+ m_RenderingLayerMask: 1
+ m_RendererPriority: 0
+ m_Materials:
+ - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
+ m_StaticBatchInfo:
+ firstSubMesh: 0
+ subMeshCount: 0
+ m_StaticBatchRoot: {fileID: 0}
+ m_ProbeAnchor: {fileID: 0}
+ m_LightProbeVolumeOverride: {fileID: 0}
+ m_ScaleInLightmap: 1
+ m_ReceiveGI: 1
+ m_PreserveUVs: 0
+ m_IgnoreNormalsForChartDetection: 0
+ m_ImportantGI: 0
+ m_StitchLightmapSeams: 1
+ m_SelectedEditorRenderState: 0
+ m_MinimumChartSize: 4
+ m_AutoUVMaxDistance: 0.5
+ m_AutoUVMaxAngle: 89
+ m_LightmapParameters: {fileID: 0}
+ m_SortingLayerID: 0
+ m_SortingLayer: 0
+ m_SortingOrder: -102
+ m_Sprite: {fileID: 1353417970, guid: 391927dcfcfb8c144a3e80fec9636812, type: 3}
+ m_Color: {r: 1, g: 1, b: 1, a: 1}
+ m_FlipX: 0
+ m_FlipY: 0
+ m_DrawMode: 0
+ m_Size: {x: 2.31, y: 5.18}
+ m_AdaptiveModeThreshold: 0.5
+ m_SpriteTileMode: 0
+ m_WasSpriteAssigned: 1
+ m_MaskInteraction: 0
+ m_SpriteSortPoint: 0
+--- !u!1 &5699160359285939637
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 16600283237656001}
+ m_Layer: 0
+ m_Name: Transform
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!4 &16600283237656001
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 5699160359285939637}
+ m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+ m_LocalPosition: {x: 0, y: 13.582999, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
+ m_Children: []
+ m_Father: {fileID: 6302321823436949001}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &5719803063497664328
GameObject:
m_ObjectHideFlags: 0
@@ -21102,8 +21271,8 @@ Transform:
- {fileID: 4831968824892514561}
- {fileID: 5742479390175277464}
- {fileID: 6857749598573628903}
+ - {fileID: 6302321823436949001}
- {fileID: 3735448262030941676}
- - {fileID: 6148760958697736643}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -21124,9 +21293,11 @@ MonoBehaviour:
scheduledInputs: []
firstEnable: 0
monkeyPlayer: {fileID: 5368117777341597701}
- watchHoleParent: {fileID: 3735448262030941676}
yellowMonkey: {fileID: 3151069026564347634, guid: 224742d4a2c74034997943856f560054, type: 3}
pinkMonkey: {fileID: 0}
+ watchHoleParent: {fileID: 3735448262030941676}
+ monkeyParent: {fileID: 0}
+ cameraTransform: {fileID: 6302321823436949001}
--- !u!1 &6181011653585253546
GameObject:
m_ObjectHideFlags: 0
@@ -35121,7 +35292,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
- m_IsActive: 0
+ m_IsActive: 1
--- !u!4 &4782418002106772940
Transform:
m_ObjectHideFlags: 0
@@ -36072,6 +36243,7 @@ Transform:
- {fileID: 1906196915926803593}
- {fileID: 5551552057628938175}
- {fileID: 4831997672405803729}
+ - {fileID: 3236094004826115546}
m_Father: {fileID: 1937947489430017238}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 54.726}
@@ -36328,37 +36500,6 @@ SpriteRenderer:
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
---- !u!1 &8937722919782571022
-GameObject:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- serializedVersion: 6
- m_Component:
- - component: {fileID: 6148760958697736643}
- m_Layer: 0
- m_Name: Monkeys
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!4 &6148760958697736643
-Transform:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 8937722919782571022}
- m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 1.7, y: 1.7, z: 1}
- m_ConstrainProportionsScale: 0
- m_Children: []
- m_Father: {fileID: 1686621416582726728}
- m_RootOrder: 5
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &8984321488255817024
GameObject:
m_ObjectHideFlags: 0
diff --git a/Assets/Resources/Prefabs/Games/MonkeyWatch/YellowMonkey.prefab b/Assets/Resources/Prefabs/Games/MonkeyWatch/YellowMonkey.prefab
index 917c0070a..4edc64f2d 100644
--- a/Assets/Resources/Prefabs/Games/MonkeyWatch/YellowMonkey.prefab
+++ b/Assets/Resources/Prefabs/Games/MonkeyWatch/YellowMonkey.prefab
@@ -178,6 +178,7 @@ GameObject:
m_Component:
- component: {fileID: 7591110402097765485}
- component: {fileID: 7211266264008123551}
+ - component: {fileID: 6706979151958862924}
m_Layer: 0
m_Name: YellowMonkey
m_TagString: Untagged
@@ -194,7 +195,7 @@ Transform:
m_GameObject: {fileID: 3151069026564347634}
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_LocalScale: {x: 1.02, y: 1.02, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 8722027174825287830}
@@ -230,6 +231,17 @@ Animator:
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorStateOnDisable: 0
m_WriteDefaultValuesOnDisable: 0
+--- !u!210 &6706979151958862924
+SortingGroup:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 3151069026564347634}
+ m_Enabled: 1
+ m_SortingLayerID: 0
+ m_SortingLayer: 0
+ m_SortingOrder: 100
--- !u!1 &4343136497418508153
GameObject:
m_ObjectHideFlags: 0
diff --git a/Assets/Resources/Sprites/Games/MonkeyWatch/Animations/MonkeyClicker/Click.anim b/Assets/Resources/Sprites/Games/MonkeyWatch/Animations/MonkeyClicker/Click.anim
index 23d496a0d..c06a2ab3b 100644
--- a/Assets/Resources/Sprites/Games/MonkeyWatch/Animations/MonkeyClicker/Click.anim
+++ b/Assets/Resources/Sprites/Games/MonkeyWatch/Animations/MonkeyClicker/Click.anim
@@ -821,6 +821,6 @@ AnimationClip:
functionName: UpdateRotation
data:
objectReferenceParameter: {fileID: 0}
- floatParameter: 6
+ floatParameter: -6
intParameter: 0
messageOptions: 0
diff --git a/Assets/Resources/Sprites/Games/MonkeyWatch/Animations/YellowAppear.anim b/Assets/Resources/Sprites/Games/MonkeyWatch/Animations/YellowAppear.anim
index 74837a6b6..aae359a9d 100644
--- a/Assets/Resources/Sprites/Games/MonkeyWatch/Animations/YellowAppear.anim
+++ b/Assets/Resources/Sprites/Games/MonkeyWatch/Animations/YellowAppear.anim
@@ -1134,7 +1134,7 @@ AnimationClip:
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
- m_LoopTime: 1
+ m_LoopTime: 0
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
diff --git a/Assets/Resources/Sprites/Games/MonkeyWatch/Animations/YellowAshamed.anim b/Assets/Resources/Sprites/Games/MonkeyWatch/Animations/YellowAshamed.anim
index fbe49de43..5af193395 100644
--- a/Assets/Resources/Sprites/Games/MonkeyWatch/Animations/YellowAshamed.anim
+++ b/Assets/Resources/Sprites/Games/MonkeyWatch/Animations/YellowAshamed.anim
@@ -431,7 +431,7 @@ AnimationClip:
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
- m_LoopTime: 1
+ m_LoopTime: 0
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
diff --git a/Assets/Resources/Sprites/Games/MonkeyWatch/Animations/YellowClapCorner.anim b/Assets/Resources/Sprites/Games/MonkeyWatch/Animations/YellowClapCorner.anim
index adf2d8045..1235157b5 100644
--- a/Assets/Resources/Sprites/Games/MonkeyWatch/Animations/YellowClapCorner.anim
+++ b/Assets/Resources/Sprites/Games/MonkeyWatch/Animations/YellowClapCorner.anim
@@ -563,7 +563,7 @@ AnimationClip:
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
- m_LoopTime: 1
+ m_LoopTime: 0
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
diff --git a/Assets/Resources/Sprites/Games/MonkeyWatch/Animations/YellowClapCornerUp.anim b/Assets/Resources/Sprites/Games/MonkeyWatch/Animations/YellowClapCornerUp.anim
index ad8e9e0df..53b6bbc3b 100644
--- a/Assets/Resources/Sprites/Games/MonkeyWatch/Animations/YellowClapCornerUp.anim
+++ b/Assets/Resources/Sprites/Games/MonkeyWatch/Animations/YellowClapCornerUp.anim
@@ -546,7 +546,7 @@ AnimationClip:
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
- m_LoopTime: 1
+ m_LoopTime: 0
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
diff --git a/Assets/Resources/Sprites/Games/MonkeyWatch/Animations/YellowClapDown.anim b/Assets/Resources/Sprites/Games/MonkeyWatch/Animations/YellowClapDown.anim
index 834fd254b..e97bbe4d5 100644
--- a/Assets/Resources/Sprites/Games/MonkeyWatch/Animations/YellowClapDown.anim
+++ b/Assets/Resources/Sprites/Games/MonkeyWatch/Animations/YellowClapDown.anim
@@ -517,7 +517,7 @@ AnimationClip:
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
- m_LoopTime: 1
+ m_LoopTime: 0
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
diff --git a/Assets/Resources/Sprites/Games/MonkeyWatch/Animations/YellowClapSide.anim b/Assets/Resources/Sprites/Games/MonkeyWatch/Animations/YellowClapSide.anim
index f77d70a8b..3b8f48df4 100644
--- a/Assets/Resources/Sprites/Games/MonkeyWatch/Animations/YellowClapSide.anim
+++ b/Assets/Resources/Sprites/Games/MonkeyWatch/Animations/YellowClapSide.anim
@@ -580,7 +580,7 @@ AnimationClip:
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
- m_LoopTime: 1
+ m_LoopTime: 0
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
diff --git a/Assets/Resources/Sprites/Games/MonkeyWatch/Animations/YellowClapUp.anim b/Assets/Resources/Sprites/Games/MonkeyWatch/Animations/YellowClapUp.anim
index 9b8aeabea..ddbd41c5c 100644
--- a/Assets/Resources/Sprites/Games/MonkeyWatch/Animations/YellowClapUp.anim
+++ b/Assets/Resources/Sprites/Games/MonkeyWatch/Animations/YellowClapUp.anim
@@ -551,7 +551,7 @@ AnimationClip:
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
- m_LoopTime: 1
+ m_LoopTime: 0
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
diff --git a/Assets/Scripts/Games/MonkeyWatch/MonkeyClicker.cs b/Assets/Scripts/Games/MonkeyWatch/MonkeyClicker.cs
index b3f9a8ff9..45d538e1b 100644
--- a/Assets/Scripts/Games/MonkeyWatch/MonkeyClicker.cs
+++ b/Assets/Scripts/Games/MonkeyWatch/MonkeyClicker.cs
@@ -38,7 +38,7 @@ namespace HeavenStudio.Games.Scripts_MonkeyWatch
// animation events
public void UpdateRotation(float rot)
{
- gameObject.transform.eulerAngles -= new Vector3(0, 0, rot);
+ gameObject.transform.localEulerAngles += new Vector3(0, 0, rot);
// offset the rotation of the particle effects so that they're always upright
YellowStars.transform.eulerAngles = Vector3.zero;
diff --git a/Assets/Scripts/Games/MonkeyWatch/MonkeyWatch.cs b/Assets/Scripts/Games/MonkeyWatch/MonkeyWatch.cs
index c167040e2..866a79594 100644
--- a/Assets/Scripts/Games/MonkeyWatch/MonkeyWatch.cs
+++ b/Assets/Scripts/Games/MonkeyWatch/MonkeyWatch.cs
@@ -18,21 +18,29 @@ namespace HeavenStudio.Games.Loaders
{
function = delegate {
var e = eventCaller.currentEntity;
- MonkeyWatch.instance.MonkeysAppear(e.beat, e.length);
+ MonkeyWatch.instance.MonkeysAppear(e.beat, e.length, e["amount"]);
},
- defaultLength = 2f,
+ parameters = new List()
+ {
+ new Param("amount", new EntityTypes.Integer(1, 8, 4), "Monkeys to spawn", "How many monkeys will spawn over the course of this block"),
+ },
+ defaultLength = 8f,
resizable = true
},
new GameAction("startClapping", "Start Clapping")
{
function = delegate {
var e = eventCaller.currentEntity;
- MonkeyWatch.instance.Clapping(e.beat);
+ MonkeyWatch.StartClapping(e.beat, e["start"]);
+ },
+ parameters = new List()
+ {
+ new Param("start", new EntityTypes.Integer(0, 0, 60), "Start Where", "Where on the clock will the monkey start? (Set to zero to be automatic)"),
},
defaultLength = 2f,
inactiveFunction = delegate {
var e = eventCaller.currentEntity;
- MonkeyWatch.ClappingInactive(e.beat);
+ MonkeyWatch.StartClapping(e.beat, e["start"]);
},
},
new GameAction("offbeatMonkeys", "Offbeat Monkeys")
@@ -41,7 +49,6 @@ namespace HeavenStudio.Games.Loaders
parameters = new List()
{
new Param("mute", false, "Mute Cue", "Mute the offbeat monkeys's cue"),
- new Param("custom", false, "Custom Cue", "Place the \"Custom Monkey\" block 2 beats after the start of this one to create a custom pink monkey cue."),
},
resizable = true,
inactiveFunction = delegate {
@@ -89,9 +96,11 @@ namespace HeavenStudio.Games
[SerializeField] MonkeyClicker monkeyPlayer;
[Header("Objects")]
- [SerializeField] Transform watchHoleParent;
[SerializeField] GameObject yellowMonkey;
[SerializeField] GameObject pinkMonkey;
+ [SerializeField] Transform watchHoleParent;
+ [SerializeField] Transform monkeyParent;
+ public Transform cameraTransform;
// unserialized variables below
public enum SfxTypes
@@ -106,6 +115,7 @@ namespace HeavenStudio.Games
Dictionary offbeatMonkeys = new Dictionary();
List customMonkeys = new List();
List watchHoles = new List();
+ List activeMonkeys = new List();
public struct OffbeatMonkey
{
@@ -117,21 +127,25 @@ namespace HeavenStudio.Games
static OffbeatMonkey wantOffbeat;
static double wantClapping = double.MinValue;
public static bool startedClapping;
- int lastMonkeyClapped;
+ bool cameraMove;
+ int currentMonkey;
+ static int lastMonkeySpawned;
public static MonkeyWatch instance;
void Awake()
{
instance = this;
+ var songPos = Conductor.instance.songPositionInBeats;
+
customMonkeys = EventCaller.GetAllInGameManagerList("monkeyWatch", new string[] { "customMonkey" });
var offbeatEvents = EventCaller.GetAllInGameManagerList("monkeyWatch", new string[] { "offbeatMonkeys" });
for (int i = 0; i < offbeatEvents.Count; i++)
{
- if (offbeatEvents[i].beat >= Conductor.instance.songPositionInBeats)
+ if (offbeatEvents[i].beat >= songPos)
{
offbeatMonkeys.Add(
- Mathf.Round((float)offbeatEvents[i].beat),
+ Mathf.Round((float)offbeatEvents[i].beat),
new OffbeatMonkey{
mute = offbeatEvents[i]["mute"],
length = offbeatEvents[i].length,
@@ -140,15 +154,27 @@ namespace HeavenStudio.Games
}
}
+
+ var clapEvents = EventCaller.GetAllInGameManagerList("monkeyWatch", new string[] { "startClapping" });
+ var appearEvents = EventCaller.GetAllInGameManagerList("monkeyWatch", new string[] { "monkeysAppear" });
+ if (appearEvents.Count == 0 || clapEvents.Find(x => x.beat >= songPos).beat < appearEvents.Find(x => x.beat >= songPos).beat) {
+ MonkeysAppear(songPos, 0, 4);
+ }
+
+ monkeyPlayer.UpdateRotation(lastMonkeySpawned*6);
+
// put all the watch holes in a list
for (int i = 0; i < watchHoleParent.childCount; i++) {
watchHoles.Add(watchHoleParent.GetChild(i).gameObject);
+ Debug.Log(watchHoleParent.GetChild(i).name);
}
+
+ Update();
}
- private void Start()
+ private void Start()
{
- GameCamera.additionalPosition = new Vector3(0, 17.7f, 0);
+ Update();
}
public override void OnGameSwitch(double beat)
@@ -178,30 +204,53 @@ namespace HeavenStudio.Games
startedClapping = false;
}
- foreach (var evt in scheduledInputs)
- {
- evt.Disable();
- }
+ foreach (var evt in scheduledInputs) evt.Disable();
}
public void Update()
{
-
+ if (cameraMove) {
+ cameraTransform.transform.eulerAngles += Vector3.back * (6 * Time.deltaTime);
+ }
+ GameCamera.additionalPosition = cameraTransform.GetChild(0).position;
}
- public void MonkeysAppear(double beat, float length)
+ public void MonkeysAppear(double beat, float length, int monkeyAmount)
{
-
+ var appear = new List();
+ for (int i = 0; i < monkeyAmount; i++)
+ {
+ var x = i;
+ appear.Add(new BeatAction.Action(beat + (x / (monkeyAmount / length)), delegate {
+ Debug.Log(watchHoles[x].transform.position);
+ activeMonkeys.Add(Instantiate(yellowMonkey, watchHoles[x].transform.position, new Quaternion(0, 0, 0, 0), watchHoleParent).GetComponent());
+ }));
+ }
+ BeatAction.New(gameObject, appear);
}
- public static void ClappingInactive(double beat)
+ public static void StartClapping(double beat, int start)
+ {
+ if (GameManager.instance.currentGame is "monkeyWatch") {
+ instance.Clapping(beat);
+ } else {
+ ClappingInactive(beat);
+ if (lastMonkeySpawned != 0) lastMonkeySpawned = start;
+ }
+ }
+
+ static void ClappingInactive(double beat)
{
wantClapping = beat;
startedClapping = true;
}
- public void Clapping(double beat, double inputCheck = double.MinValue)
+ void Clapping(double beat, double inputCheck = double.MinValue)
{
+ //activeMonkeys[currentMonkey].DoScaledAnimationAsync("YellowPrepareDown", 0.5f);
+ currentMonkey++;
+ cameraMove = true;
+ //cameraTransform.transform.eulerAngles += Vector3.back*6;
if (offbeatMonkeys.ContainsKey(beat)) {
var monkeys = customMonkeys.FindAll(x => x.beat >= beat + 2 && x.beat < beat + offbeatMonkeys[beat].length);
PinkMonkeys(beat, offbeatMonkeys[beat].length, offbeatMonkeys[beat].mute, monkeys);
@@ -287,7 +336,6 @@ namespace HeavenStudio.Games
void Just(float state, bool isYellow)
{
- lastMonkeyClapped++;
string whichAnim = "PlayerClap";
if (state >= 1f || state <= -1f) {
SoundByte.PlayOneShot("miss");