bg open / close
This commit is contained in:
parent
6de6462c17
commit
39106906db
File diff suppressed because it is too large
Load diff
|
|
@ -26,6 +26,32 @@ AnimatorState:
|
||||||
m_MirrorParameter:
|
m_MirrorParameter:
|
||||||
m_CycleOffsetParameter:
|
m_CycleOffsetParameter:
|
||||||
m_TimeParameter:
|
m_TimeParameter:
|
||||||
|
--- !u!1102 &-6994252768423587492
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 6
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: SlideClose
|
||||||
|
m_Speed: -1
|
||||||
|
m_CycleOffset: 1
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 7400000, guid: ae6ea55007552ff4fb8f9e46a07a0b28, type: 2}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
--- !u!1102 &-2889309577850128088
|
--- !u!1102 &-2889309577850128088
|
||||||
AnimatorState:
|
AnimatorState:
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
|
|
@ -88,7 +114,10 @@ AnimatorStateMachine:
|
||||||
m_Position: {x: 200, y: 0, z: 0}
|
m_Position: {x: 200, y: 0, z: 0}
|
||||||
- serializedVersion: 1
|
- serializedVersion: 1
|
||||||
m_State: {fileID: -7351194649355570482}
|
m_State: {fileID: -7351194649355570482}
|
||||||
m_Position: {x: 235, y: 65, z: 0}
|
m_Position: {x: 290, y: 70, z: 0}
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: -6994252768423587492}
|
||||||
|
m_Position: {x: 340, y: 130, z: 0}
|
||||||
m_ChildStateMachines: []
|
m_ChildStateMachines: []
|
||||||
m_AnyStateTransitions: []
|
m_AnyStateTransitions: []
|
||||||
m_EntryTransitions: []
|
m_EntryTransitions: []
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,7 @@ AnimationClip:
|
||||||
m_Curve:
|
m_Curve:
|
||||||
- serializedVersion: 3
|
- serializedVersion: 3
|
||||||
time: 0
|
time: 0
|
||||||
value: {x: -18, y: 5.5, z: 0}
|
value: {x: -26.6, y: 5.5, z: 0}
|
||||||
inSlope: {x: 0, y: 0, z: 0}
|
inSlope: {x: 0, y: 0, z: 0}
|
||||||
outSlope: {x: 0, y: 0, z: 0}
|
outSlope: {x: 0, y: 0, z: 0}
|
||||||
tangentMode: 0
|
tangentMode: 0
|
||||||
|
|
@ -129,7 +129,7 @@ AnimationClip:
|
||||||
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||||
- serializedVersion: 3
|
- serializedVersion: 3
|
||||||
time: 1
|
time: 1
|
||||||
value: {x: -36.5, y: 5.5, z: 0}
|
value: {x: -45, y: 5.5, z: 0}
|
||||||
inSlope: {x: 0, y: 0, z: 0}
|
inSlope: {x: 0, y: 0, z: 0}
|
||||||
outSlope: {x: 0, y: 0, z: 0}
|
outSlope: {x: 0, y: 0, z: 0}
|
||||||
tangentMode: 0
|
tangentMode: 0
|
||||||
|
|
@ -145,7 +145,7 @@ AnimationClip:
|
||||||
m_Curve:
|
m_Curve:
|
||||||
- serializedVersion: 3
|
- serializedVersion: 3
|
||||||
time: 0
|
time: 0
|
||||||
value: {x: 18.6, y: 5.5, z: 0}
|
value: {x: 26.6, y: 5.5, z: 0}
|
||||||
inSlope: {x: 0, y: 0, z: 0}
|
inSlope: {x: 0, y: 0, z: 0}
|
||||||
outSlope: {x: 0, y: 0, z: 0}
|
outSlope: {x: 0, y: 0, z: 0}
|
||||||
tangentMode: 0
|
tangentMode: 0
|
||||||
|
|
@ -154,7 +154,7 @@ AnimationClip:
|
||||||
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||||
- serializedVersion: 3
|
- serializedVersion: 3
|
||||||
time: 1
|
time: 1
|
||||||
value: {x: 36.5, y: 5.5, z: 0}
|
value: {x: 45, y: 5.5, z: 0}
|
||||||
inSlope: {x: 0, y: 0, z: 0}
|
inSlope: {x: 0, y: 0, z: 0}
|
||||||
outSlope: {x: 0, y: 0, z: 0}
|
outSlope: {x: 0, y: 0, z: 0}
|
||||||
tangentMode: 0
|
tangentMode: 0
|
||||||
|
|
@ -404,7 +404,7 @@ AnimationClip:
|
||||||
m_Curve:
|
m_Curve:
|
||||||
- serializedVersion: 3
|
- serializedVersion: 3
|
||||||
time: 0
|
time: 0
|
||||||
value: -18
|
value: -26.6
|
||||||
inSlope: 0
|
inSlope: 0
|
||||||
outSlope: 0
|
outSlope: 0
|
||||||
tangentMode: 136
|
tangentMode: 136
|
||||||
|
|
@ -413,7 +413,7 @@ AnimationClip:
|
||||||
outWeight: 0.33333334
|
outWeight: 0.33333334
|
||||||
- serializedVersion: 3
|
- serializedVersion: 3
|
||||||
time: 1
|
time: 1
|
||||||
value: -36.5
|
value: -45
|
||||||
inSlope: 0
|
inSlope: 0
|
||||||
outSlope: 0
|
outSlope: 0
|
||||||
tangentMode: 136
|
tangentMode: 136
|
||||||
|
|
@ -488,7 +488,7 @@ AnimationClip:
|
||||||
m_Curve:
|
m_Curve:
|
||||||
- serializedVersion: 3
|
- serializedVersion: 3
|
||||||
time: 0
|
time: 0
|
||||||
value: 18.6
|
value: 26.6
|
||||||
inSlope: 0
|
inSlope: 0
|
||||||
outSlope: 0
|
outSlope: 0
|
||||||
tangentMode: 136
|
tangentMode: 136
|
||||||
|
|
@ -497,7 +497,7 @@ AnimationClip:
|
||||||
outWeight: 0.33333334
|
outWeight: 0.33333334
|
||||||
- serializedVersion: 3
|
- serializedVersion: 3
|
||||||
time: 1
|
time: 1
|
||||||
value: 36.5
|
value: 45
|
||||||
inSlope: 0
|
inSlope: 0
|
||||||
outSlope: 0
|
outSlope: 0
|
||||||
tangentMode: 136
|
tangentMode: 136
|
||||||
|
|
|
||||||
|
|
@ -288,10 +288,10 @@ TextureImporter:
|
||||||
name: pillow_half_half_4
|
name: pillow_half_half_4
|
||||||
rect:
|
rect:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
x: 78
|
x: 111
|
||||||
y: 3891
|
y: 3885
|
||||||
width: 1982
|
width: 1979
|
||||||
height: 252
|
height: 253
|
||||||
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}
|
||||||
|
|
@ -603,10 +603,10 @@ TextureImporter:
|
||||||
name: pillow_half_half_22
|
name: pillow_half_half_22
|
||||||
rect:
|
rect:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
x: 26.855469
|
x: 54
|
||||||
y: 639.64844
|
y: 657
|
||||||
width: 1645.5078
|
width: 1591
|
||||||
height: 1862.793
|
height: 1833
|
||||||
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}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,8 @@ namespace HeavenStudio.Games.Loaders
|
||||||
using static Minigames;
|
using static Minigames;
|
||||||
public static class CtrPillowLoader
|
public static class CtrPillowLoader
|
||||||
{
|
{
|
||||||
public static Minigame AddGame(EventCaller eventCaller) {
|
public static Minigame AddGame(EventCaller eventCaller)
|
||||||
|
{
|
||||||
return new Minigame("pajamaParty", "Pajama Party", "fc9ac3", false, false, new List<GameAction>()
|
return new Minigame("pajamaParty", "Pajama Party", "fc9ac3", false, false, new List<GameAction>()
|
||||||
{
|
{
|
||||||
new GameAction("bop", "Bop")
|
new GameAction("bop", "Bop")
|
||||||
|
|
@ -52,9 +53,22 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("throw", "Throw Pillows")
|
new GameAction("throw", "Throw Pillows")
|
||||||
{
|
{
|
||||||
function = delegate { PajamaParty.instance.DoThrowSequence(eventCaller.currentEntity.beat); },
|
function = delegate { var e = eventCaller.currentEntity; PajamaParty.instance.DoThrowSequence(e.beat, high: e["high"]); },
|
||||||
defaultLength = 8f,
|
defaultLength = 8f,
|
||||||
inactiveFunction = delegate { PajamaParty.WarnThrowSequence(eventCaller.currentEntity.beat); }
|
inactiveFunction = delegate { var e = eventCaller.currentEntity; PajamaParty.WarnThrowSequence(e.beat, e["high"]); },
|
||||||
|
parameters = new List<Param>()
|
||||||
|
{
|
||||||
|
new Param("high", false, "Change Costumes", "Change character costumes"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new GameAction("open background", "Open / Close Background")
|
||||||
|
{
|
||||||
|
function = delegate { var e = eventCaller.currentEntity; PajamaParty.instance.OpenBackground(e.beat, e.length, e["instant"]); },
|
||||||
|
defaultLength = 4f,
|
||||||
|
parameters = new List<Param>()
|
||||||
|
{
|
||||||
|
new Param("instant", false, "Instant", "Instantly open / close the background"),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
new GameAction("instant slumber", "Instant Slumber")
|
new GameAction("instant slumber", "Instant Slumber")
|
||||||
{
|
{
|
||||||
|
|
@ -72,9 +86,9 @@ namespace HeavenStudio.Games.Loaders
|
||||||
// background stuff
|
// background stuff
|
||||||
// do shit with mako's face? (talking?)
|
// do shit with mako's face? (talking?)
|
||||||
},
|
},
|
||||||
new List<string>() {"ctr", "normal"},
|
new List<string>() { "ctr", "normal" }
|
||||||
"ctrpillow", "jp",
|
// "ctrpillow", "jp",
|
||||||
new List<string>() {"en", "jp", "ko"}
|
// new List<string>() {"en", "jp", "ko"}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -86,28 +100,35 @@ namespace HeavenStudio.Games
|
||||||
public class PajamaParty : Minigame
|
public class PajamaParty : Minigame
|
||||||
{
|
{
|
||||||
[Header("Objects")]
|
[Header("Objects")]
|
||||||
public CtrPillowPlayer Mako;
|
[SerializeField] CtrPillowPlayer Mako;
|
||||||
public GameObject Bed;
|
[SerializeField] GameObject Bed;
|
||||||
public GameObject MonkeyPrefab;
|
[SerializeField] GameObject MonkeyPrefab;
|
||||||
|
[SerializeField] GameObject Castle;
|
||||||
|
[SerializeField] Animator BgAnimator;
|
||||||
|
|
||||||
[Header("Positions")]
|
[Header("Positions")]
|
||||||
public Transform SpawnRoot;
|
[SerializeField] Transform SpawnRoot;
|
||||||
|
[SerializeField] float HighCameraHeight;
|
||||||
|
|
||||||
//game scene
|
//game scene
|
||||||
public static PajamaParty instance;
|
public static PajamaParty instance;
|
||||||
CtrPillowMonkey[,] monkeys;
|
CtrPillowMonkey[,] monkeys;
|
||||||
|
double cameraHighStart = double.MaxValue;
|
||||||
|
bool bgState, highState;
|
||||||
|
|
||||||
//cues while unoaded
|
//cues while unoaded
|
||||||
static double WantThreeJump = double.MinValue;
|
static double WantThreeJump = double.MinValue;
|
||||||
static double WantFiveJump = double.MinValue;
|
static double WantFiveJump = double.MinValue;
|
||||||
static double WantThrowSequence = double.MinValue;
|
static double WantThrowSequence = double.MinValue;
|
||||||
|
static bool WantThrowHigh = false;
|
||||||
static double WantSleepSequence = double.MinValue;
|
static double WantSleepSequence = double.MinValue;
|
||||||
static double WantInstantSleep = double.MinValue;
|
static double WantInstantSleep = double.MinValue;
|
||||||
static bool WantSleepType = false;
|
static bool WantSleepType = false;
|
||||||
static int WantSleepAction = (int)PajamaParty.SleepType.Normal;
|
static int WantSleepAction = (int)PajamaParty.SleepType.Normal;
|
||||||
static int WantInstantSleepAction = (int)PajamaParty.SleepType.Normal;
|
static int WantInstantSleepAction = (int)PajamaParty.SleepType.Normal;
|
||||||
|
|
||||||
public enum SleepType {
|
public enum SleepType
|
||||||
|
{
|
||||||
Normal,
|
Normal,
|
||||||
NoAwake,
|
NoAwake,
|
||||||
}
|
}
|
||||||
|
|
@ -190,6 +211,25 @@ namespace HeavenStudio.Games
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
Castle.SetActive(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
var cond = Conductor.instance;
|
||||||
|
Vector3 additional = Vector3.zero;
|
||||||
|
if (cond.songPositionInBeatsAsDouble >= cameraHighStart && cond.songPositionInBeatsAsDouble < cameraHighStart + 4)
|
||||||
|
{
|
||||||
|
float prog = cond.GetPositionFromBeat(cameraHighStart, 4, true);
|
||||||
|
float yMul = prog * 2f - 1f;
|
||||||
|
float yWeight = -(yMul * yMul) + 1f;
|
||||||
|
additional.y = yWeight * HighCameraHeight;
|
||||||
|
}
|
||||||
|
GameCamera.AdditionalPosition = additional;
|
||||||
|
}
|
||||||
|
|
||||||
public override void OnGameSwitch(double beat)
|
public override void OnGameSwitch(double beat)
|
||||||
{
|
{
|
||||||
if (WantThreeJump != double.MinValue)
|
if (WantThreeJump != double.MinValue)
|
||||||
|
|
@ -222,20 +262,26 @@ namespace HeavenStudio.Games
|
||||||
public void Bop(double beat, double length, bool doesBop, bool autoBop)
|
public void Bop(double beat, double length, bool doesBop, bool autoBop)
|
||||||
{
|
{
|
||||||
Mako.shouldBop = autoBop;
|
Mako.shouldBop = autoBop;
|
||||||
for (int y = 0; y < 5; y++) {
|
for (int y = 0; y < 5; y++)
|
||||||
for (int x = 0; x < 5; x++) {
|
{
|
||||||
|
for (int x = 0; x < 5; x++)
|
||||||
|
{
|
||||||
if (!(y == 0 && x == 2)) monkeys[x, y].shouldBop = autoBop;
|
if (!(y == 0 && x == 2)) monkeys[x, y].shouldBop = autoBop;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (doesBop) {
|
if (doesBop)
|
||||||
|
{
|
||||||
var actions = new List<BeatAction.Action>();
|
var actions = new List<BeatAction.Action>();
|
||||||
for (int i = 0; i < length; i++)
|
for (int i = 0; i < length; i++)
|
||||||
{
|
{
|
||||||
actions.Add(new BeatAction.Action(beat + i, delegate {
|
actions.Add(new BeatAction.Action(beat + i, delegate
|
||||||
|
{
|
||||||
Mako.anim.DoScaledAnimationAsync("MakoBeat", 0.5f);
|
Mako.anim.DoScaledAnimationAsync("MakoBeat", 0.5f);
|
||||||
for (int y = 0; y < 5; y++) {
|
for (int y = 0; y < 5; y++)
|
||||||
for (int x = 0; x < 5; x++) {
|
{
|
||||||
|
for (int x = 0; x < 5; x++)
|
||||||
|
{
|
||||||
if (!(y == 0 && x == 2)) monkeys[x, y].anim.DoScaledAnimationAsync("MonkeyBeat", 0.5f);
|
if (!(y == 0 && x == 2)) monkeys[x, y].anim.DoScaledAnimationAsync("MonkeyBeat", 0.5f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -251,8 +297,8 @@ namespace HeavenStudio.Games
|
||||||
if (doSound)
|
if (doSound)
|
||||||
MultiSound.Play(new MultiSound.Sound[] {
|
MultiSound.Play(new MultiSound.Sound[] {
|
||||||
new MultiSound.Sound("pajamaParty/three1", beat),
|
new MultiSound.Sound("pajamaParty/three1", beat),
|
||||||
new MultiSound.Sound("pajamaParty/three2", beat + 1f),
|
new MultiSound.Sound("pajamaParty/three2", beat + 1),
|
||||||
new MultiSound.Sound("pajamaParty/three3", beat + 2f),
|
new MultiSound.Sound("pajamaParty/three3", beat + 2),
|
||||||
});
|
});
|
||||||
|
|
||||||
BeatAction.New(instance, new List<BeatAction.Action>()
|
BeatAction.New(instance, new List<BeatAction.Action>()
|
||||||
|
|
@ -284,8 +330,8 @@ namespace HeavenStudio.Games
|
||||||
{
|
{
|
||||||
MultiSound.Play(new MultiSound.Sound[] {
|
MultiSound.Play(new MultiSound.Sound[] {
|
||||||
new MultiSound.Sound("pajamaParty/three1", beat),
|
new MultiSound.Sound("pajamaParty/three1", beat),
|
||||||
new MultiSound.Sound("pajamaParty/three2", beat + 1f),
|
new MultiSound.Sound("pajamaParty/three2", beat + 1),
|
||||||
new MultiSound.Sound("pajamaParty/three3", beat + 2f),
|
new MultiSound.Sound("pajamaParty/three3", beat + 2),
|
||||||
}, forcePlay: true);
|
}, forcePlay: true);
|
||||||
WantThreeJump = beat;
|
WantThreeJump = beat;
|
||||||
}
|
}
|
||||||
|
|
@ -296,19 +342,19 @@ namespace HeavenStudio.Games
|
||||||
if (doSound)
|
if (doSound)
|
||||||
MultiSound.Play(new MultiSound.Sound[] {
|
MultiSound.Play(new MultiSound.Sound[] {
|
||||||
new MultiSound.Sound("pajamaParty/five1", beat),
|
new MultiSound.Sound("pajamaParty/five1", beat),
|
||||||
new MultiSound.Sound("pajamaParty/five2", beat + 0.5f),
|
new MultiSound.Sound("pajamaParty/five2", beat + 0.5),
|
||||||
new MultiSound.Sound("pajamaParty/five3", beat + 1f),
|
new MultiSound.Sound("pajamaParty/five3", beat + 1),
|
||||||
new MultiSound.Sound("pajamaParty/five4", beat + 1.5f),
|
new MultiSound.Sound("pajamaParty/five4", beat + 1.5),
|
||||||
new MultiSound.Sound("pajamaParty/five5", beat + 2f)
|
new MultiSound.Sound("pajamaParty/five5", beat + 2)
|
||||||
});
|
});
|
||||||
|
|
||||||
BeatAction.New(instance, new List<BeatAction.Action>()
|
BeatAction.New(instance, new List<BeatAction.Action>()
|
||||||
{
|
{
|
||||||
new BeatAction.Action( beat, delegate { JumpRow(4, beat); }),
|
new BeatAction.Action( beat, delegate { JumpRow(4, beat); }),
|
||||||
new BeatAction.Action( beat + 0.5f, delegate { JumpRow(3, beat + 0.5f, 2); }),
|
new BeatAction.Action( beat + 0.5, delegate { JumpRow(3, beat + 0.5, 2); }),
|
||||||
new BeatAction.Action( beat + 1f, delegate { JumpRow(2, beat + 1f); }),
|
new BeatAction.Action( beat + 1, delegate { JumpRow(2, beat + 1); }),
|
||||||
new BeatAction.Action( beat + 1.5f, delegate { JumpRow(1, beat + 1.5f, 2); }),
|
new BeatAction.Action( beat + 1.5, delegate { JumpRow(1, beat + 1.5, 2); }),
|
||||||
new BeatAction.Action( beat + 2f, delegate { JumpRow(0, beat + 2f); }),
|
new BeatAction.Action( beat + 2, delegate { JumpRow(0, beat + 2); }),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -316,44 +362,50 @@ namespace HeavenStudio.Games
|
||||||
{
|
{
|
||||||
MultiSound.Play(new MultiSound.Sound[] {
|
MultiSound.Play(new MultiSound.Sound[] {
|
||||||
new MultiSound.Sound("pajamaParty/five1", beat),
|
new MultiSound.Sound("pajamaParty/five1", beat),
|
||||||
new MultiSound.Sound("pajamaParty/five2", beat + 0.5f),
|
new MultiSound.Sound("pajamaParty/five2", beat + 0.5),
|
||||||
new MultiSound.Sound("pajamaParty/five3", beat + 1f),
|
new MultiSound.Sound("pajamaParty/five3", beat + 1),
|
||||||
new MultiSound.Sound("pajamaParty/five4", beat + 1.5f),
|
new MultiSound.Sound("pajamaParty/five4", beat + 1.5),
|
||||||
new MultiSound.Sound("pajamaParty/five5", beat + 2f)
|
new MultiSound.Sound("pajamaParty/five5", beat + 2)
|
||||||
}, forcePlay: true);
|
}, forcePlay: true);
|
||||||
WantFiveJump = beat;
|
WantFiveJump = beat;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DoThrowSequence(double beat, bool doSound = true)
|
public void DoThrowSequence(double beat, bool doSound = true, bool high = false)
|
||||||
{
|
{
|
||||||
Mako.ScheduleThrow(beat);
|
Mako.ScheduleThrow(beat);
|
||||||
if (doSound)
|
if (doSound)
|
||||||
PlayThrowSequenceSound(beat);
|
PlayThrowSequenceSound(beat);
|
||||||
|
|
||||||
|
if (high)
|
||||||
|
{
|
||||||
|
cameraHighStart = beat + 3;
|
||||||
|
}
|
||||||
|
|
||||||
BeatAction.New(Mako, new List<BeatAction.Action>()
|
BeatAction.New(Mako, new List<BeatAction.Action>()
|
||||||
{
|
{
|
||||||
new BeatAction.Action(beat + 2f, delegate { MonkeyCharge(beat + 2f); } ),
|
new BeatAction.Action(beat + 2, delegate { MonkeyCharge(beat + 2); } ),
|
||||||
new BeatAction.Action(beat + 3f, delegate { MonkeyThrow(beat + 3f); } ),
|
new BeatAction.Action(beat + 3, delegate { MonkeyThrow(beat + 3); } ),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void WarnThrowSequence(double beat)
|
public static void WarnThrowSequence(double beat, bool high = false)
|
||||||
{
|
{
|
||||||
PlayThrowSequenceSound(beat, true);
|
PlayThrowSequenceSound(beat, true);
|
||||||
WantThrowSequence = beat;
|
WantThrowSequence = beat;
|
||||||
|
WantThrowHigh = high;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void PlayThrowSequenceSound(double beat, bool force = false)
|
public static void PlayThrowSequenceSound(double beat, bool force = false)
|
||||||
{
|
{
|
||||||
MultiSound.Play(new MultiSound.Sound[] {
|
MultiSound.Play(new MultiSound.Sound[] {
|
||||||
new MultiSound.Sound("pajamaParty/throw1", beat),
|
new MultiSound.Sound("pajamaParty/throw1", beat),
|
||||||
new MultiSound.Sound("pajamaParty/throw2", beat + 0.5f),
|
new MultiSound.Sound("pajamaParty/throw2", beat + 0.5),
|
||||||
new MultiSound.Sound("pajamaParty/throw3", beat + 1f),
|
new MultiSound.Sound("pajamaParty/throw3", beat + 1),
|
||||||
|
|
||||||
//TODO: change when locales are a thing
|
//TODO: change when locales are a thing
|
||||||
new MultiSound.Sound("pajamaParty/throw4a", beat + 1.5f),
|
new MultiSound.Sound("pajamaParty/throw4a", beat + 1.5),
|
||||||
|
|
||||||
new MultiSound.Sound("pajamaParty/charge", beat + 2f),
|
new MultiSound.Sound("pajamaParty/charge", beat + 2),
|
||||||
}, forcePlay: force);
|
}, forcePlay: force);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -364,10 +416,10 @@ namespace HeavenStudio.Games
|
||||||
if (doSound)
|
if (doSound)
|
||||||
MultiSound.Play(new MultiSound.Sound[] {
|
MultiSound.Play(new MultiSound.Sound[] {
|
||||||
new MultiSound.Sound("pajamaParty/siesta1", beat),
|
new MultiSound.Sound("pajamaParty/siesta1", beat),
|
||||||
new MultiSound.Sound("pajamaParty/siesta2", beat + 0.5f),
|
new MultiSound.Sound("pajamaParty/siesta2", beat + 0.5),
|
||||||
new MultiSound.Sound("pajamaParty/siesta3", beat + 1f),
|
new MultiSound.Sound("pajamaParty/siesta3", beat + 1),
|
||||||
new MultiSound.Sound("pajamaParty/siesta3", beat + 2.5f),
|
new MultiSound.Sound("pajamaParty/siesta3", beat + 2.5),
|
||||||
new MultiSound.Sound("pajamaParty/siesta3", beat + 4f)
|
new MultiSound.Sound("pajamaParty/siesta3", beat + 4)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -375,10 +427,10 @@ namespace HeavenStudio.Games
|
||||||
{
|
{
|
||||||
MultiSound.Play(new MultiSound.Sound[] {
|
MultiSound.Play(new MultiSound.Sound[] {
|
||||||
new MultiSound.Sound("pajamaParty/siesta1", beat),
|
new MultiSound.Sound("pajamaParty/siesta1", beat),
|
||||||
new MultiSound.Sound("pajamaParty/siesta2", beat + 0.5f),
|
new MultiSound.Sound("pajamaParty/siesta2", beat + 0.5),
|
||||||
new MultiSound.Sound("pajamaParty/siesta3", beat + 1f),
|
new MultiSound.Sound("pajamaParty/siesta3", beat + 1),
|
||||||
new MultiSound.Sound("pajamaParty/siesta3", beat + 2.5f),
|
new MultiSound.Sound("pajamaParty/siesta3", beat + 2.5),
|
||||||
new MultiSound.Sound("pajamaParty/siesta3", beat + 4f)
|
new MultiSound.Sound("pajamaParty/siesta3", beat + 4)
|
||||||
}, forcePlay: true);
|
}, forcePlay: true);
|
||||||
WantSleepSequence = beat;
|
WantSleepSequence = beat;
|
||||||
WantSleepType = alt;
|
WantSleepType = alt;
|
||||||
|
|
@ -388,8 +440,10 @@ namespace HeavenStudio.Games
|
||||||
public void DoInstantSleep(double deslumber, int action)
|
public void DoInstantSleep(double deslumber, int action)
|
||||||
{
|
{
|
||||||
Mako.anim.Play("MakoSleepJust", -1, 1);
|
Mako.anim.Play("MakoSleepJust", -1, 1);
|
||||||
for (int y = 0; y < 5; y++) {
|
for (int y = 0; y < 5; y++)
|
||||||
for (int x = 0; x < 5; x++) {
|
{
|
||||||
|
for (int x = 0; x < 5; x++)
|
||||||
|
{
|
||||||
if (!(y == 0 && x == 2)) monkeys[x, y].anim.Play("MonkeySleep02", -1, 1);
|
if (!(y == 0 && x == 2)) monkeys[x, y].anim.Play("MonkeySleep02", -1, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -481,5 +535,19 @@ namespace HeavenStudio.Games
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void OpenBackground(double beat, double length, bool instant = false)
|
||||||
|
{
|
||||||
|
bgState = !bgState;
|
||||||
|
if (instant)
|
||||||
|
{
|
||||||
|
BgAnimator.Play(bgState ? "SlideOpen" : "SlideClose", -1, 1);
|
||||||
|
BgAnimator.speed = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
BgAnimator.DoScaledAnimationAsync(bgState ? "SlideOpen" : "SlideClose", (float)(1.0 / length));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue