HeavenStudio/Assets/Scripts/Games/SeeSaw/SeeSawGuy.cs

394 lines
18 KiB
C#
Raw Normal View History

See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using HeavenStudio.Util;
using System.Resources;
using System.Net;
using System;
namespace HeavenStudio.Games.Scripts_SeeSaw
{
public class SeeSawGuy : SuperCurveObject
{
public enum LandType
{
Big,
Miss,
Barely,
Normal
}
public enum JumpState
{
None,
StartJump,
StartJumpIn,
OutOut,
InIn,
InOut,
OutIn,
EndJumpOut,
EndJumpIn,
HighOutOut,
HighOutIn,
HighInOut,
HighInIn
}
[SerializeField] bool see;
[NonSerialized] public bool dead = false;
public bool strum;
[NonSerialized] public Animator anim;
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
JumpState lastState;
JumpState currentState;
Path currentPath;
Path cameraPath;
SeeSaw game;
double startBeat;
double heightLastFrame;
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
[NonSerialized] public bool canBop = true;
[SerializeField] Transform landOutTrans;
public Transform landInTrans;
[SerializeField] Transform groundTrans;
[SerializeField] Transform gameTrans;
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
bool hasChangedAnimMidAir;
[SerializeField] ParticleSystem deathParticle;
double wantChoke = -1;
float wantChokeLength;
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
[SerializeField] private Animator invertAnim;
private void Awake()
{
anim = transform.GetChild(0).GetComponent<Animator>();
anim.Play(see ? "NeutralSee" : "NeutralSaw", 0, 0);
game = SeeSaw.instance;
cameraPath = game.GetPath("Camera");
}
private void Update()
{
var cond = Conductor.instance;
double currentBeat = cond.songPositionInBeatsAsDouble;
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
if (cond.isPlaying && !cond.isPaused)
{
switch (currentState)
{
default:
return;
case JumpState.StartJump:
transform.position = GetPathPositionFromBeat(currentPath, Math.Max(startBeat, currentBeat), out double height, startBeat);
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
if (height < heightLastFrame && !hasChangedAnimMidAir)
{
anim.Play("Jump_OutOut_Fall", 0, 0);
hasChangedAnimMidAir = true;
}
heightLastFrame = height;
break;
case JumpState.StartJumpIn:
transform.position = GetPathPositionFromBeat(currentPath, Math.Max(startBeat, currentBeat), out double heightIn, startBeat);
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
if (heightIn < heightLastFrame && !hasChangedAnimMidAir)
{
anim.Play("Jump_InIn_Fall", 0, 0);
hasChangedAnimMidAir = true;
}
heightLastFrame = heightIn;
break;
case JumpState.OutOut:
transform.position = GetPathPositionFromBeat(currentPath, Math.Max(startBeat, currentBeat), startBeat);
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
if (currentBeat >= startBeat + 1 && !hasChangedAnimMidAir)
{
anim.Play("Jump_OutOut_Fall", 0, 0);
hasChangedAnimMidAir = true;
}
break;
case JumpState.InIn:
transform.position = GetPathPositionFromBeat(currentPath, Math.Max(startBeat, currentBeat), startBeat);
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
if (currentBeat >= startBeat + 0.5f && !hasChangedAnimMidAir)
{
anim.Play("Jump_InIn_Fall", 0, 0);
hasChangedAnimMidAir = true;
}
break;
case JumpState.InOut:
transform.position = GetPathPositionFromBeat(currentPath, Math.Max(startBeat, currentBeat), startBeat);
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
if (currentBeat >= startBeat + 0.5f)
{
if (!hasChangedAnimMidAir) anim.Play("Jump_InOut_Tuck", 0, 0);
hasChangedAnimMidAir = true;
transform.rotation = Quaternion.Euler(0, 0, (see ? 1 : -1) * Mathf.Lerp(0, 360, cond.GetPositionFromBeat(startBeat + 0.5f, 0.75f)));
}
break;
case JumpState.OutIn:
transform.position = GetPathPositionFromBeat(currentPath, Math.Max(startBeat, currentBeat), startBeat);
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
if (currentBeat >= startBeat + 1f)
{
if (!hasChangedAnimMidAir) anim.Play("Jump_OutIn_Tuck", 0, 0);
hasChangedAnimMidAir = true;
transform.rotation = Quaternion.Euler(0, 0, (see ? -1 : 1) * Mathf.Lerp(0, 360, cond.GetPositionFromBeat(startBeat + 1f, 1f)));
}
break;
case JumpState.EndJumpOut:
case JumpState.EndJumpIn:
transform.position = GetPathPositionFromBeat(currentPath, Math.Max(startBeat, currentBeat), startBeat);
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
break;
case JumpState.HighOutOut:
if (currentBeat >= startBeat + 1 && !hasChangedAnimMidAir && see)
{
if (!hasChangedAnimMidAir) anim.Play("Jump_OutOut_Fall", 0, 0);
hasChangedAnimMidAir = true;
}
transform.position = GetPathPositionFromBeat(currentPath, Math.Max(startBeat, currentBeat), startBeat);
break;
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
case JumpState.HighOutIn:
if (currentBeat >= startBeat + 1 && !hasChangedAnimMidAir && see)
{
if (!hasChangedAnimMidAir) anim.Play("Jump_OutIn_Tuck", 0, 0);
hasChangedAnimMidAir = true;
}
transform.position = GetPathPositionFromBeat(currentPath, Math.Max(startBeat, currentBeat), startBeat);
break;
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
case JumpState.HighInOut:
if (currentBeat >= startBeat + 1 && !hasChangedAnimMidAir && see)
{
if (!hasChangedAnimMidAir) anim.Play("Jump_InOut_Tuck", 0, 0);
hasChangedAnimMidAir = true;
}
transform.position = GetPathPositionFromBeat(currentPath, Math.Max(startBeat, currentBeat), startBeat);
break;
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
case JumpState.HighInIn:
if (currentBeat >= startBeat + 1 && !hasChangedAnimMidAir && see)
{
if (!hasChangedAnimMidAir) anim.Play("Jump_InIn_Fall", 0, 0);
hasChangedAnimMidAir = true;
}
transform.position = GetPathPositionFromBeat(currentPath, Math.Max(startBeat, currentBeat), startBeat);
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
break;
}
float newCamY = 0f;
Monkey watch (#555) * basic setup+inputs this is gonna be so annoying to optimize i am SO overwhelmed with the options that i have object pooling, disabling the monkeys, literally just placing them manually... idk. * custom monkeys + more setup stuff it's all coming together . * a few tweaks committing to update the spritesheet * hi ev * player stuff * player anims * particles * more of prefab * upscale for this sheet * prefab more * oops * anims n stuff * assign the stuff, a little bit of rotation * better sheet * balloon sheet * particles * Revert "particles" This reverts commit fe4d589731a3ceacc7d80b7fde520f87b1c6e745. * Revert "Revert "particles"" This reverts commit ce117b280d4bd7400bd40260f4d858f2d5fba9e3. * fixed the watch outline + pink monkey prefab variant the bccad really is a life saver * anims for monkeys * convert to dictionary yippee for dictionaries * better camera * click animations are all done * custom monkeys are actually good now :) * prefab adjustments * oopps2 * tweaked particles * inactive monkeys/custom monkeys + prefab fixes they should work perfectly now, and the prefab should also need no further adjustment hopefully... * many animations * click fixes * the prefab needed One more adjustment * oops again hopefully the shadow is good now * sheet adjustment * all yellow anims done * progress. starting on the monkeys appear block rn, and then i'll work on the monkey spawning logic. honestly should be pretty easy (and i DON'T think this will be something i look back on as if i was crazy :smile: ) * open / close hole * monkey spawning working better * pink monkey anims * clean slate * gonna test something * proper camera * Camera movements done * pink monkey sounds and a small bug fix * clock arrow now moves * gettin ready to spawn el monkeys * monkeys should spawn now ig * bug fixes * oops * monkeys appear added * more fixes yahoo * shadow tweak * bug fixes * zoom out beginnings * hour more smooth * smooth minute too * it now zooms out lol * middle monkey * oopsie doopsie * hot air balloon * oops * anim * disappear fix * ticks on input now * prepare earlier * tiny tweak * oops again * fixed the input bug * holes * middle monkey anims * fixed layering * zoom out tweaks and shadow movement * camera tweak * tweaks * quad * camera tweak * quart * inspcetor * shadow correct * Okay * zoom out seperation * instant * balloon movement * balloon fixed * fixed particle * icon * fixed beataction parameters * monkey watch camera refactor run sourcegen --------- Co-authored-by: AstrlJelly <bdlawson115@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com> Co-authored-by: minenice55 <star.elementa@gmail.com>
2024-01-29 03:04:19 +00:00
if (!see && game.cameraMove)
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
{
switch (currentState)
{
default:
return;
case JumpState.HighOutOut:
case JumpState.HighOutIn:
case JumpState.HighInOut:
case JumpState.HighInIn:
newCamY = Math.Max(GetPathPositionFromBeat(cameraPath, Math.Max(startBeat, currentBeat), startBeat).y, 0);
break;
}
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
}
gameTrans.localPosition = new Vector3(0, -newCamY, 0);
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
}
}
public void Choke(double beat, float length)
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
{
if (!canBop || currentState != JumpState.None || dead)
{
wantChoke = beat;
wantChokeLength = length;
return;
}
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
dead = true;
anim.DoScaledAnimationAsync("Choke_" + (see ? "See" : "Saw") + "_Intro", 0.5f);
SoundByte.PlayOneShotGame("seeSaw/explosion" + (see ? "Black" : "White"), beat + length);
BeatAction.New(this, new List<BeatAction.Action>()
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
{
new BeatAction.Action(beat + length - 1, delegate { invertAnim.DoScaledAnimationAsync("Invert", 0.5f); }),
new BeatAction.Action(beat + length, delegate { anim.DoScaledAnimationAsync("Explode", 0.5f); deathParticle.Play();})
});
}
public void Bop()
{
if (!canBop || currentState != JumpState.None || dead) return;
anim.DoScaledAnimationAsync("Bop" + (see ? "See" : "Saw") + (strum ? "_Strum" : ""), 0.5f);
}
public void Land(LandType landType, bool getUpOut)
{
transform.rotation = Quaternion.Euler(0, 0, 0);
GameCamera.AdditionalPosition = Vector3.zero;
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
bool landedOut = false;
switch (currentState)
{
default:
break;
case JumpState.InOut:
case JumpState.OutOut:
case JumpState.StartJump:
case JumpState.HighOutOut:
case JumpState.HighInOut:
landedOut = true;
break;
case JumpState.EndJumpOut:
case JumpState.EndJumpIn:
transform.position = groundTrans.position;
SetState(JumpState.None, 0);
if (wantChoke >= Conductor.instance.songPositionInBeatsAsDouble - 0.25f && wantChoke <= Conductor.instance.songPositionInBeatsAsDouble + 0.25f)
{
Choke(wantChoke, wantChokeLength);
}
else if (see ? game.seeShouldBop : game.sawShouldBop)
{
Bop();
}
else
{
anim.Play("NeutralSee", 0, 0);
}
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
return;
}
if (landType is LandType.Big && !see)
{
game.SpawnOrbs(!landedOut, Conductor.instance.songPositionInBeatsAsDouble);
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
}
string landOut = landedOut ? "Out" : "In";
string typeOfLanding = "";
switch (landType)
{
case LandType.Big:
typeOfLanding = "_Big";
break;
case LandType.Miss:
typeOfLanding = "_Miss";
break;
case LandType.Barely:
typeOfLanding = "_Barely";
break;
default:
break;
}
string animName = "Land_" + landOut + typeOfLanding;
anim.DoScaledAnimationAsync(animName, 0.5f);
if (landType is not LandType.Barely)
{
string getUpAnim = "GetUp_" + landOut + typeOfLanding;
BeatAction.New(this, new List<BeatAction.Action>()
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
{
new BeatAction.Action(Conductor.instance.songPositionInBeatsAsDouble + (getUpOut ? 1f : 0.5f), delegate { anim.DoScaledAnimationAsync(getUpAnim, 0.5f); })
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
});
}
transform.position = landedOut ? landOutTrans.position : landInTrans.position;
SetState(JumpState.None, 0);
}
public bool ShouldEndJumpOut()
{
switch (lastState)
{
default:
return false;
case JumpState.InOut:
case JumpState.OutOut:
case JumpState.StartJump:
case JumpState.HighOutOut:
case JumpState.HighInOut:
return true;
}
}
public void SetState(JumpState state, double beat, bool miss = false, float height = 0)
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
{
lastState = currentState;
currentState = state;
startBeat = beat;
heightLastFrame = 0;
hasChangedAnimMidAir = false;
switch (currentState)
{
case JumpState.OutOut:
currentPath = game.GetPath(see ? "SeeJumpOutOut" : "SawJumpOutOut");
anim.DoScaledAnimationAsync(miss ? "BadOut_SeeReact" : "Jump_OutOut_Start", 0.5f);
break;
case JumpState.StartJump:
currentPath = game.GetPath("SeeStartJump");
anim.DoScaledAnimationAsync(miss ? "BadOut_SeeReact" : "Jump_OutOut_Start", 0.5f);
break;
case JumpState.InIn:
anim.DoScaledAnimationAsync(miss ? "BadIn_SeeReact" : "Jump_InIn_Start", 0.5f);
currentPath = game.GetPath(see ? "SeeJumpInIn" : "SawJumpInIn");
break;
case JumpState.InOut:
anim.DoScaledAnimationAsync(miss ? "BadIn_SeeReact" : "Jump_InIn_Start", 0.5f);
currentPath = game.GetPath(see ? "SeeJumpInOut" : "SawJumpInOut");
break;
case JumpState.StartJumpIn:
currentPath = game.GetPath("SeeStartJumpIn");
anim.DoScaledAnimationAsync(miss ? "BadIn_SeeReact" : "Jump_InIn_Start", 0.5f);
break;
case JumpState.OutIn:
currentPath = game.GetPath(see ? "SeeJumpOutIn" : "SawJumpOutIn");
anim.DoScaledAnimationAsync(miss ? "BadOut_SeeReact" : "Jump_OutIn_Start", 0.5f);
break;
case JumpState.EndJumpOut:
currentPath = game.GetPath("SeeEndJumpOut");
anim.DoScaledAnimationAsync(miss ? "BadOut_SeeReact" : "Jump_OutIn_Start", 0.5f);
break;
case JumpState.EndJumpIn:
anim.DoScaledAnimationAsync(miss ? "BadOut_SeeReact" : "Jump_OutIn_Start", 0.5f);
currentPath = game.GetPath("SeeEndJumpIn");
break;
case JumpState.HighOutOut:
currentPath = game.GetPath(see ? "SeeHighOutOut" : "SawHighOutOut");
currentPath.positions[0].height = Mathf.Lerp(12, 28, height);
cameraPath.positions[0].height = Mathf.Lerp(10, 26, height);
cameraPath.positions[0].duration = 2f;
anim.DoScaledAnimationAsync(miss ? "BadOut_SeeReact" : "Jump_OutOut_Start", 0.5f);
if (see) return;
BeatAction.New(this, new List<BeatAction.Action>()
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
{
new BeatAction.Action(beat + 1, delegate { anim.DoScaledAnimationAsync("Jump_OutOut_Transform", 0.5f); })
});
break;
case JumpState.HighOutIn:
currentPath = game.GetPath(see ? "SeeHighOutIn" : "SawHighOutIn");
currentPath.positions[0].height = Mathf.Lerp(12, 28, height);
cameraPath.positions[0].height = Mathf.Lerp(10, 26, height);
cameraPath.positions[0].duration = 2f;
anim.DoScaledAnimationAsync(miss ? "BadOut_SeeReact" : "Jump_OutIn_Start", 0.5f);
if (see) return;
BeatAction.New(this, new List<BeatAction.Action>()
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
{
new BeatAction.Action(beat + 1, delegate { anim.DoScaledAnimationAsync("Jump_OutIn_Transform", 0.5f); })
});
break;
case JumpState.HighInOut:
currentPath = game.GetPath(see ? "SeeHighInOut" : "SawHighInOut");
currentPath.positions[0].height = Mathf.Lerp(9, 20, height);
cameraPath.positions[0].height = Mathf.Lerp(7, 18, height);
cameraPath.positions[0].duration = 1f;
anim.DoScaledAnimationAsync(miss ? "BadIn_SeeReact" : "Jump_InIn_Start", 0.5f);
if (see) return;
BeatAction.New(this, new List<BeatAction.Action>()
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
{
new BeatAction.Action(beat + 0.5f, delegate { anim.DoScaledAnimationAsync("Jump_OutOut_Transform", 0.5f); })
});
break;
case JumpState.HighInIn:
currentPath = game.GetPath(see ? "SeeHighInIn" : "SawHighInIn");
currentPath.positions[0].height = Mathf.Lerp(9, 20, height);
cameraPath.positions[0].height = Mathf.Lerp(7, 18, height);
cameraPath.positions[0].duration = 1f;
anim.DoScaledAnimationAsync(miss ? "BadIn_SeeReact" : "Jump_InIn_Start", 0.5f);
if (see) return;
BeatAction.New(this, new List<BeatAction.Action>()
See Saw (#423) * Basic Set Up * See Saw - Init, Rod Anims * Got some basic code down * Got the basics down * The man won't jump now unless he is ready! * High jumps added * Fixed a bug * See Saw - Base Animation Stuff * See Saw - The Hard Animations fuck fuck fuc, fuck * See saw more animations yeah * im almost done * home stretch baby * See Saw - wait what do you mean i'm done * Basic setup for curves * Jump start curve is in * smol figs * OutOut curves * They now how to get up now, may need tweaking * InIn curves added * Implemented more curves * Added ground jumps * Saw properly positions himself * Fixed an issue with see not landing correctly out or in * See reacts to you missing now * High jumps + get up plays at the correct moment now * Tweaks to high jumps * particles and missing stuff * anims * new sheet and anim fixes * oops * bigger background * Oops. Again * more anim fixes sorry * see saw tweaks and visual additions also added a way to scale particle systems to the tempo * bg color change added * Bops and choke added * Fix * lightning anim * particle particle particle * See saw - implemented lightning anim and fixed logic * Gradient is now actually a gradient * Implemented inverted colors on the see saw guys * Recolorable See saw! * Tiny tweak * Some things that weren't recolorable are now recolorable * Fixed a bug with the bg * new sheet the end * Barelies fixed --------- Co-authored-by: saladplainzone <chocolate2890mail@gmail.com> Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
2023-05-19 22:20:57 +00:00
{
new BeatAction.Action(beat + 0.5f, delegate { anim.DoScaledAnimationAsync("Jump_OutIn_Transform", 0.5f); })
});
break;
default:
break;
}
}
}
}