Refactored Space Soccer scripts

most of the refactoring is in the ball script, and the changes for the kicker and space soccer scripts are mostly in response to the refactoring.
This commit is contained in:
Slaith
2022-02-25 23:27:51 -08:00
parent fd748e8309
commit 40dbb70bb5
6 changed files with 245 additions and 238 deletions

View File

@ -42,9 +42,7 @@ namespace RhythmHeavenMania.Games.SpaceSoccer
private void Update()
{
if (ballDispensed)
{
}
}
public void Dispense(float beat)
@ -58,27 +56,10 @@ namespace RhythmHeavenMania.Games.SpaceSoccer
ballDispensed = true;
GameObject ball = Instantiate(ballRef, transform);
ball.SetActive(true);
Ball ball_ = ball.GetComponent<Ball>();
ball_.kicker = kicker;
ball_.dispensedBeat = beat;
ball_.dispensing = true;
kicker.ball = ball_;
kicker.dispenserBeat = beat;
kicker.kickTimes = 0;
ball_.Init(kicker, beat);
}
MultiSound.Play(new MultiSound.Sound[]
{
new MultiSound.Sound("spaceSoccer/dispenseNoise", beat),
new MultiSound.Sound("spaceSoccer/dispenseTumble1", beat + 0.25f),
new MultiSound.Sound("spaceSoccer/dispenseTumble2", beat + 0.5f),
new MultiSound.Sound("spaceSoccer/dispenseTumble2B",beat + 0.5f),
new MultiSound.Sound("spaceSoccer/dispenseTumble3", beat + 0.75f),
new MultiSound.Sound("spaceSoccer/dispenseTumble4", beat + 1f),
new MultiSound.Sound("spaceSoccer/dispenseTumble5", beat + 1.25f),
new MultiSound.Sound("spaceSoccer/dispenseTumble6", beat + 1.5f),
new MultiSound.Sound("spaceSoccer/dispenseTumble6B",beat + 1.75f),
});
}
}