Second Contact (#363)

* second contact sprites

* Started rewriting

* Sound stuff

* foreigner textbox

* default miss message

* implement basic player textbox

* transparency support for textbox

refactor function labels to use C# convention

* avoid double function call with mistranslation

* add mistranslation textbox

* fix logic with trailing translation

* auto-positioning of translated text content

* auto-hide textboxes on start

* icon

* Added two new helper functions for pitching with semitones and cents

* All new sounds should be in now

* bunch of visual fixes

* Fixed stuff being innaccurate

* Repeating voicelines begone!

* Thump sound for bob man

* Put an animator on the crowd

* Fixed missing sprites

* Fixed anim not playing sometimes on barely

* Changed length of pass turn event from 0.5 to 1 beat long

* Downscaled Sprites

yippee

* Auto look at

* Fixed bob's textbox not appearing sometimes

* Fixed some small things

---------

Co-authored-by: Rapandrasmus <78219215+Rapandrasmus@users.noreply.github.com>
Co-authored-by: minenice55 <star.elementa@gmail.com>
Co-authored-by: Seanski2 <seanbenedit@gmail.com>
This commit is contained in:
ev
2023-03-26 23:09:55 -04:00
committed by GitHub
parent f2583d5414
commit e8aa00c5a8
191 changed files with 18835 additions and 17486 deletions

View File

@ -184,7 +184,7 @@ namespace HeavenStudio.Games
public RocketType type;
public float beat;
public float offSet;
public List<float> notes;
public List<int> notes;
}
private static List<QueuedRocket> queuedRockets = new List<QueuedRocket>();
@ -352,7 +352,7 @@ namespace HeavenStudio.Games
}
}
public void SpawnRocket(float beat, float beatOffset, RocketType type, List<float> notes)
public void SpawnRocket(float beat, float beatOffset, RocketType type, List<int> notes)
{
GameObject rocketToSpawn = rocket;
switch (type)
@ -372,7 +372,12 @@ namespace HeavenStudio.Games
}
GameObject spawnedRocket = Instantiate(rocketToSpawn, spawnPad, false);
var rocketScript = spawnedRocket.GetComponent<LaunchPartyRocket>();
rocketScript.pitches.AddRange(notes);
List<float> pitchedNotes = new List<float>();
foreach (var note in notes)
{
pitchedNotes.Add(Jukebox.GetPitchFromSemiTones(note, true));
}
rocketScript.pitches.AddRange(pitchedNotes);
switch (type)
{
case RocketType.Family:
@ -396,12 +401,12 @@ namespace HeavenStudio.Games
public static void LaunchRocket(float beat, float beatOffset, int noteOne, int noteTwo, int noteThree, int noteFour)
{
List<float> pitches = new List<float>()
List<int> pitches = new List<int>()
{
Mathf.Pow(2f, (1f / 12f) * noteOne) * Conductor.instance.musicSource.pitch,
Mathf.Pow(2f, (1f / 12f) * noteTwo) * Conductor.instance.musicSource.pitch,
Mathf.Pow(2f, (1f / 12f) * noteThree) * Conductor.instance.musicSource.pitch,
Mathf.Pow(2f, (1f / 12f) * noteFour) * Conductor.instance.musicSource.pitch
noteOne,
noteTwo,
noteThree,
noteFour
};
if (GameManager.instance.currentGame == "launchParty")
{
@ -415,14 +420,14 @@ namespace HeavenStudio.Games
public static void LaunchPartyCracker(float beat, float beatOffset, int noteOne, int noteTwo, int noteThree, int noteFour, int noteFive, int noteSix)
{
List<float> pitches = new List<float>()
List<int> pitches = new List<int>()
{
Mathf.Pow(2f, (1f / 12f) * noteOne) * Conductor.instance.musicSource.pitch,
Mathf.Pow(2f, (1f / 12f) * noteTwo) * Conductor.instance.musicSource.pitch,
Mathf.Pow(2f, (1f / 12f) * noteThree) * Conductor.instance.musicSource.pitch,
Mathf.Pow(2f, (1f / 12f) * noteFour) * Conductor.instance.musicSource.pitch,
Mathf.Pow(2f, (1f / 12f) * noteFive) * Conductor.instance.musicSource.pitch,
Mathf.Pow(2f, (1f / 12f) * noteSix) * Conductor.instance.musicSource.pitch,
noteOne,
noteTwo,
noteThree,
noteFour,
noteFive,
noteSix,
};
if (GameManager.instance.currentGame == "launchParty")
{
@ -436,17 +441,17 @@ namespace HeavenStudio.Games
public static void LaunchBell(float beat, float beatOffset, int noteOne, int noteTwo, int noteThree, int noteFour, int noteFive, int noteSix, int noteSeven, int noteEight, int noteNine)
{
List<float> pitches = new List<float>()
List<int> pitches = new List<int>()
{
Mathf.Pow(2f, (1f / 12f) * noteOne) * Conductor.instance.musicSource.pitch,
Mathf.Pow(2f, (1f / 12f) * noteTwo) * Conductor.instance.musicSource.pitch,
Mathf.Pow(2f, (1f / 12f) * noteThree) * Conductor.instance.musicSource.pitch,
Mathf.Pow(2f, (1f / 12f) * noteFour) * Conductor.instance.musicSource.pitch,
Mathf.Pow(2f, (1f / 12f) * noteFive) * Conductor.instance.musicSource.pitch,
Mathf.Pow(2f, (1f / 12f) * noteSix) * Conductor.instance.musicSource.pitch,
Mathf.Pow(2f, (1f / 12f) * noteSeven) * Conductor.instance.musicSource.pitch,
Mathf.Pow(2f, (1f / 12f) * noteEight) * Conductor.instance.musicSource.pitch,
Mathf.Pow(2f, (1f / 12f) * noteNine) * Conductor.instance.musicSource.pitch,
noteOne,
noteTwo,
noteThree,
noteFour,
noteFive,
noteSix,
noteSeven,
noteEight,
noteNine
};
if (GameManager.instance.currentGame == "launchParty")
{
@ -461,23 +466,23 @@ namespace HeavenStudio.Games
public static void LaunchBowlingPin(float beat, float beatOffset, int noteOne, int noteTwo, int noteThree, int noteFour, int noteFive, int noteSix, int noteSeven,
int noteEight, int noteNine, int noteTen, int noteEleven, int noteTwelve, int noteThirteen, int noteFourteen, int noteFifteen)
{
List<float> pitches = new List<float>()
List<int> pitches = new List<int>()
{
Mathf.Pow(2f, (1f / 12f) * noteOne) * Conductor.instance.musicSource.pitch,
Mathf.Pow(2f, (1f / 12f) * noteTwo) * Conductor.instance.musicSource.pitch,
Mathf.Pow(2f, (1f / 12f) * noteThree) * Conductor.instance.musicSource.pitch,
Mathf.Pow(2f, (1f / 12f) * noteFour) * Conductor.instance.musicSource.pitch,
Mathf.Pow(2f, (1f / 12f) * noteFive) * Conductor.instance.musicSource.pitch,
Mathf.Pow(2f, (1f / 12f) * noteSix) * Conductor.instance.musicSource.pitch,
Mathf.Pow(2f, (1f / 12f) * noteSeven) * Conductor.instance.musicSource.pitch,
Mathf.Pow(2f, (1f / 12f) * noteEight) * Conductor.instance.musicSource.pitch,
Mathf.Pow(2f, (1f / 12f) * noteNine) * Conductor.instance.musicSource.pitch,
Mathf.Pow(2f, (1f / 12f) * noteTen) * Conductor.instance.musicSource.pitch,
Mathf.Pow(2f, (1f / 12f) * noteEleven) * Conductor.instance.musicSource.pitch,
Mathf.Pow(2f, (1f / 12f) * noteTwelve) * Conductor.instance.musicSource.pitch,
Mathf.Pow(2f, (1f / 12f) * noteThirteen) * Conductor.instance.musicSource.pitch,
Mathf.Pow(2f, (1f / 12f) * noteFourteen) * Conductor.instance.musicSource.pitch,
Mathf.Pow(2f, (1f / 12f) * noteFifteen) * Conductor.instance.musicSource.pitch,
noteOne,
noteTwo,
noteThree,
noteFour,
noteFive,
noteSix,
noteSeven,
noteEight,
noteNine,
noteTen,
noteEleven,
noteTwelve,
noteThirteen,
noteFourteen,
noteFifteen
};
if (GameManager.instance.currentGame == "launchParty")
{