mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-30 05:23:06 +00:00
add y-offset functionality to start position offset
This commit is contained in:
parent
a583529087
commit
e6e797a85e
3 changed files with 16 additions and 16 deletions
|
@ -1654,7 +1654,7 @@ SpriteRenderer:
|
||||||
m_Size: {x: 5.12, y: 5.12}
|
m_Size: {x: 5.12, y: 5.12}
|
||||||
m_AdaptiveModeThreshold: 0.5
|
m_AdaptiveModeThreshold: 0.5
|
||||||
m_SpriteTileMode: 0
|
m_SpriteTileMode: 0
|
||||||
m_WasSpriteAssigned: 1
|
m_WasSpriteAssigned: 0
|
||||||
m_MaskInteraction: 0
|
m_MaskInteraction: 0
|
||||||
m_SpriteSortPoint: 0
|
m_SpriteSortPoint: 0
|
||||||
--- !u!1 &2977027034337794333
|
--- !u!1 &2977027034337794333
|
||||||
|
@ -1737,7 +1737,7 @@ GameObject:
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 0
|
m_IsActive: 1
|
||||||
--- !u!4 &5764267227668832721
|
--- !u!4 &5764267227668832721
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -2725,14 +2725,14 @@ MonoBehaviour:
|
||||||
- 0
|
- 0
|
||||||
- 0.65
|
- 0.65
|
||||||
- 0.825
|
- 0.825
|
||||||
- 0.999
|
- 0.65
|
||||||
- 0.8
|
- 0.8
|
||||||
- 0.625
|
- 0.625
|
||||||
StartPositionOffset:
|
StartPositionOffset:
|
||||||
- {x: 1.5, y: 0, z: -9}
|
- {x: 1.5, y: 0, z: -9}
|
||||||
- {x: 1.5, y: 0, z: -8}
|
- {x: 1.5, y: 0, z: -8}
|
||||||
- {x: 1, y: 0, z: -8.75}
|
- {x: 1, y: 0, z: -8.75}
|
||||||
- {x: -2.25, y: 0, z: -9.5}
|
- {x: -2.5, y: 4, z: -9.5}
|
||||||
- {x: 0.25, y: 0, z: -8.5}
|
- {x: 0.25, y: 0, z: -8.5}
|
||||||
- {x: 2.25, y: 0, z: -9.5}
|
- {x: 2.25, y: 0, z: -9.5}
|
||||||
ItemSlipRt:
|
ItemSlipRt:
|
||||||
|
@ -3711,7 +3711,7 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 7505887227269335280}
|
m_GameObject: {fileID: 7505887227269335280}
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0.92, y: -3.75, z: 0}
|
m_LocalPosition: {x: 0.92, y: -3.5, z: 0}
|
||||||
m_LocalScale: {x: 0.64, y: 0.64, z: 1}
|
m_LocalScale: {x: 0.64, y: 0.64, z: 1}
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 5764267227668832721}
|
m_Father: {fileID: 5764267227668832721}
|
||||||
|
|
|
@ -160,7 +160,7 @@ namespace HeavenStudio.Games
|
||||||
{
|
{
|
||||||
instance = this;
|
instance = this;
|
||||||
KarateManPotNew.ResetLastCombo();
|
KarateManPotNew.ResetLastCombo();
|
||||||
cameraPosition = CameraPosition[0].position;
|
cameraPosition = CameraPosition[1].position;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
|
@ -177,10 +177,10 @@ namespace HeavenStudio.Games
|
||||||
{
|
{
|
||||||
|
|
||||||
string outSound;
|
string outSound;
|
||||||
if (Starpelly.Mathp.GetDecimalFromFloat(beat) == 0f)
|
if (Starpelly.Mathp.GetDecimalFromFloat(beat + 0.5f) == 0f)
|
||||||
outSound = "karateman/objectOut";
|
|
||||||
else
|
|
||||||
outSound = "karateman/offbeatObjectOut";
|
outSound = "karateman/offbeatObjectOut";
|
||||||
|
else
|
||||||
|
outSound = "karateman/objectOut";
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
|
@ -188,10 +188,10 @@ namespace HeavenStudio.Games
|
||||||
CreateItemInstance(beat, "Item00");
|
CreateItemInstance(beat, "Item00");
|
||||||
break;
|
break;
|
||||||
case (int) HitType.Lightbulb:
|
case (int) HitType.Lightbulb:
|
||||||
if (Starpelly.Mathp.GetDecimalFromFloat(beat) == 0f)
|
if (Starpelly.Mathp.GetDecimalFromFloat(beat + 0.5f) == 0f)
|
||||||
outSound = "karateman/lightbulbOut";
|
|
||||||
else
|
|
||||||
outSound = "karateman/offbeatLightbulbOut";
|
outSound = "karateman/offbeatLightbulbOut";
|
||||||
|
else
|
||||||
|
outSound = "karateman/lightbulbOut";
|
||||||
CreateItemInstance(beat, "Item01", KarateManPotNew.ItemType.Bulb);
|
CreateItemInstance(beat, "Item01", KarateManPotNew.ItemType.Bulb);
|
||||||
break;
|
break;
|
||||||
case (int) HitType.Rock:
|
case (int) HitType.Rock:
|
||||||
|
@ -219,10 +219,10 @@ namespace HeavenStudio.Games
|
||||||
public void CreateBulbSpecial(float beat, int type, Color c)
|
public void CreateBulbSpecial(float beat, int type, Color c)
|
||||||
{
|
{
|
||||||
string outSound;
|
string outSound;
|
||||||
if (Starpelly.Mathp.GetDecimalFromFloat(beat) == 0f)
|
if (Starpelly.Mathp.GetDecimalFromFloat(beat + 0.5f) == 0f)
|
||||||
outSound = "karateman/lightbulbOut";
|
|
||||||
else
|
|
||||||
outSound = "karateman/offbeatLightbulbOut";
|
outSound = "karateman/offbeatLightbulbOut";
|
||||||
|
else
|
||||||
|
outSound = "karateman/lightbulbOut";
|
||||||
var mobj = CreateItemInstance(beat, "Item01", KarateManPotNew.ItemType.Bulb);
|
var mobj = CreateItemInstance(beat, "Item01", KarateManPotNew.ItemType.Bulb);
|
||||||
if (type == (int) LightBulbType.Custom)
|
if (type == (int) LightBulbType.Custom)
|
||||||
mobj.GetComponent<KarateManPotNew>().SetBulbColor(c);
|
mobj.GetComponent<KarateManPotNew>().SetBulbColor(c);
|
||||||
|
|
|
@ -86,7 +86,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||||
Vector3 endPosition = hitPosition - StartPositionOffset[path];
|
Vector3 endPosition = hitPosition - StartPositionOffset[path];
|
||||||
Vector3 flyPosition = new Vector3(
|
Vector3 flyPosition = new Vector3(
|
||||||
Mathf.Lerp(startPosition.x, endPosition.x, progress),
|
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)
|
Mathf.Lerp(startPosition.z, endPosition.z, progress)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue