Misc. Tweaks and Fixes part 1 googleplex (#529)

* sfx stuffs

* camera no lag
This commit is contained in:
Rapandrasmus 2023-08-12 05:31:59 +02:00 committed by GitHub
parent 348a53b29b
commit 01479c0f23
4 changed files with 126 additions and 66 deletions

View file

@ -5499,7 +5499,7 @@ Transform:
m_Children:
- {fileID: 6937774587879996168}
- {fileID: 6303891717114021071}
m_Father: {fileID: 3633341235378833335}
m_Father: {fileID: 5710094661470770154}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &808713880637306799
@ -6130,7 +6130,7 @@ Transform:
m_Children:
- {fileID: 1002359337703785928}
- {fileID: 2508380951532202043}
m_Father: {fileID: 3633341235378833335}
m_Father: {fileID: 5710094661470770154}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1849261866392104100
@ -6280,7 +6280,7 @@ Transform:
- {fileID: 2524015641006572918}
- {fileID: 1822687361797999217}
- {fileID: 6158954199404205346}
m_Father: {fileID: 3633341235378833335}
m_Father: {fileID: 5710094661470770154}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!95 &4966767534030877218
@ -16767,6 +16767,42 @@ SpriteRenderer:
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1 &3361305518886199315
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5710094661470770154}
m_Layer: 0
m_Name: Game
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5710094661470770154
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3361305518886199315}
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: 3791026570574951446}
- {fileID: 7411713793856201450}
- {fileID: 473263972156862217}
- {fileID: 8462602350738547360}
- {fileID: 8358101486431240047}
m_Father: {fileID: 3633341235378833335}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &3448851667809046100
GameObject:
m_ObjectHideFlags: 0
@ -18126,7 +18162,7 @@ Transform:
- {fileID: 5274751490841509764}
- {fileID: 8181555474337227701}
- {fileID: 8462103955933728927}
m_Father: {fileID: 3633341235378833335}
m_Father: {fileID: 5710094661470770154}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!95 &8076492646190865917
@ -24434,10 +24470,10 @@ MonoBehaviour:
offset: {x: 0, y: 0, z: 0}
see: 0
strum: 0
anim: {fileID: 0}
landOutTrans: {fileID: 2459174272852480971}
landInTrans: {fileID: 100253302601816244}
groundTrans: {fileID: 0}
gameTrans: {fileID: 5710094661470770154}
deathParticle: {fileID: 2871689559573922175}
invertAnim: {fileID: 6891751768879330768}
--- !u!95 &6891751768879330768
@ -44686,7 +44722,7 @@ Transform:
- {fileID: 2549008253857903964}
- {fileID: 3444445728475462229}
- {fileID: 8646107867988672452}
m_Father: {fileID: 3633341235378833335}
m_Father: {fileID: 5710094661470770154}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &7542046829682146307
@ -54717,10 +54753,10 @@ MonoBehaviour:
offset: {x: 0, y: 0, z: 0}
see: 1
strum: 0
anim: {fileID: 0}
landOutTrans: {fileID: 306947710665962224}
landInTrans: {fileID: 6011569602460589798}
groundTrans: {fileID: 1721751377086680254}
gameTrans: {fileID: 5710094661470770154}
deathParticle: {fileID: 2401480996724232829}
invertAnim: {fileID: 3117044548849714659}
--- !u!95 &3117044548849714659
@ -54773,11 +54809,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 3791026570574951446}
- {fileID: 7411713793856201450}
- {fileID: 473263972156862217}
- {fileID: 8462602350738547360}
- {fileID: 8358101486431240047}
- {fileID: 5710094661470770154}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -54796,7 +54828,6 @@ MonoBehaviour:
SoundSequences: []
EligibleHits: []
scheduledInputs: []
firstEnable: 0
seeSawAnim: {fileID: 8076492646190865917}
see: {fileID: 7807565663565079643}
saw: {fileID: 803512772772987110}

View file

@ -36,7 +36,7 @@ namespace HeavenStudio.Games.Scripts_SeeSaw
[SerializeField] bool see;
[NonSerialized] public bool dead = false;
public bool strum;
public Animator anim;
[NonSerialized] public Animator anim;
JumpState lastState;
JumpState currentState;
Path currentPath;
@ -48,6 +48,7 @@ namespace HeavenStudio.Games.Scripts_SeeSaw
[SerializeField] Transform landOutTrans;
public Transform landInTrans;
[SerializeField] Transform groundTrans;
[SerializeField] Transform gameTrans;
bool hasChangedAnimMidAir;
[SerializeField] ParticleSystem deathParticle;
double wantChoke = -1;
@ -141,31 +142,22 @@ namespace HeavenStudio.Games.Scripts_SeeSaw
transform.position = GetPathPositionFromBeat(currentPath, Math.Max(startBeat, currentBeat), startBeat);
break;
}
}
}
private void LateUpdate()
{
var cond = Conductor.instance;
double currentBeat = cond.songPositionInBeatsAsDouble;
if (!see && game.cameraMove && cond.isPlaying && !cond.isPaused)
{
switch (currentState)
if (!see && game.cameraMove)
{
default:
return;
case JumpState.HighOutOut:
case JumpState.HighOutIn:
case JumpState.HighInOut:
case JumpState.HighInIn:
float newCamY = Math.Max(GetPathPositionFromBeat(cameraPath, Math.Max(startBeat, currentBeat), startBeat).y, 0);
GameCamera.additionalPosition = new Vector3(0, newCamY, 0);
break;
switch (currentState)
{
default:
return;
case JumpState.HighOutOut:
case JumpState.HighOutIn:
case JumpState.HighInOut:
case JumpState.HighInIn:
float newCamY = Math.Max(GetPathPositionFromBeat(cameraPath, Math.Max(startBeat, currentBeat), startBeat).y, 0);
gameTrans.localPosition = new Vector3(0, -newCamY, 0);
break;
}
}
}
}
public void Choke(double beat, float length)

View file

@ -26,7 +26,7 @@ namespace HeavenStudio.Games.Loaders
},
new GameAction("tapping", "Tapping")
{
preFunction = delegate { var e = eventCaller.currentEntity; TapTroupe.PreTapping(e.beat, e.length, e["okay"], e["okayType"], e["animType"], e["popperBeats"], e["randomVoiceLine"]); },
preFunction = delegate { var e = eventCaller.currentEntity; TapTroupe.PreTapping(e.beat, e.length, e["okay"], e["okayType"], e["animType"], e["popperBeats"], e["randomVoiceLine"], e["noReady"]); },
defaultLength = 3f,
resizable = true,
parameters = new List<Param>()
@ -35,7 +35,8 @@ namespace HeavenStudio.Games.Loaders
new Param("okayType", TapTroupe.OkayType.OkayA, "Okay Type", "Which version of the okay voice line should the tappers say?"),
new Param("animType", TapTroupe.OkayAnimType.Normal, "Okay Animation", "Which animations should be played when the tapper say OK?"),
new Param("popperBeats", new EntityTypes.Float(0f, 80f, 2f), "Popper Beats", "How many beats until the popper will pop?"),
new Param("randomVoiceLine", true, "Extra Random Voice Line", "Whether there should be randomly said woos or laughs after the tappers say OK!")
new Param("randomVoiceLine", true, "Extra Random Voice Line", "Whether there should be randomly said woos or laughs after the tappers say OK!"),
new Param("noReady", false, "Mute Ready")
}
},
new GameAction("bop", "Bop")
@ -368,13 +369,16 @@ namespace HeavenStudio.Games
});
}
public static void PreTapping(double beat, float length, bool okay, int okayType, int animType, float popperBeats, bool randomVoiceLine)
public static void PreTapping(double beat, float length, bool okay, int okayType, int animType, float popperBeats, bool randomVoiceLine, bool noReady)
{
MultiSound.Play(new MultiSound.Sound[]
if (!noReady)
{
new MultiSound.Sound("tapTroupe/tapReady1", beat - 2f),
new MultiSound.Sound("tapTroupe/tapReady2", beat - 1f),
}, forcePlay: true);
MultiSound.Play(new MultiSound.Sound[]
{
new MultiSound.Sound("tapTroupe/tapReady1", beat - 2f),
new MultiSound.Sound("tapTroupe/tapReady2", beat - 1f),
}, forcePlay: true);
}
if (GameManager.instance.currentGame == "tapTroupe")
{
TapTroupe.instance.Tapping(beat, length, okay, okayType, animType, popperBeats, randomVoiceLine);

View file

@ -35,52 +35,57 @@ namespace HeavenStudio.Games.Loaders
},
new GameAction("poseThree", "Pose Horizontal")
{
preFunction = delegate { var e = eventCaller.currentEntity; TheDazzles.PrePose(e.beat, e.length, 0f, 1f, 2f, 0f, 1f, 2f, e["toggle"]); },
preFunction = delegate { var e = eventCaller.currentEntity; TheDazzles.PrePose(e.beat, e.length, 0f, 1f, 2f, 0f, 1f, 2f, e["toggle"], e["toggle2"]); },
defaultLength = 3f,
parameters = new List<Param>()
{
new Param("toggle", false, "Stars", "Should stars appear when successfully posing?")
new Param("toggle", false, "Stars", "Should stars appear when successfully posing?"),
new Param("toggle2", true, "Cheer Sounds")
}
},
new GameAction("poseTwo", "Pose Vertical")
{
preFunction = delegate { var e = eventCaller.currentEntity; TheDazzles.PrePose(e.beat, e.length, 0f, 0f, 0f, 2f, 2f, 2f, e["toggle"]); },
preFunction = delegate { var e = eventCaller.currentEntity; TheDazzles.PrePose(e.beat, e.length, 0f, 0f, 0f, 2f, 2f, 2f, e["toggle"], e["toggle2"]); },
defaultLength = 4f,
parameters = new List<Param>()
{
new Param("toggle", true, "Stars", "Should stars appear when successfully posing?")
new Param("toggle", true, "Stars", "Should stars appear when successfully posing?"),
new Param("toggle2", true, "Cheer Sounds")
}
},
new GameAction("poseSixDiagonal", "Pose Diagonal")
{
preFunction = delegate { var e = eventCaller.currentEntity; TheDazzles.PrePose(e.beat, e.length, 0f, 2.75f, 1.5f, 2f, 0.75f, 3.5f, e["toggle"]); },
preFunction = delegate { var e = eventCaller.currentEntity; TheDazzles.PrePose(e.beat, e.length, 0f, 2.75f, 1.5f, 2f, 0.75f, 3.5f, e["toggle"], e["toggle2"]); },
defaultLength = 4.5f,
parameters = new List<Param>()
{
new Param("toggle", false, "Stars", "Should stars appear when successfully posing?")
new Param("toggle", false, "Stars", "Should stars appear when successfully posing?"),
new Param("toggle2", true, "Cheer Sounds")
}
},
new GameAction("poseSixColumns", "Pose Rows")
{
preFunction = delegate { var e = eventCaller.currentEntity; TheDazzles.PrePose(e.beat, e.length, 0f, 0.5f, 1f, 2f, 2.5f, 3f, e["toggle"]); },
preFunction = delegate { var e = eventCaller.currentEntity; TheDazzles.PrePose(e.beat, e.length, 0f, 0.5f, 1f, 2f, 2.5f, 3f, e["toggle"], e["toggle2"]); },
defaultLength = 4f,
parameters = new List<Param>()
{
new Param("toggle", false, "Stars", "Should stars appear when successfully posing?")
new Param("toggle", false, "Stars", "Should stars appear when successfully posing?"),
new Param("toggle2", true, "Cheer Sounds")
}
},
new GameAction("poseSix", "Pose Six")
{
preFunction = delegate { var e = eventCaller.currentEntity; TheDazzles.PrePose(e.beat, e.length, 0f, 0.5f, 1f, 1.5f, 2f, 2.5f, e["toggle"]); },
preFunction = delegate { var e = eventCaller.currentEntity; TheDazzles.PrePose(e.beat, e.length, 0f, 0.5f, 1f, 1.5f, 2f, 2.5f, e["toggle"], e["toggle2"]); },
defaultLength = 4.5f,
parameters = new List<Param>()
{
new Param("toggle", true, "Stars", "Should stars appear when successfully posing?")
new Param("toggle", true, "Stars", "Should stars appear when successfully posing?"),
new Param("toggle2", true, "Cheer Sounds")
}
},
new GameAction("customPose", "Custom Pose")
{
preFunction = delegate { var e = eventCaller.currentEntity; TheDazzles.PrePose(e.beat, e.length, e["upLeft"], e["upMiddle"], e["upRight"], e["downLeft"], e["downMiddle"], e["player"], e["toggle"]); },
preFunction = delegate { var e = eventCaller.currentEntity; TheDazzles.PrePose(e.beat, e.length, e["upLeft"], e["upMiddle"], e["upRight"], e["downLeft"], e["downMiddle"], e["player"], e["toggle"], e["toggle2"]); },
defaultLength = 3f,
resizable = true,
parameters = new List<Param>()
@ -91,7 +96,8 @@ namespace HeavenStudio.Games.Loaders
new Param("downLeft", new EntityTypes.Float(0, 30f, 0f), "Down Left Girl Pose Beat", "How many beats after the event has started will this girl pose?"),
new Param("downMiddle", new EntityTypes.Float(0, 30f, 1f), "Down Middle Girl Pose Beat", "How many beats after the event has started will this girl pose?"),
new Param("player", new EntityTypes.Float(0, 30f, 2f), "Player Pose Beat", "How many beats after the event has started should the player pose?"),
new Param("toggle", false, "Stars", "Should stars appear when successfully posing?")
new Param("toggle", false, "Stars", "Should stars appear when successfully posing?"),
new Param("toggle2", true, "Cheer Sounds")
}
},
new GameAction("forceHold", "Force Hold")
@ -200,6 +206,7 @@ namespace HeavenStudio.Games
public float downMiddleBeat;
public float playerBeat;
public bool stars;
public bool cheer;
}
public struct QueuedCrouch
{
@ -266,7 +273,7 @@ namespace HeavenStudio.Games
{
foreach (var pose in queuedPoses)
{
Pose(pose.beat, pose.length, pose.upLeftBeat, pose.upMiddleBeat, pose.upRightBeat, pose.downLeftBeat, pose.downMiddleBeat, pose.playerBeat, pose.stars);
Pose(pose.beat, pose.length, pose.upLeftBeat, pose.upMiddleBeat, pose.upRightBeat, pose.downLeftBeat, pose.downMiddleBeat, pose.playerBeat, pose.stars, pose.cheer);
}
queuedPoses.Clear();
}
@ -429,28 +436,28 @@ namespace HeavenStudio.Games
});
}
public static void PrePose(double beat, float length, float upLeftBeat, float upMiddleBeat, float upRightBeat, float downLeftBeat, float downMiddleBeat, float playerBeat, bool stars)
public static void PrePose(double beat, float length, float upLeftBeat, float upMiddleBeat, float upRightBeat, float downLeftBeat, float downMiddleBeat, float playerBeat, bool stars, bool cheer)
{
if (GameManager.instance.currentGame == "theDazzles")
{
instance.Pose(beat, length, upLeftBeat, upMiddleBeat, upRightBeat, downLeftBeat, downMiddleBeat, playerBeat, stars);
instance.Pose(beat, length, upLeftBeat, upMiddleBeat, upRightBeat, downLeftBeat, downMiddleBeat, playerBeat, stars, cheer);
}
else
{
queuedPoses.Add(new QueuedPose { beat = beat, upLeftBeat = upLeftBeat, stars = stars, length = length,
downLeftBeat = downLeftBeat, playerBeat = playerBeat, upMiddleBeat = upMiddleBeat, downMiddleBeat = downMiddleBeat, upRightBeat = upRightBeat});
downLeftBeat = downLeftBeat, playerBeat = playerBeat, upMiddleBeat = upMiddleBeat, downMiddleBeat = downMiddleBeat, upRightBeat = upRightBeat, cheer = cheer});
}
}
public void Pose(double beat, float length, float upLeftBeat, float upMiddleBeat, float upRightBeat, float downLeftBeat, float downMiddleBeat, float playerBeat, bool stars)
public void Pose(double beat, float length, float upLeftBeat, float upMiddleBeat, float upRightBeat, float downLeftBeat, float downMiddleBeat, float playerBeat, bool stars, bool cheer)
{
if (stars)
{
ScheduleInput(beat, playerBeat, InputType.STANDARD_UP, JustPoseStars, MissPose, Nothing);
ScheduleInput(beat, playerBeat, InputType.STANDARD_UP, cheer ? JustPoseStars : JustPoseStarsNoCheer, MissPose, Nothing);
}
else
{
ScheduleInput(beat, playerBeat, InputType.STANDARD_UP, JustPose, MissPose, Nothing);
ScheduleInput(beat, playerBeat, InputType.STANDARD_UP, cheer ? JustPose : JustPoseNoCheer, MissPose, Nothing);
}
double crouchBeat = beat - 1f;
if (crouchBeat < crouchEndBeat)
@ -577,7 +584,7 @@ namespace HeavenStudio.Games
player.Pose();
return;
}
SuccessPose(false);
SuccessPose(false, true);
}
void JustPoseStars(PlayerActionEvent caller, float state)
@ -590,13 +597,39 @@ namespace HeavenStudio.Games
player.Pose();
return;
}
SuccessPose(true);
SuccessPose(true, true);
}
void SuccessPose(bool stars)
void JustPoseNoCheer(PlayerActionEvent caller, float state)
{
shouldHold = false;
SoundByte.PlayOneShotGame("theDazzles/pose");
SoundByte.PlayOneShotGame("theDazzles/posePlayer");
if (state >= 1f || state <= -1f)
{
player.Pose();
return;
}
SuccessPose(false, false);
}
void JustPoseStarsNoCheer(PlayerActionEvent caller, float state)
{
shouldHold = false;
SoundByte.PlayOneShotGame("theDazzles/pose");
SoundByte.PlayOneShotGame("theDazzles/posePlayer");
if (state >= 1f || state <= -1f)
{
player.Pose();
return;
}
SuccessPose(true, false);
}
void SuccessPose(bool stars, bool cheer)
{
player.Pose();
SoundByte.PlayOneShotGame("theDazzles/applause");
if (cheer) SoundByte.PlayOneShotGame("theDazzles/applause");
foreach (var girl in npcGirls)
{
girl.currentEmotion = TheDazzlesGirl.Emotion.Happy;