anims n stuff
This commit is contained in:
parent
4df3c48e06
commit
09727f8ed8
File diff suppressed because one or more lines are too long
|
@ -19458,7 +19458,7 @@ GameObject:
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 0
|
m_IsActive: 1
|
||||||
--- !u!4 &7374162996054782378
|
--- !u!4 &7374162996054782378
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -20448,7 +20448,7 @@ SpriteRenderer:
|
||||||
m_Size: {x: 1.8575, y: 0.4875}
|
m_Size: {x: 1.8575, y: 0.4875}
|
||||||
m_AdaptiveModeThreshold: 0.5
|
m_AdaptiveModeThreshold: 0.5
|
||||||
m_SpriteTileMode: 0
|
m_SpriteTileMode: 0
|
||||||
m_WasSpriteAssigned: 1
|
m_WasSpriteAssigned: 0
|
||||||
m_MaskInteraction: 0
|
m_MaskInteraction: 0
|
||||||
m_SpriteSortPoint: 0
|
m_SpriteSortPoint: 0
|
||||||
--- !u!1 &5931211115465723547
|
--- !u!1 &5931211115465723547
|
||||||
|
@ -21253,7 +21253,7 @@ MonoBehaviour:
|
||||||
monkeyPlayer: {fileID: 5368117777341597701}
|
monkeyPlayer: {fileID: 5368117777341597701}
|
||||||
watchHoleParent: {fileID: 3735448262030941676}
|
watchHoleParent: {fileID: 3735448262030941676}
|
||||||
yellowMonkey: {fileID: 3151069026564347634, guid: 224742d4a2c74034997943856f560054, type: 3}
|
yellowMonkey: {fileID: 3151069026564347634, guid: 224742d4a2c74034997943856f560054, type: 3}
|
||||||
purpleMonkey: {fileID: 3151069026564347634, guid: ee03844036eaebc479ce042d119d5cd2, type: 3}
|
pinkMonkey: {fileID: 0}
|
||||||
--- !u!1 &6181011653585253546
|
--- !u!1 &6181011653585253546
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -21364,7 +21364,7 @@ Transform:
|
||||||
m_GameObject: {fileID: 6250700901501120224}
|
m_GameObject: {fileID: 6250700901501120224}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 200, y: 200, z: 1}
|
m_LocalScale: {x: 320, y: 180, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 5742479390175277464}
|
m_Father: {fileID: 5742479390175277464}
|
||||||
|
@ -24055,7 +24055,10 @@ MonoBehaviour:
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
rotation: 0
|
rotation: 0
|
||||||
anim: {fileID: 910339928251400446}
|
MonkeyAnim: {fileID: 0}
|
||||||
|
ClickerAnim: {fileID: 0}
|
||||||
|
YellowStars: {fileID: 0}
|
||||||
|
PinkStars: {fileID: 0}
|
||||||
--- !u!95 &910339928251400446
|
--- !u!95 &910339928251400446
|
||||||
Animator:
|
Animator:
|
||||||
serializedVersion: 5
|
serializedVersion: 5
|
||||||
|
|
|
@ -3,5 +3,5 @@ guid: 283e98c411594d9489a3ac2de4efcee2
|
||||||
PrefabImporter:
|
PrefabImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
assetBundleName: rvlwatch/common
|
assetBundleName:
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
||||||
|
|
|
@ -93,6 +93,7 @@ GameObject:
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 7591110402097765485}
|
- component: {fileID: 7591110402097765485}
|
||||||
|
- component: {fileID: 7211266264008123551}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: YellowMonkey
|
m_Name: YellowMonkey
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
|
@ -120,6 +121,27 @@ Transform:
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!95 &7211266264008123551
|
||||||
|
Animator:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3151069026564347634}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_Avatar: {fileID: 0}
|
||||||
|
m_Controller: {fileID: 0}
|
||||||
|
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 &4387843619350040913
|
--- !u!1 &4387843619350040913
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c76b31939789b9a47b82f9d88276fdb1
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -861,7 +861,7 @@ AnimationClip:
|
||||||
m_Level: 0
|
m_Level: 0
|
||||||
m_CycleOffset: 0
|
m_CycleOffset: 0
|
||||||
m_HasAdditiveReferencePose: 0
|
m_HasAdditiveReferencePose: 0
|
||||||
m_LoopTime: 1
|
m_LoopTime: 0
|
||||||
m_LoopBlend: 0
|
m_LoopBlend: 0
|
||||||
m_LoopBlendOrientation: 0
|
m_LoopBlendOrientation: 0
|
||||||
m_LoopBlendPositionY: 0
|
m_LoopBlendPositionY: 0
|
|
@ -645,7 +645,7 @@ AnimationClip:
|
||||||
m_Level: 0
|
m_Level: 0
|
||||||
m_CycleOffset: 0
|
m_CycleOffset: 0
|
||||||
m_HasAdditiveReferencePose: 0
|
m_HasAdditiveReferencePose: 0
|
||||||
m_LoopTime: 1
|
m_LoopTime: 0
|
||||||
m_LoopBlend: 0
|
m_LoopBlend: 0
|
||||||
m_LoopBlendOrientation: 0
|
m_LoopBlendOrientation: 0
|
||||||
m_LoopBlendPositionY: 0
|
m_LoopBlendPositionY: 0
|
|
@ -1253,7 +1253,7 @@ AnimationClip:
|
||||||
m_Level: 0
|
m_Level: 0
|
||||||
m_CycleOffset: 0
|
m_CycleOffset: 0
|
||||||
m_HasAdditiveReferencePose: 0
|
m_HasAdditiveReferencePose: 0
|
||||||
m_LoopTime: 1
|
m_LoopTime: 0
|
||||||
m_LoopBlend: 0
|
m_LoopBlend: 0
|
||||||
m_LoopBlendOrientation: 0
|
m_LoopBlendOrientation: 0
|
||||||
m_LoopBlendPositionY: 0
|
m_LoopBlendPositionY: 0
|
|
@ -36,7 +36,7 @@ AnimationClip:
|
||||||
m_Level: 0
|
m_Level: 0
|
||||||
m_CycleOffset: 0
|
m_CycleOffset: 0
|
||||||
m_HasAdditiveReferencePose: 0
|
m_HasAdditiveReferencePose: 0
|
||||||
m_LoopTime: 1
|
m_LoopTime: 0
|
||||||
m_LoopBlend: 0
|
m_LoopBlend: 0
|
||||||
m_LoopBlendOrientation: 0
|
m_LoopBlendOrientation: 0
|
||||||
m_LoopBlendPositionY: 0
|
m_LoopBlendPositionY: 0
|
|
@ -360,10 +360,10 @@ TextureImporter:
|
||||||
name: MonkeyWatch_12
|
name: MonkeyWatch_12
|
||||||
rect:
|
rect:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
x: 3873
|
x: 3906
|
||||||
y: 2130
|
y: 2140
|
||||||
width: 196
|
width: 126
|
||||||
height: 1929
|
height: 1896
|
||||||
alignment: 0
|
alignment: 0
|
||||||
pivot: {x: 0.5, y: 0.5}
|
pivot: {x: 0.5, y: 0.5}
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
border: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
@ -398,27 +398,6 @@ TextureImporter:
|
||||||
indices:
|
indices:
|
||||||
edges: []
|
edges: []
|
||||||
weights: []
|
weights: []
|
||||||
- serializedVersion: 2
|
|
||||||
name: MonkeyWatch_14
|
|
||||||
rect:
|
|
||||||
serializedVersion: 2
|
|
||||||
x: 3909
|
|
||||||
y: 2143
|
|
||||||
width: 119
|
|
||||||
height: 62
|
|
||||||
alignment: 0
|
|
||||||
pivot: {x: 0, y: 0}
|
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
outline: []
|
|
||||||
physicsShape: []
|
|
||||||
tessellationDetail: 0
|
|
||||||
bones: []
|
|
||||||
spriteID: 7b97cdbcff637c345a55f8cc0f7881e5
|
|
||||||
internalID: -112909732
|
|
||||||
vertices: []
|
|
||||||
indices:
|
|
||||||
edges: []
|
|
||||||
weights: []
|
|
||||||
outline: []
|
outline: []
|
||||||
physicsShape: []
|
physicsShape: []
|
||||||
bones: []
|
bones: []
|
||||||
|
|
|
@ -36,9 +36,9 @@ TextureImporter:
|
||||||
filterMode: 1
|
filterMode: 1
|
||||||
aniso: 1
|
aniso: 1
|
||||||
mipBias: 0
|
mipBias: 0
|
||||||
wrapU: 1
|
wrapU: 3
|
||||||
wrapV: 1
|
wrapV: 3
|
||||||
wrapW: 1
|
wrapW: 3
|
||||||
nPOTScale: 0
|
nPOTScale: 0
|
||||||
lightmap: 0
|
lightmap: 0
|
||||||
compressionQuality: 50
|
compressionQuality: 50
|
||||||
|
|
|
@ -13,7 +13,10 @@ namespace HeavenStudio.Games.Scripts_MonkeyWatch
|
||||||
public float rotation;
|
public float rotation;
|
||||||
|
|
||||||
[Header("Animators")]
|
[Header("Animators")]
|
||||||
public Animator anim;
|
public Animator MonkeyAnim;
|
||||||
|
public Animator ClickerAnim;
|
||||||
|
public ParticleSystem YellowStars;
|
||||||
|
public ParticleSystem PinkStars;
|
||||||
|
|
||||||
private MonkeyWatch game;
|
private MonkeyWatch game;
|
||||||
|
|
||||||
|
|
|
@ -38,10 +38,10 @@ namespace HeavenStudio.Games.Loaders
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
new Param("mute", false, "Mute Cue", "Mute the offbeat monkeys's cue"),
|
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 purple monkey 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,
|
resizable = true,
|
||||||
inactiveFunction = delegate { var e = eventCaller.currentEntity; MonkeyWatch.WarnPurpleMonkeys(e.beat, e.length, e["mute"]); },
|
inactiveFunction = delegate { var e = eventCaller.currentEntity; MonkeyWatch.WarnPinkMonkeys(e.beat, e.length, e["mute"]); },
|
||||||
},
|
},
|
||||||
new GameAction("customMonkey", "Custom Monkey")
|
new GameAction("customMonkey", "Custom Monkey")
|
||||||
{
|
{
|
||||||
|
@ -51,7 +51,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
{
|
{
|
||||||
new Param("sfx", MonkeyWatch.SfxTypes.First, "Which SFX", "Choose between the first and second \"ki\" sfx")
|
new Param("sfx", MonkeyWatch.SfxTypes.First, "Which SFX", "Choose between the first and second \"ki\" sfx")
|
||||||
},
|
},
|
||||||
inactiveFunction = delegate { var e = eventCaller.currentEntity; MonkeyWatch.WarnPurpleMonkeys(e.beat, e.length, e["mute"]); },
|
inactiveFunction = delegate { var e = eventCaller.currentEntity; MonkeyWatch.WarnPinkMonkeys(e.beat, e.length, e["mute"]); },
|
||||||
},
|
},
|
||||||
new GameAction("monkeyModifiers", "Monkey Modifiers")
|
new GameAction("monkeyModifiers", "Monkey Modifiers")
|
||||||
{
|
{
|
||||||
|
@ -83,7 +83,7 @@ namespace HeavenStudio.Games
|
||||||
[Header("Objects")]
|
[Header("Objects")]
|
||||||
[SerializeField] Transform watchHoleParent;
|
[SerializeField] Transform watchHoleParent;
|
||||||
[SerializeField] GameObject yellowMonkey;
|
[SerializeField] GameObject yellowMonkey;
|
||||||
[SerializeField] GameObject purpleMonkey;
|
[SerializeField] GameObject pinkMonkey;
|
||||||
|
|
||||||
// unserialized variables below
|
// unserialized variables below
|
||||||
public enum SfxTypes
|
public enum SfxTypes
|
||||||
|
@ -167,7 +167,7 @@ namespace HeavenStudio.Games
|
||||||
{
|
{
|
||||||
if (wantOffbeat.length != 0)
|
if (wantOffbeat.length != 0)
|
||||||
{
|
{
|
||||||
PurpleMonkeys(wantOffbeat.beat, wantOffbeat.length, wantOffbeat.mute);
|
PinkMonkeys(wantOffbeat.beat, wantOffbeat.length, wantOffbeat.mute);
|
||||||
wantOffbeat = new OffbeatMonkey{
|
wantOffbeat = new OffbeatMonkey{
|
||||||
beat = 0,
|
beat = 0,
|
||||||
length = 0,
|
length = 0,
|
||||||
|
@ -207,6 +207,7 @@ namespace HeavenStudio.Games
|
||||||
|
|
||||||
public static void ClappingInactive(double beat)
|
public static void ClappingInactive(double beat)
|
||||||
{
|
{
|
||||||
|
if (wantClapping == double.MinValue) return;
|
||||||
wantClapping = beat;
|
wantClapping = beat;
|
||||||
startedClapping = true;
|
startedClapping = true;
|
||||||
}
|
}
|
||||||
|
@ -224,8 +225,8 @@ namespace HeavenStudio.Games
|
||||||
for (int i = 0; i < offbeatMonkeys.Count; i++)
|
for (int i = 0; i < offbeatMonkeys.Count; i++)
|
||||||
{
|
{
|
||||||
if (offbeatMonkeys[i].beat == beat) {
|
if (offbeatMonkeys[i].beat == beat) {
|
||||||
PurpleMonkeys(beat, offbeatMonkeys[i].length, offbeatMonkeys[i].mute, offbeatMonkeys[i].monkeys);
|
PinkMonkeys(beat, offbeatMonkeys[i].length, offbeatMonkeys[i].mute, offbeatMonkeys[i].monkeys);
|
||||||
PurpleMonkeySFX(beat, offbeatMonkeys[i].length, offbeatMonkeys[i].mute, offbeatMonkeys[i].monkeys);
|
PinkMonkeySFX(beat, offbeatMonkeys[i].length, offbeatMonkeys[i].mute, (offbeatMonkeys[i].monkeys.Length == 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,7 +235,7 @@ namespace HeavenStudio.Games
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void WarnPurpleMonkeys(double beat, float length, bool mute)
|
public static void WarnPinkMonkeys(double beat, float length, bool mute)
|
||||||
{
|
{
|
||||||
wantOffbeat = new OffbeatMonkey{
|
wantOffbeat = new OffbeatMonkey{
|
||||||
beat = beat,
|
beat = beat,
|
||||||
|
@ -242,10 +243,10 @@ namespace HeavenStudio.Games
|
||||||
mute = mute,
|
mute = mute,
|
||||||
};
|
};
|
||||||
ClappingInactive(beat);
|
ClappingInactive(beat);
|
||||||
PurpleMonkeySFX(beat, length, mute);
|
PinkMonkeySFX(beat, length, mute, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void PurpleMonkeySFX(double beat, float length, bool mute, CustomMonkey[] monkeys = null)
|
public static void PinkMonkeySFX(double beat, float length, bool mute, bool notCustom)
|
||||||
{
|
{
|
||||||
var sfx = new List<MultiSound.Sound>();
|
var sfx = new List<MultiSound.Sound>();
|
||||||
|
|
||||||
|
@ -260,7 +261,7 @@ namespace HeavenStudio.Games
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (monkeys == null) {
|
if (notCustom) {
|
||||||
for (int i = 2; i < length; i++) {
|
for (int i = 2; i < length; i++) {
|
||||||
sfx.AddRange(new MultiSound.Sound[] {
|
sfx.AddRange(new MultiSound.Sound[] {
|
||||||
new MultiSound.Sound($"monkeyWatch/voiceKi{(i % 2 == 0 ? 1 : 2)}", beat + i + 0.5 ),
|
new MultiSound.Sound($"monkeyWatch/voiceKi{(i % 2 == 0 ? 1 : 2)}", beat + i + 0.5 ),
|
||||||
|
@ -272,7 +273,7 @@ namespace HeavenStudio.Games
|
||||||
MultiSound.Play(sfx.ToArray(), forcePlay: true);
|
MultiSound.Play(sfx.ToArray(), forcePlay: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PurpleMonkeys(double beat, float length, bool mute, CustomMonkey[] monkeys = null)
|
public void PinkMonkeys(double beat, float length, bool mute, CustomMonkey[] monkeys = null)
|
||||||
{
|
{
|
||||||
var tempMonkeys = new List<CustomMonkey>();
|
var tempMonkeys = new List<CustomMonkey>();
|
||||||
if (monkeys == null) {
|
if (monkeys == null) {
|
||||||
|
@ -282,11 +283,9 @@ namespace HeavenStudio.Games
|
||||||
monkeys = tempMonkeys.ToArray();
|
monkeys = tempMonkeys.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for (int i = 0; i < monkeys.Length; i++)
|
for (int i = 0; i < monkeys.Length; i++)
|
||||||
{
|
{
|
||||||
ScheduleInput(beat, monkeys[i].beat - beat, InputType.STANDARD_DOWN, (monkeys[i].sfx == 3 ? JustYellow : JustPurple), Miss, Nothing);
|
ScheduleInput(beat, monkeys[i].beat - beat, InputType.STANDARD_DOWN, (monkeys[i].sfx == 3 ? JustYellow : JustPink), Miss, Nothing);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -301,22 +300,28 @@ namespace HeavenStudio.Games
|
||||||
public void JustYellow(PlayerActionEvent caller, float state)
|
public void JustYellow(PlayerActionEvent caller, float state)
|
||||||
{
|
{
|
||||||
Just(state, true);
|
Just(state, true);
|
||||||
|
monkeyPlayer.YellowStars.Play();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void JustPurple(PlayerActionEvent caller, float state)
|
public void JustPink(PlayerActionEvent caller, float state)
|
||||||
{
|
{
|
||||||
Just(state, false);
|
Just(state, false);
|
||||||
|
monkeyPlayer.PinkStars.Play();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Just(float state, bool isYellow)
|
void Just(float state, bool isYellow)
|
||||||
{
|
{
|
||||||
lastMonkeyClapped++;
|
lastMonkeyClapped++;
|
||||||
monkeyPlayer.UpdateRotation();
|
monkeyPlayer.UpdateRotation();
|
||||||
|
string whichAnim = "PlayerClap";
|
||||||
if (state >= 1f || state <= -1f) {
|
if (state >= 1f || state <= -1f) {
|
||||||
SoundByte.PlayOneShot("miss");
|
SoundByte.PlayOneShot("miss");
|
||||||
|
whichAnim += "Barely";
|
||||||
} else {
|
} else {
|
||||||
SoundByte.PlayOneShotGame(isYellow ? $"monkeyWatch/clapOnbeat{UnityEngine.Random.Range(1, 5)}" : "monkeyWatch/clapOffbeat");
|
SoundByte.PlayOneShotGame(isYellow ? $"monkeyWatch/clapOnbeat{UnityEngine.Random.Range(1, 5)}" : "monkeyWatch/clapOffbeat");
|
||||||
|
if (!isYellow) whichAnim += "Big";
|
||||||
}
|
}
|
||||||
|
monkeyPlayer.MonkeyAnim.DoScaledAnimationAsync(whichAnim, 0.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Miss(PlayerActionEvent caller)
|
public void Miss(PlayerActionEvent caller)
|
||||||
|
|
Loading…
Reference in a new issue