mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 08:37:37 +02:00
add y-offset functionality to start position offset
This commit is contained in:
@ -160,7 +160,7 @@ namespace HeavenStudio.Games
|
||||
{
|
||||
instance = this;
|
||||
KarateManPotNew.ResetLastCombo();
|
||||
cameraPosition = CameraPosition[0].position;
|
||||
cameraPosition = CameraPosition[1].position;
|
||||
}
|
||||
|
||||
private void Start()
|
||||
@ -177,10 +177,10 @@ namespace HeavenStudio.Games
|
||||
{
|
||||
|
||||
string outSound;
|
||||
if (Starpelly.Mathp.GetDecimalFromFloat(beat) == 0f)
|
||||
outSound = "karateman/objectOut";
|
||||
else
|
||||
if (Starpelly.Mathp.GetDecimalFromFloat(beat + 0.5f) == 0f)
|
||||
outSound = "karateman/offbeatObjectOut";
|
||||
else
|
||||
outSound = "karateman/objectOut";
|
||||
|
||||
switch (type)
|
||||
{
|
||||
@ -188,10 +188,10 @@ namespace HeavenStudio.Games
|
||||
CreateItemInstance(beat, "Item00");
|
||||
break;
|
||||
case (int) HitType.Lightbulb:
|
||||
if (Starpelly.Mathp.GetDecimalFromFloat(beat) == 0f)
|
||||
outSound = "karateman/lightbulbOut";
|
||||
else
|
||||
if (Starpelly.Mathp.GetDecimalFromFloat(beat + 0.5f) == 0f)
|
||||
outSound = "karateman/offbeatLightbulbOut";
|
||||
else
|
||||
outSound = "karateman/lightbulbOut";
|
||||
CreateItemInstance(beat, "Item01", KarateManPotNew.ItemType.Bulb);
|
||||
break;
|
||||
case (int) HitType.Rock:
|
||||
@ -219,10 +219,10 @@ namespace HeavenStudio.Games
|
||||
public void CreateBulbSpecial(float beat, int type, Color c)
|
||||
{
|
||||
string outSound;
|
||||
if (Starpelly.Mathp.GetDecimalFromFloat(beat) == 0f)
|
||||
outSound = "karateman/lightbulbOut";
|
||||
else
|
||||
if (Starpelly.Mathp.GetDecimalFromFloat(beat + 0.5f) == 0f)
|
||||
outSound = "karateman/offbeatLightbulbOut";
|
||||
else
|
||||
outSound = "karateman/lightbulbOut";
|
||||
var mobj = CreateItemInstance(beat, "Item01", KarateManPotNew.ItemType.Bulb);
|
||||
if (type == (int) LightBulbType.Custom)
|
||||
mobj.GetComponent<KarateManPotNew>().SetBulbColor(c);
|
||||
|
@ -86,7 +86,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
Vector3 endPosition = hitPosition - StartPositionOffset[path];
|
||||
Vector3 flyPosition = new Vector3(
|
||||
Mathf.Lerp(startPosition.x, endPosition.x, progress),
|
||||
floorHeight + (HitPosition[path].position.y - floorHeight) * flyHeight,
|
||||
floorHeight + (HitPosition[path].position.y - floorHeight + (StartPositionOffset[path].y * (1 - Mathf.Min(cond.GetPositionFromBeat(startBeat, 1f), 1f)))) * flyHeight,
|
||||
Mathf.Lerp(startPosition.z, endPosition.z, progress)
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user