HeavenStudioPlus/Assets/Scripts/Games/MrUpbeat/MrUpbeat.cs

320 lines
12 KiB
C#
Raw Normal View History

2022-03-04 20:47:40 +00:00
using System.Collections;
using System.Collections.Generic;
using System.Linq;
2022-03-04 20:47:40 +00:00
using UnityEngine;
using System;
using DG.Tweening;
2022-03-04 20:47:40 +00:00
2022-03-14 14:21:05 +00:00
using HeavenStudio.Util;
2022-03-04 20:47:40 +00:00
namespace HeavenStudio.Games.Loaders
{
using static Minigames;
public static class AgbUpbeatLoader
{
public static Minigame AddGame(EventCaller eventCaller) {
return new Minigame("mrUpbeat", "Mr. Upbeat", "E0E0E0", false, false, new List<GameAction>()
{
new GameAction("prepare", "Prepare")
{
preFunction = delegate {
var e = eventCaller.currentEntity;
MrUpbeat.StartStepping(e.beat, e.length);
},
Playable lockstep + Mr. Upbeat fix! (Lockstep is missing recolorable switchsteppers, many of them, and bach portraits) (#227) * Added sfx, sprites and folders neccesary. And also made an empty game object for working dough * Started work on the background * Implemented all unanimated sprites * Added Init * Added Prefabs * Added Jumping and Idle Animatins for the Dough Dudes * SmallFix * Start Interval Event Implemented * Added Audio and Small and Big Ball events * Code Improvement + starting making the balls * Added bezier curves * Added First Rendition of Balls * Added NPC Balls and starting doing small transporting animations * SmallFixes * SmallSoundChanges * Implemented Audio and prefunction, not done with it though * In process of fixing set interval * Added more prefunction stuff and also started working on player input * Tried adding player balls, not done, many bugs to fix * Reverted trying to make the playerenterdoughball handle inputs, gonna do it through the main script instead * Sat up input code for later * Input works now! Need to add barely and wrong input animations and fix bugs * Tiny fix * Added first draft of wronginput animations * Finished all input anims, trying to fix bugs * Added finished Spaceship animations * Added Mr Game and Watch WIP and lifting dough dudes * Finished GANDW, fixed some bugs and still fixing bugs, almost done! * DONE * Begun development on tambourine * Working Dough Polish * Added many animations for tambourine * Added Events * Inputs added, near completion * Miss Anims * Animation changes * DONE * fix * FIXED??? * FIXED FOR REAL * Begun fixing lockstep, just needs small fixes and features * Smol fix-ish * Started work on mr upbeat * MrUpbeat fixed, finishing up lockstep * Added BG to lockstep * Added bg colour change * Done with my part
2023-01-23 22:48:05 +00:00
defaultLength = 4f,
resizable = true,
2022-08-21 03:13:52 +00:00
},
new GameAction("ding", "Ding!")
2022-08-21 03:13:52 +00:00
{
preFunction = delegate {
var e = eventCaller.currentEntity;
MrUpbeat.Ding(e.beat, e["toggle"], e["stopBlipping"]);
},
defaultLength = 0.5f,
parameters = new List<Param>()
{
new Param("toggle", false, "Applause", "Plays an applause sound effect."),
new Param("stopBlipping", true, "Stop Blipping?", "When the stepping stops, should the blipping stop too?"),
},
preFunctionLength = 1f,
},
new GameAction("changeBG", "Change Background Color")
{
function = delegate {
var e = eventCaller.currentEntity;
MrUpbeat.instance.FadeBackgroundColor(e["start"], e["end"], e.length, e["toggle"]);
},
resizable = true,
parameters = new List<Param>()
{
new Param("start", new Color(0.878f, 0.878f, 0.878f), "Start Color", "The start color for the fade or the color that will be switched to if -instant- is ticked on."),
new Param("end", new Color(0.878f, 0.878f, 0.878f), "End Color", "The end color for the fade."),
new Param("toggle", false, "Instant", "Should the background instantly change color?")
}
},
new GameAction("upbeatColors", "Upbeat Colors")
{
function = delegate {
var e = eventCaller.currentEntity;
MrUpbeat.instance.UpbeatColors(e["blipColor"], e["setShadow"], e["shadowColor"]);
},
defaultLength = 0.5f,
parameters = new List<Param>()
{
new Param("blipColor", new Color(0, 1f, 0), "Blip Color", "Change blip color"),
new Param("setShadow", false, "Set Shadow Color?", "Should Mr. Upbeat's shadow be custom?"),
new Param("shadowColor", new Color(1f, 1f, 1f, 0), "Shadow Color", "If \"Set Shadow Color\" is checked, this will set the shadow's color."),
}
2022-08-21 03:13:52 +00:00
},
new GameAction("blipEvents", "Blip Events")
2022-08-21 03:13:52 +00:00
{
function = delegate {
var e = eventCaller.currentEntity;
MrUpbeat.instance.BlipEvents(e["letter"], e["shouldGrow"], e["resetBlip"], e["blip"]);
},
Playable lockstep + Mr. Upbeat fix! (Lockstep is missing recolorable switchsteppers, many of them, and bach portraits) (#227) * Added sfx, sprites and folders neccesary. And also made an empty game object for working dough * Started work on the background * Implemented all unanimated sprites * Added Init * Added Prefabs * Added Jumping and Idle Animatins for the Dough Dudes * SmallFix * Start Interval Event Implemented * Added Audio and Small and Big Ball events * Code Improvement + starting making the balls * Added bezier curves * Added First Rendition of Balls * Added NPC Balls and starting doing small transporting animations * SmallFixes * SmallSoundChanges * Implemented Audio and prefunction, not done with it though * In process of fixing set interval * Added more prefunction stuff and also started working on player input * Tried adding player balls, not done, many bugs to fix * Reverted trying to make the playerenterdoughball handle inputs, gonna do it through the main script instead * Sat up input code for later * Input works now! Need to add barely and wrong input animations and fix bugs * Tiny fix * Added first draft of wronginput animations * Finished all input anims, trying to fix bugs * Added finished Spaceship animations * Added Mr Game and Watch WIP and lifting dough dudes * Finished GANDW, fixed some bugs and still fixing bugs, almost done! * DONE * Begun development on tambourine * Working Dough Polish * Added many animations for tambourine * Added Events * Inputs added, near completion * Miss Anims * Animation changes * DONE * fix * FIXED??? * FIXED FOR REAL * Begun fixing lockstep, just needs small fixes and features * Smol fix-ish * Started work on mr upbeat * MrUpbeat fixed, finishing up lockstep * Added BG to lockstep * Added bg colour change * Done with my part
2023-01-23 22:48:05 +00:00
defaultLength = 0.5f,
2022-08-21 03:13:52 +00:00
parameters = new List<Param>()
{
new Param("letter", "", "Letter To Appear", "Which letter to appear on the blip"),
new Param("shouldGrow", true, "Grow Antenna?", "Should Mr. Upbeat's antenna grow every blip?"),
new Param("resetBlip", false, "Reset Antenna?", "Should Mr. Upbeat's antenna reset?"),
new Param("blip", true, "Should Blip?", "Should Mr. Upbeat blip every offbeat?"),
2022-08-21 03:13:52 +00:00
}
},
// will implement these soon
new GameAction("fourBeatCountInOffbeat", "4 Beat Count-In")
{
preFunction = delegate {
var e = eventCaller.currentEntity;
//MrUpbeat.CountIn(e.beat, e.length);
},
defaultLength = 4f,
resizable = true,
hidden = true,
},
new GameAction("countOffbeat", "4 Beat Count-In")
{
//function = delegate { MrUpbeat.Count(eventCaller.currentEntity["number"]); },
parameters = new List<Param>()
{
new Param("number", SoundEffects.CountNumbers.One, "Number", "The sound to play"),
},
hidden = true,
},
// backwards compatibility !!!!
new GameAction("start stepping", "Start Stepping")
{
hidden = true,
preFunction = delegate {var e = eventCaller.currentEntity; MrUpbeat.StartStepping(e.beat, e.length); },
resizable = true,
},
},
new List<string>() {"agb", "keep"},
"agboffbeat", "en",
new List<string>() {}
);
}
}
}
2022-03-14 14:21:05 +00:00
namespace HeavenStudio.Games
2022-03-04 20:47:40 +00:00
{
2022-03-12 04:10:13 +00:00
using Scripts_MrUpbeat;
2022-03-04 20:47:40 +00:00
public class MrUpbeat : Minigame
{
static List<float> queuedInputs = new List<float>();
[Header("References")]
[SerializeField] Animator metronomeAnim;
[SerializeField] UpbeatMan man;
[SerializeField] Material blipMaterial;
[SerializeField] SpriteRenderer bg;
[SerializeField] SpriteRenderer[] shadowSr;
[Header("Properties")]
private Tween bgColorTween;
public int stepIterate = 0;
public static bool shouldBlip;
static bool isStepping;
static bool shouldntStop;
2022-03-04 20:47:40 +00:00
public static MrUpbeat instance;
private void Awake()
{
instance = this;
isStepping = false;
blipMaterial.SetColor("_ColorBravo", new Color(0, 1f, 0));
}
private void Start()
{
man.Blip();
Playable lockstep + Mr. Upbeat fix! (Lockstep is missing recolorable switchsteppers, many of them, and bach portraits) (#227) * Added sfx, sprites and folders neccesary. And also made an empty game object for working dough * Started work on the background * Implemented all unanimated sprites * Added Init * Added Prefabs * Added Jumping and Idle Animatins for the Dough Dudes * SmallFix * Start Interval Event Implemented * Added Audio and Small and Big Ball events * Code Improvement + starting making the balls * Added bezier curves * Added First Rendition of Balls * Added NPC Balls and starting doing small transporting animations * SmallFixes * SmallSoundChanges * Implemented Audio and prefunction, not done with it though * In process of fixing set interval * Added more prefunction stuff and also started working on player input * Tried adding player balls, not done, many bugs to fix * Reverted trying to make the playerenterdoughball handle inputs, gonna do it through the main script instead * Sat up input code for later * Input works now! Need to add barely and wrong input animations and fix bugs * Tiny fix * Added first draft of wronginput animations * Finished all input anims, trying to fix bugs * Added finished Spaceship animations * Added Mr Game and Watch WIP and lifting dough dudes * Finished GANDW, fixed some bugs and still fixing bugs, almost done! * DONE * Begun development on tambourine * Working Dough Polish * Added many animations for tambourine * Added Events * Inputs added, near completion * Miss Anims * Animation changes * DONE * fix * FIXED??? * FIXED FOR REAL * Begun fixing lockstep, just needs small fixes and features * Smol fix-ish * Started work on mr upbeat * MrUpbeat fixed, finishing up lockstep * Added BG to lockstep * Added bg colour change * Done with my part
2023-01-23 22:48:05 +00:00
}
Playable lockstep + Mr. Upbeat fix! (Lockstep is missing recolorable switchsteppers, many of them, and bach portraits) (#227) * Added sfx, sprites and folders neccesary. And also made an empty game object for working dough * Started work on the background * Implemented all unanimated sprites * Added Init * Added Prefabs * Added Jumping and Idle Animatins for the Dough Dudes * SmallFix * Start Interval Event Implemented * Added Audio and Small and Big Ball events * Code Improvement + starting making the balls * Added bezier curves * Added First Rendition of Balls * Added NPC Balls and starting doing small transporting animations * SmallFixes * SmallSoundChanges * Implemented Audio and prefunction, not done with it though * In process of fixing set interval * Added more prefunction stuff and also started working on player input * Tried adding player balls, not done, many bugs to fix * Reverted trying to make the playerenterdoughball handle inputs, gonna do it through the main script instead * Sat up input code for later * Input works now! Need to add barely and wrong input animations and fix bugs * Tiny fix * Added first draft of wronginput animations * Finished all input anims, trying to fix bugs * Added finished Spaceship animations * Added Mr Game and Watch WIP and lifting dough dudes * Finished GANDW, fixed some bugs and still fixing bugs, almost done! * DONE * Begun development on tambourine * Working Dough Polish * Added many animations for tambourine * Added Events * Inputs added, near completion * Miss Anims * Animation changes * DONE * fix * FIXED??? * FIXED FOR REAL * Begun fixing lockstep, just needs small fixes and features * Smol fix-ish * Started work on mr upbeat * MrUpbeat fixed, finishing up lockstep * Added BG to lockstep * Added bg colour change * Done with my part
2023-01-23 22:48:05 +00:00
void OnDestroy()
{
if (!Conductor.instance.isPlaying || Conductor.instance.isPaused) {
Playable lockstep + Mr. Upbeat fix! (Lockstep is missing recolorable switchsteppers, many of them, and bach portraits) (#227) * Added sfx, sprites and folders neccesary. And also made an empty game object for working dough * Started work on the background * Implemented all unanimated sprites * Added Init * Added Prefabs * Added Jumping and Idle Animatins for the Dough Dudes * SmallFix * Start Interval Event Implemented * Added Audio and Small and Big Ball events * Code Improvement + starting making the balls * Added bezier curves * Added First Rendition of Balls * Added NPC Balls and starting doing small transporting animations * SmallFixes * SmallSoundChanges * Implemented Audio and prefunction, not done with it though * In process of fixing set interval * Added more prefunction stuff and also started working on player input * Tried adding player balls, not done, many bugs to fix * Reverted trying to make the playerenterdoughball handle inputs, gonna do it through the main script instead * Sat up input code for later * Input works now! Need to add barely and wrong input animations and fix bugs * Tiny fix * Added first draft of wronginput animations * Finished all input anims, trying to fix bugs * Added finished Spaceship animations * Added Mr Game and Watch WIP and lifting dough dudes * Finished GANDW, fixed some bugs and still fixing bugs, almost done! * DONE * Begun development on tambourine * Working Dough Polish * Added many animations for tambourine * Added Events * Inputs added, near completion * Miss Anims * Animation changes * DONE * fix * FIXED??? * FIXED FOR REAL * Begun fixing lockstep, just needs small fixes and features * Smol fix-ish * Started work on mr upbeat * MrUpbeat fixed, finishing up lockstep * Added BG to lockstep * Added bg colour change * Done with my part
2023-01-23 22:48:05 +00:00
if (queuedInputs.Count > 0) queuedInputs.Clear();
}
shouldBlip = false;
isStepping = false;
stepIterate = 0;
foreach (var evt in scheduledInputs)
{
evt.Disable();
}
2022-03-06 17:34:54 +00:00
}
2022-03-05 03:10:10 +00:00
Playable lockstep + Mr. Upbeat fix! (Lockstep is missing recolorable switchsteppers, many of them, and bach portraits) (#227) * Added sfx, sprites and folders neccesary. And also made an empty game object for working dough * Started work on the background * Implemented all unanimated sprites * Added Init * Added Prefabs * Added Jumping and Idle Animatins for the Dough Dudes * SmallFix * Start Interval Event Implemented * Added Audio and Small and Big Ball events * Code Improvement + starting making the balls * Added bezier curves * Added First Rendition of Balls * Added NPC Balls and starting doing small transporting animations * SmallFixes * SmallSoundChanges * Implemented Audio and prefunction, not done with it though * In process of fixing set interval * Added more prefunction stuff and also started working on player input * Tried adding player balls, not done, many bugs to fix * Reverted trying to make the playerenterdoughball handle inputs, gonna do it through the main script instead * Sat up input code for later * Input works now! Need to add barely and wrong input animations and fix bugs * Tiny fix * Added first draft of wronginput animations * Finished all input anims, trying to fix bugs * Added finished Spaceship animations * Added Mr Game and Watch WIP and lifting dough dudes * Finished GANDW, fixed some bugs and still fixing bugs, almost done! * DONE * Begun development on tambourine * Working Dough Polish * Added many animations for tambourine * Added Events * Inputs added, near completion * Miss Anims * Animation changes * DONE * fix * FIXED??? * FIXED FOR REAL * Begun fixing lockstep, just needs small fixes and features * Smol fix-ish * Started work on mr upbeat * MrUpbeat fixed, finishing up lockstep * Added BG to lockstep * Added bg colour change * Done with my part
2023-01-23 22:48:05 +00:00
public void Update()
2022-03-06 17:34:54 +00:00
{
if (Conductor.instance.isPlaying && !Conductor.instance.isPaused) {
if (queuedInputs.Count > 0) {
foreach (var input in queuedInputs) {
string dir = stepIterate % 2 == 1 ? "Right" : "Left";
BeatAction.New(instance.gameObject, new List<BeatAction.Action>() {
new BeatAction.Action(input, delegate {
instance.metronomeAnim.DoScaledAnimationAsync("MetronomeGo" + dir, 0.5f);
Jukebox.PlayOneShotGame("mrUpbeat/metronome" + dir);
ScheduleInput(input, 0.5f, InputType.STANDARD_DOWN, Success, Miss, Nothing);
if (MrUpbeat.shouldntStop) queuedInputs.Add(input + 1);
}),
});
stepIterate++;
}
Playable lockstep + Mr. Upbeat fix! (Lockstep is missing recolorable switchsteppers, many of them, and bach portraits) (#227) * Added sfx, sprites and folders neccesary. And also made an empty game object for working dough * Started work on the background * Implemented all unanimated sprites * Added Init * Added Prefabs * Added Jumping and Idle Animatins for the Dough Dudes * SmallFix * Start Interval Event Implemented * Added Audio and Small and Big Ball events * Code Improvement + starting making the balls * Added bezier curves * Added First Rendition of Balls * Added NPC Balls and starting doing small transporting animations * SmallFixes * SmallSoundChanges * Implemented Audio and prefunction, not done with it though * In process of fixing set interval * Added more prefunction stuff and also started working on player input * Tried adding player balls, not done, many bugs to fix * Reverted trying to make the playerenterdoughball handle inputs, gonna do it through the main script instead * Sat up input code for later * Input works now! Need to add barely and wrong input animations and fix bugs * Tiny fix * Added first draft of wronginput animations * Finished all input anims, trying to fix bugs * Added finished Spaceship animations * Added Mr Game and Watch WIP and lifting dough dudes * Finished GANDW, fixed some bugs and still fixing bugs, almost done! * DONE * Begun development on tambourine * Working Dough Polish * Added many animations for tambourine * Added Events * Inputs added, near completion * Miss Anims * Animation changes * DONE * fix * FIXED??? * FIXED FOR REAL * Begun fixing lockstep, just needs small fixes and features * Smol fix-ish * Started work on mr upbeat * MrUpbeat fixed, finishing up lockstep * Added BG to lockstep * Added bg colour change * Done with my part
2023-01-23 22:48:05 +00:00
queuedInputs.Clear();
}
if (PlayerInput.Pressed() && !IsExpectingInputNow(InputType.STANDARD_DOWN)) {
man.Step();
}
}
Playable lockstep + Mr. Upbeat fix! (Lockstep is missing recolorable switchsteppers, many of them, and bach portraits) (#227) * Added sfx, sprites and folders neccesary. And also made an empty game object for working dough * Started work on the background * Implemented all unanimated sprites * Added Init * Added Prefabs * Added Jumping and Idle Animatins for the Dough Dudes * SmallFix * Start Interval Event Implemented * Added Audio and Small and Big Ball events * Code Improvement + starting making the balls * Added bezier curves * Added First Rendition of Balls * Added NPC Balls and starting doing small transporting animations * SmallFixes * SmallSoundChanges * Implemented Audio and prefunction, not done with it though * In process of fixing set interval * Added more prefunction stuff and also started working on player input * Tried adding player balls, not done, many bugs to fix * Reverted trying to make the playerenterdoughball handle inputs, gonna do it through the main script instead * Sat up input code for later * Input works now! Need to add barely and wrong input animations and fix bugs * Tiny fix * Added first draft of wronginput animations * Finished all input anims, trying to fix bugs * Added finished Spaceship animations * Added Mr Game and Watch WIP and lifting dough dudes * Finished GANDW, fixed some bugs and still fixing bugs, almost done! * DONE * Begun development on tambourine * Working Dough Polish * Added many animations for tambourine * Added Events * Inputs added, near completion * Miss Anims * Animation changes * DONE * fix * FIXED??? * FIXED FOR REAL * Begun fixing lockstep, just needs small fixes and features * Smol fix-ish * Started work on mr upbeat * MrUpbeat fixed, finishing up lockstep * Added BG to lockstep * Added bg colour change * Done with my part
2023-01-23 22:48:05 +00:00
}
public static void Ding(float beat, bool applause, bool stopBlipping)
Playable lockstep + Mr. Upbeat fix! (Lockstep is missing recolorable switchsteppers, many of them, and bach portraits) (#227) * Added sfx, sprites and folders neccesary. And also made an empty game object for working dough * Started work on the background * Implemented all unanimated sprites * Added Init * Added Prefabs * Added Jumping and Idle Animatins for the Dough Dudes * SmallFix * Start Interval Event Implemented * Added Audio and Small and Big Ball events * Code Improvement + starting making the balls * Added bezier curves * Added First Rendition of Balls * Added NPC Balls and starting doing small transporting animations * SmallFixes * SmallSoundChanges * Implemented Audio and prefunction, not done with it though * In process of fixing set interval * Added more prefunction stuff and also started working on player input * Tried adding player balls, not done, many bugs to fix * Reverted trying to make the playerenterdoughball handle inputs, gonna do it through the main script instead * Sat up input code for later * Input works now! Need to add barely and wrong input animations and fix bugs * Tiny fix * Added first draft of wronginput animations * Finished all input anims, trying to fix bugs * Added finished Spaceship animations * Added Mr Game and Watch WIP and lifting dough dudes * Finished GANDW, fixed some bugs and still fixing bugs, almost done! * DONE * Begun development on tambourine * Working Dough Polish * Added many animations for tambourine * Added Events * Inputs added, near completion * Miss Anims * Animation changes * DONE * fix * FIXED??? * FIXED FOR REAL * Begun fixing lockstep, just needs small fixes and features * Smol fix-ish * Started work on mr upbeat * MrUpbeat fixed, finishing up lockstep * Added BG to lockstep * Added bg colour change * Done with my part
2023-01-23 22:48:05 +00:00
{
MrUpbeat.shouldntStop = false;
BeatAction.New(instance.gameObject, new List<BeatAction.Action>() {
new BeatAction.Action(beat, delegate {
MrUpbeat.isStepping = false;
Jukebox.PlayOneShotGame("mrUpbeat/ding");
if (applause) Jukebox.PlayOneShot("applause");
if (stopBlipping) MrUpbeat.shouldBlip = false;
}),
});
Playable lockstep + Mr. Upbeat fix! (Lockstep is missing recolorable switchsteppers, many of them, and bach portraits) (#227) * Added sfx, sprites and folders neccesary. And also made an empty game object for working dough * Started work on the background * Implemented all unanimated sprites * Added Init * Added Prefabs * Added Jumping and Idle Animatins for the Dough Dudes * SmallFix * Start Interval Event Implemented * Added Audio and Small and Big Ball events * Code Improvement + starting making the balls * Added bezier curves * Added First Rendition of Balls * Added NPC Balls and starting doing small transporting animations * SmallFixes * SmallSoundChanges * Implemented Audio and prefunction, not done with it though * In process of fixing set interval * Added more prefunction stuff and also started working on player input * Tried adding player balls, not done, many bugs to fix * Reverted trying to make the playerenterdoughball handle inputs, gonna do it through the main script instead * Sat up input code for later * Input works now! Need to add barely and wrong input animations and fix bugs * Tiny fix * Added first draft of wronginput animations * Finished all input anims, trying to fix bugs * Added finished Spaceship animations * Added Mr Game and Watch WIP and lifting dough dudes * Finished GANDW, fixed some bugs and still fixing bugs, almost done! * DONE * Begun development on tambourine * Working Dough Polish * Added many animations for tambourine * Added Events * Inputs added, near completion * Miss Anims * Animation changes * DONE * fix * FIXED??? * FIXED FOR REAL * Begun fixing lockstep, just needs small fixes and features * Smol fix-ish * Started work on mr upbeat * MrUpbeat fixed, finishing up lockstep * Added BG to lockstep * Added bg colour change * Done with my part
2023-01-23 22:48:05 +00:00
}
2022-03-06 17:34:54 +00:00
public static void StartStepping(float beat, float length)
Playable lockstep + Mr. Upbeat fix! (Lockstep is missing recolorable switchsteppers, many of them, and bach portraits) (#227) * Added sfx, sprites and folders neccesary. And also made an empty game object for working dough * Started work on the background * Implemented all unanimated sprites * Added Init * Added Prefabs * Added Jumping and Idle Animatins for the Dough Dudes * SmallFix * Start Interval Event Implemented * Added Audio and Small and Big Ball events * Code Improvement + starting making the balls * Added bezier curves * Added First Rendition of Balls * Added NPC Balls and starting doing small transporting animations * SmallFixes * SmallSoundChanges * Implemented Audio and prefunction, not done with it though * In process of fixing set interval * Added more prefunction stuff and also started working on player input * Tried adding player balls, not done, many bugs to fix * Reverted trying to make the playerenterdoughball handle inputs, gonna do it through the main script instead * Sat up input code for later * Input works now! Need to add barely and wrong input animations and fix bugs * Tiny fix * Added first draft of wronginput animations * Finished all input anims, trying to fix bugs * Added finished Spaceship animations * Added Mr Game and Watch WIP and lifting dough dudes * Finished GANDW, fixed some bugs and still fixing bugs, almost done! * DONE * Begun development on tambourine * Working Dough Polish * Added many animations for tambourine * Added Events * Inputs added, near completion * Miss Anims * Animation changes * DONE * fix * FIXED??? * FIXED FOR REAL * Begun fixing lockstep, just needs small fixes and features * Smol fix-ish * Started work on mr upbeat * MrUpbeat fixed, finishing up lockstep * Added BG to lockstep * Added bg colour change * Done with my part
2023-01-23 22:48:05 +00:00
{
if (MrUpbeat.isStepping) return;
MrUpbeat.isStepping = true;
if (GameManager.instance.currentGame != "mrUpbeat") {
Blipping(beat, length);
MrUpbeat.shouldBlip = true;
} else {
BeatAction.New(instance.gameObject, new List<BeatAction.Action>() {
new BeatAction.Action(MathF.Floor(beat), delegate {
MrUpbeat.shouldBlip = true;
}),
});
}
MrUpbeat.shouldntStop = true;
queuedInputs.Add(MathF.Floor(beat+length));
2022-03-05 03:10:10 +00:00
}
public static void Blipping(float beat, float length)
{
List<MultiSound.Sound> blips = new List<MultiSound.Sound>();
var switchGames = EventCaller.GetAllInGameManagerList("gameManager", new string[] { "switchGame" });
int whichSwitch = 0;
if (switchGames.Count != 0) {
for (int i = 0; i < switchGames.Count; i++) {
if (switchGames[i].beat > beat) {
whichSwitch = i;
break;
Playable lockstep + Mr. Upbeat fix! (Lockstep is missing recolorable switchsteppers, many of them, and bach portraits) (#227) * Added sfx, sprites and folders neccesary. And also made an empty game object for working dough * Started work on the background * Implemented all unanimated sprites * Added Init * Added Prefabs * Added Jumping and Idle Animatins for the Dough Dudes * SmallFix * Start Interval Event Implemented * Added Audio and Small and Big Ball events * Code Improvement + starting making the balls * Added bezier curves * Added First Rendition of Balls * Added NPC Balls and starting doing small transporting animations * SmallFixes * SmallSoundChanges * Implemented Audio and prefunction, not done with it though * In process of fixing set interval * Added more prefunction stuff and also started working on player input * Tried adding player balls, not done, many bugs to fix * Reverted trying to make the playerenterdoughball handle inputs, gonna do it through the main script instead * Sat up input code for later * Input works now! Need to add barely and wrong input animations and fix bugs * Tiny fix * Added first draft of wronginput animations * Finished all input anims, trying to fix bugs * Added finished Spaceship animations * Added Mr Game and Watch WIP and lifting dough dudes * Finished GANDW, fixed some bugs and still fixing bugs, almost done! * DONE * Begun development on tambourine * Working Dough Polish * Added many animations for tambourine * Added Events * Inputs added, near completion * Miss Anims * Animation changes * DONE * fix * FIXED??? * FIXED FOR REAL * Begun fixing lockstep, just needs small fixes and features * Smol fix-ish * Started work on mr upbeat * MrUpbeat fixed, finishing up lockstep * Added BG to lockstep * Added bg colour change * Done with my part
2023-01-23 22:48:05 +00:00
}
}
}
for (int i = 0; i < switchGames[whichSwitch].beat - MathF.Floor(beat) - 0.5f; i++) {
blips.Add(new MultiSound.Sound("mrUpbeat/blip", MathF.Floor(beat) + 0.5f + i));
}
MultiSound.Play(blips.ToArray(), forcePlay: true);
}
Playable lockstep + Mr. Upbeat fix! (Lockstep is missing recolorable switchsteppers, many of them, and bach portraits) (#227) * Added sfx, sprites and folders neccesary. And also made an empty game object for working dough * Started work on the background * Implemented all unanimated sprites * Added Init * Added Prefabs * Added Jumping and Idle Animatins for the Dough Dudes * SmallFix * Start Interval Event Implemented * Added Audio and Small and Big Ball events * Code Improvement + starting making the balls * Added bezier curves * Added First Rendition of Balls * Added NPC Balls and starting doing small transporting animations * SmallFixes * SmallSoundChanges * Implemented Audio and prefunction, not done with it though * In process of fixing set interval * Added more prefunction stuff and also started working on player input * Tried adding player balls, not done, many bugs to fix * Reverted trying to make the playerenterdoughball handle inputs, gonna do it through the main script instead * Sat up input code for later * Input works now! Need to add barely and wrong input animations and fix bugs * Tiny fix * Added first draft of wronginput animations * Finished all input anims, trying to fix bugs * Added finished Spaceship animations * Added Mr Game and Watch WIP and lifting dough dudes * Finished GANDW, fixed some bugs and still fixing bugs, almost done! * DONE * Begun development on tambourine * Working Dough Polish * Added many animations for tambourine * Added Events * Inputs added, near completion * Miss Anims * Animation changes * DONE * fix * FIXED??? * FIXED FOR REAL * Begun fixing lockstep, just needs small fixes and features * Smol fix-ish * Started work on mr upbeat * MrUpbeat fixed, finishing up lockstep * Added BG to lockstep * Added bg colour change * Done with my part
2023-01-23 22:48:05 +00:00
public void Success(PlayerActionEvent caller, float state)
2022-03-05 03:10:10 +00:00
{
Playable lockstep + Mr. Upbeat fix! (Lockstep is missing recolorable switchsteppers, many of them, and bach portraits) (#227) * Added sfx, sprites and folders neccesary. And also made an empty game object for working dough * Started work on the background * Implemented all unanimated sprites * Added Init * Added Prefabs * Added Jumping and Idle Animatins for the Dough Dudes * SmallFix * Start Interval Event Implemented * Added Audio and Small and Big Ball events * Code Improvement + starting making the balls * Added bezier curves * Added First Rendition of Balls * Added NPC Balls and starting doing small transporting animations * SmallFixes * SmallSoundChanges * Implemented Audio and prefunction, not done with it though * In process of fixing set interval * Added more prefunction stuff and also started working on player input * Tried adding player balls, not done, many bugs to fix * Reverted trying to make the playerenterdoughball handle inputs, gonna do it through the main script instead * Sat up input code for later * Input works now! Need to add barely and wrong input animations and fix bugs * Tiny fix * Added first draft of wronginput animations * Finished all input anims, trying to fix bugs * Added finished Spaceship animations * Added Mr Game and Watch WIP and lifting dough dudes * Finished GANDW, fixed some bugs and still fixing bugs, almost done! * DONE * Begun development on tambourine * Working Dough Polish * Added many animations for tambourine * Added Events * Inputs added, near completion * Miss Anims * Animation changes * DONE * fix * FIXED??? * FIXED FOR REAL * Begun fixing lockstep, just needs small fixes and features * Smol fix-ish * Started work on mr upbeat * MrUpbeat fixed, finishing up lockstep * Added BG to lockstep * Added bg colour change * Done with my part
2023-01-23 22:48:05 +00:00
man.Step();
}
2022-03-04 20:47:40 +00:00
Playable lockstep + Mr. Upbeat fix! (Lockstep is missing recolorable switchsteppers, many of them, and bach portraits) (#227) * Added sfx, sprites and folders neccesary. And also made an empty game object for working dough * Started work on the background * Implemented all unanimated sprites * Added Init * Added Prefabs * Added Jumping and Idle Animatins for the Dough Dudes * SmallFix * Start Interval Event Implemented * Added Audio and Small and Big Ball events * Code Improvement + starting making the balls * Added bezier curves * Added First Rendition of Balls * Added NPC Balls and starting doing small transporting animations * SmallFixes * SmallSoundChanges * Implemented Audio and prefunction, not done with it though * In process of fixing set interval * Added more prefunction stuff and also started working on player input * Tried adding player balls, not done, many bugs to fix * Reverted trying to make the playerenterdoughball handle inputs, gonna do it through the main script instead * Sat up input code for later * Input works now! Need to add barely and wrong input animations and fix bugs * Tiny fix * Added first draft of wronginput animations * Finished all input anims, trying to fix bugs * Added finished Spaceship animations * Added Mr Game and Watch WIP and lifting dough dudes * Finished GANDW, fixed some bugs and still fixing bugs, almost done! * DONE * Begun development on tambourine * Working Dough Polish * Added many animations for tambourine * Added Events * Inputs added, near completion * Miss Anims * Animation changes * DONE * fix * FIXED??? * FIXED FOR REAL * Begun fixing lockstep, just needs small fixes and features * Smol fix-ish * Started work on mr upbeat * MrUpbeat fixed, finishing up lockstep * Added BG to lockstep * Added bg colour change * Done with my part
2023-01-23 22:48:05 +00:00
public void Miss(PlayerActionEvent caller)
2022-03-06 19:48:39 +00:00
{
Playable lockstep + Mr. Upbeat fix! (Lockstep is missing recolorable switchsteppers, many of them, and bach portraits) (#227) * Added sfx, sprites and folders neccesary. And also made an empty game object for working dough * Started work on the background * Implemented all unanimated sprites * Added Init * Added Prefabs * Added Jumping and Idle Animatins for the Dough Dudes * SmallFix * Start Interval Event Implemented * Added Audio and Small and Big Ball events * Code Improvement + starting making the balls * Added bezier curves * Added First Rendition of Balls * Added NPC Balls and starting doing small transporting animations * SmallFixes * SmallSoundChanges * Implemented Audio and prefunction, not done with it though * In process of fixing set interval * Added more prefunction stuff and also started working on player input * Tried adding player balls, not done, many bugs to fix * Reverted trying to make the playerenterdoughball handle inputs, gonna do it through the main script instead * Sat up input code for later * Input works now! Need to add barely and wrong input animations and fix bugs * Tiny fix * Added first draft of wronginput animations * Finished all input anims, trying to fix bugs * Added finished Spaceship animations * Added Mr Game and Watch WIP and lifting dough dudes * Finished GANDW, fixed some bugs and still fixing bugs, almost done! * DONE * Begun development on tambourine * Working Dough Polish * Added many animations for tambourine * Added Events * Inputs added, near completion * Miss Anims * Animation changes * DONE * fix * FIXED??? * FIXED FOR REAL * Begun fixing lockstep, just needs small fixes and features * Smol fix-ish * Started work on mr upbeat * MrUpbeat fixed, finishing up lockstep * Added BG to lockstep * Added bg colour change * Done with my part
2023-01-23 22:48:05 +00:00
man.Fall();
2022-03-06 19:48:39 +00:00
}
public void ChangeBackgroundColor(Color color, float beats)
{
var seconds = Conductor.instance.secPerBeat * beats;
if (bgColorTween != null)
bgColorTween.Kill(true);
if (seconds == 0) {
bg.color = color;
} else {
bgColorTween = bg.DOColor(color, seconds);
}
}
public void FadeBackgroundColor(Color start, Color end, float beats, bool instant)
{
ChangeBackgroundColor(start, 0f);
if (!instant) ChangeBackgroundColor(end, beats);
}
public void UpbeatColors(Color blipColor, bool setShadow, Color shadowColor)
{
blipMaterial.SetColor("_ColorBravo", blipColor);
if (setShadow) foreach (var shadow in shadowSr) {
shadow.color = new Color(shadowColor.r, shadowColor.g, shadowColor.b, 1);
}
}
public void BlipEvents(string inputLetter, bool shouldGrow, bool resetBlip, bool blip)
{
man.shouldGrow = shouldGrow;
if (resetBlip) {
man.blipSize = 0;
man.shouldGrow = false;
}
man.blipString = inputLetter;
shouldBlip = blip;
}
/*
public static void Count(int number)
{
Jukebox.PlayOneShotGame("mrUpbeat/count"+(number + 1), forcePlay: true);
}
public static void CountIn(float beat, float length)
{
var sound = new List<MultiSound.Sound>() {
};
MultiSound.Play(sound.ToArray(), forcePlay: true);
}
*/
Playable lockstep + Mr. Upbeat fix! (Lockstep is missing recolorable switchsteppers, many of them, and bach portraits) (#227) * Added sfx, sprites and folders neccesary. And also made an empty game object for working dough * Started work on the background * Implemented all unanimated sprites * Added Init * Added Prefabs * Added Jumping and Idle Animatins for the Dough Dudes * SmallFix * Start Interval Event Implemented * Added Audio and Small and Big Ball events * Code Improvement + starting making the balls * Added bezier curves * Added First Rendition of Balls * Added NPC Balls and starting doing small transporting animations * SmallFixes * SmallSoundChanges * Implemented Audio and prefunction, not done with it though * In process of fixing set interval * Added more prefunction stuff and also started working on player input * Tried adding player balls, not done, many bugs to fix * Reverted trying to make the playerenterdoughball handle inputs, gonna do it through the main script instead * Sat up input code for later * Input works now! Need to add barely and wrong input animations and fix bugs * Tiny fix * Added first draft of wronginput animations * Finished all input anims, trying to fix bugs * Added finished Spaceship animations * Added Mr Game and Watch WIP and lifting dough dudes * Finished GANDW, fixed some bugs and still fixing bugs, almost done! * DONE * Begun development on tambourine * Working Dough Polish * Added many animations for tambourine * Added Events * Inputs added, near completion * Miss Anims * Animation changes * DONE * fix * FIXED??? * FIXED FOR REAL * Begun fixing lockstep, just needs small fixes and features * Smol fix-ish * Started work on mr upbeat * MrUpbeat fixed, finishing up lockstep * Added BG to lockstep * Added bg colour change * Done with my part
2023-01-23 22:48:05 +00:00
public void Nothing(PlayerActionEvent caller) {}
2022-03-04 20:47:40 +00:00
}
}