platforms are cool now

yay (still have a bunch of stuff to do tho)
This commit is contained in:
ThePurpleAnon 2024-03-17 17:44:12 -05:00
parent e6415936e9
commit a3b7ffb817
8 changed files with 1662 additions and 359 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -33,90 +33,6 @@ Transform:
m_Father: {fileID: 732984989503240041} m_Father: {fileID: 732984989503240041}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &80156402005524873
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 9046507025991307577}
- component: {fileID: 5268335766498835668}
m_Layer: 0
m_Name: Platform2
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!4 &9046507025991307577
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 80156402005524873}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 1.8514514, y: -0.9991054, z: 0}
m_LocalScale: {x: 1.03, y: 1.03, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 6716266173113673127}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &5268335766498835668
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 80156402005524873}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: acc543038ca31514fa57524efa7642f9, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 10
m_Sprite: {fileID: 1848434777, guid: 3ac0eae7763e7cc4ab4d8c48e0be1115, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 2.68, y: 0.76}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1 &289079064115095863 --- !u!1 &289079064115095863
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -5017,8 +4933,6 @@ Transform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 315182087035321974} - {fileID: 315182087035321974}
- {fileID: 9046507025991307577}
- {fileID: 6285526404627867202}
m_Father: {fileID: 5055808538011896587} m_Father: {fileID: 5055808538011896587}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -29620,7 +29534,7 @@ Transform:
- {fileID: 2909786018473968062} - {fileID: 2909786018473968062}
- {fileID: 3554657717049269836} - {fileID: 3554657717049269836}
m_Father: {fileID: 732984989503240041} m_Father: {fileID: 732984989503240041}
m_RootOrder: 2 m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!198 &3249887671825539861 --- !u!198 &3249887671825539861
ParticleSystem: ParticleSystem:
@ -54406,7 +54320,6 @@ Transform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 6716266173113673127} - {fileID: 6716266173113673127}
- {fileID: 7284315749632485405}
m_Father: {fileID: 732984989503240041} m_Father: {fileID: 732984989503240041}
m_RootOrder: 1 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -64215,6 +64128,7 @@ Transform:
m_Children: m_Children:
- {fileID: 8712487420719949613} - {fileID: 8712487420719949613}
- {fileID: 5055808538011896587} - {fileID: 5055808538011896587}
- {fileID: 7284315749632485405}
- {fileID: 6720950278632178847} - {fileID: 6720950278632178847}
m_Father: {fileID: 2904719894427165250} m_Father: {fileID: 2904719894427165250}
m_RootOrder: 0 m_RootOrder: 0
@ -84061,15 +83975,12 @@ MonoBehaviour:
BigLandmass: {fileID: 8004014250941503462} BigLandmass: {fileID: 8004014250941503462}
SmallLandmass: {fileID: 5628817811886241001} SmallLandmass: {fileID: 5628817811886241001}
FullLandmass: {fileID: 7495323784547262482} FullLandmass: {fileID: 7495323784547262482}
StonePlatform: {fileID: 3778088294134279665}
Platform1: {fileID: 7681896577572022242}
Platform2: {fileID: 80156402005524873}
Platform3: {fileID: 8734499266199773495}
Helmet: {fileID: 1907570764600372448} Helmet: {fileID: 1907570764600372448}
IslandCollapse: {fileID: 6717171227533536638} IslandCollapse: {fileID: 6717171227533536638}
IslandCollapseNg: {fileID: 8060048147632201339} IslandCollapseNg: {fileID: 8060048147632201339}
StoneSplashEffect: {fileID: 9098506809280722272} StoneSplashEffect: {fileID: 9098506809280722272}
ChickenSplashEffect: {fileID: 3249887671825539861} ChickenSplashEffect: {fileID: 3249887671825539861}
PlatformBase: {fileID: 3778088294134279665}
--- !u!1 &5628817811886241001 --- !u!1 &5628817811886241001
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -99052,14 +98963,14 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6994621726437684256} m_GameObject: {fileID: 6994621726437684256}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 1.8575025, y: -4.2535124, z: 0} m_LocalPosition: {x: 1.2792001, y: -3.6617992, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1.0177, y: 1.0177, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 6920580394480364709} - {fileID: 6920580394480364709}
- {fileID: 4946703533964991925} - {fileID: 4946703533964991925}
m_Father: {fileID: 5055808538011896587} m_Father: {fileID: 732984989503240041}
m_RootOrder: 1 m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!198 &9098506809280722272 --- !u!198 &9098506809280722272
ParticleSystem: ParticleSystem:
@ -113986,12 +113897,12 @@ GameObject:
- component: {fileID: 315182087035321974} - component: {fileID: 315182087035321974}
- component: {fileID: 523039980841813546} - component: {fileID: 523039980841813546}
m_Layer: 0 m_Layer: 0
m_Name: Platform1 m_Name: PlatformTexture
m_TagString: Untagged m_TagString: Untagged
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 &315182087035321974 --- !u!4 &315182087035321974
Transform: Transform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -119131,90 +119042,6 @@ Transform:
m_Father: {fileID: 8712487420719949613} m_Father: {fileID: 8712487420719949613}
m_RootOrder: 1 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &8734499266199773495
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6285526404627867202}
- component: {fileID: 4521512962646006828}
m_Layer: 0
m_Name: Platform3
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!4 &6285526404627867202
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8734499266199773495}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 1.8514514, y: -0.9991054, z: 0}
m_LocalScale: {x: 1.03, y: 1.03, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 6716266173113673127}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &4521512962646006828
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8734499266199773495}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: acc543038ca31514fa57524efa7642f9, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 10
m_Sprite: {fileID: -4757701, guid: 3ac0eae7763e7cc4ab4d8c48e0be1115, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 2.68, y: 0.76}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1 &8766301470414526558 --- !u!1 &8766301470414526558
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View file

@ -280,7 +280,6 @@ namespace HeavenStudio.Games
[SerializeField] GameObject countBubble; [SerializeField] GameObject countBubble;
[SerializeField] GameObject Helmet; [SerializeField] GameObject Helmet;
[SerializeField] GameObject FallingHelmet; [SerializeField] GameObject FallingHelmet;
[SerializeField] Island IslandBase;
[SerializeField] Material chickenColors; [SerializeField] Material chickenColors;
[SerializeField] Material chickenColorsCar; [SerializeField] Material chickenColorsCar;
[SerializeField] Material chickenColorsCloud; [SerializeField] Material chickenColorsCloud;
@ -401,20 +400,13 @@ namespace HeavenStudio.Games
Sound whirring; Sound whirring;
bool isWhirringPlaying = false; bool isWhirringPlaying = false;
[SerializeField] Island IslandBase;
Island nextIsland; Island nextIsland;
Island currentIsland; Island currentIsland;
Island stone;
double journeyIntendedLength; double journeyIntendedLength;
StonePlatform[] stonePlatformJourney;
private struct StonePlatform public static double platformDistanceConstant = 5.35 / 2;
{ public static int platformsPerBeat = 4;
public int stoneNumber;
public Island thisPlatform;
}
double platformDistanceConstant = 5.35 / 2;
int platformsPerBeat = 4;
float forgivenessConstant = 1.3f; float forgivenessConstant = 1.3f;
@ -906,7 +898,7 @@ namespace HeavenStudio.Games
{ {
//convert length to an integer, which is at least 4 //convert length to an integer, which is at least 4
double length = Math.Ceiling(actualLength); double length = Math.Ceiling(actualLength);
if (length < 4) length = 4; if (length < 4) length = 48395839743;
//don't queue more than one input at a time //don't queue more than one input at a time
if (beat < nextInputReady) return; if (beat < nextInputReady) return;
@ -988,7 +980,7 @@ namespace HeavenStudio.Games
string yardsTextStringTemp = yardsTextString.Replace("%", $"{yardsTextLength}"); string yardsTextStringTemp = yardsTextString.Replace("%", $"{yardsTextLength}");
yardsText.text = yardsTextStringTemp; yardsText.text = yardsTextStringTemp;
yardsTextIsEditable = true; yardsTextIsEditable = true;
SpawnStones(journeyBeat, yardsTextLength - 1, lateness < 2); nextIsland.SpawnStones(journeyBeat, yardsTextLength - 1, lateness < 2);
})); }));
//chicken ducks into the car window, and the bubble text is set up, and the platform noise plays, music volume is reset if needed, and next island spawns //chicken ducks into the car window, and the bubble text is set up, and the platform noise plays, music volume is reset if needed, and next island spawns
@ -1002,14 +994,9 @@ namespace HeavenStudio.Games
if (drumReset) drumVolume = 1; if (drumReset) drumVolume = 1;
})); }));
//spawns the countdown bubble, allows stones to fall, resets the success anim killer //spawns the countdown bubble, resets the success anim killer
actions.Add(new(beat, delegate { actions.Add(new(beat, delegate {
countBubble.SetActive(bubble); countBubble.SetActive(bubble);
foreach (var a in stonePlatformJourney)
{
stone = a.thisPlatform;
stone.isBeingSet = false;
}
successAnimationKillOnBeat = double.MaxValue; successAnimationKillOnBeat = double.MaxValue;
Helmet.SetActive(helmet); Helmet.SetActive(helmet);
FallingHelmet.SetActive(helmet); FallingHelmet.SetActive(helmet);
@ -1167,7 +1154,7 @@ namespace HeavenStudio.Games
public void PlayDrum(string whichDrum, float drumVolumeThis, double lateness) public void PlayDrum(string whichDrum, float drumVolumeThis, double lateness)
{ {
float drumActualVolume = (drumVolume > drumTempVolume) ? drumVolumeThis * drumVolume : drumVolumeThis * drumTempVolume; float drumActualVolume = (drumVolume > drumTempVolume) ? drumVolumeThis * drumVolume : drumVolumeThis * drumTempVolume;
if (/* isInputting && (lateness * 4 == Math.Floor(Conductor.instance.songPositionInBeatsAsDouble * 4)) */ true) SoundByte.PlayOneShotGame(whichDrum, volume: drumLoud ? drumVolumeThis : drumActualVolume); if (isInputting /* && (lateness * 4 == Math.Floor(Conductor.instance.songPositionInBeatsAsDouble * 4)) */) SoundByte.PlayOneShotGame(whichDrum, volume: drumLoud ? drumVolumeThis : drumActualVolume);
} }
public void PumpBeat() public void PumpBeat()
@ -1184,17 +1171,17 @@ namespace HeavenStudio.Games
nextIsland.SetUpCollapse(beat + length); nextIsland.SetUpCollapse(beat + length);
nextIsland.transform.localPosition = new Vector3((float)(length * platformDistanceConstant * platformsPerBeat + (platformDistanceConstant / 2)), 0, 0); nextIsland.transform.localPosition = new Vector3((float)(length * platformDistanceConstant * platformsPerBeat + (platformDistanceConstant * 1.5)), 0, 0);
nextIsland.BigLandmass.SetActive(true); nextIsland.BigLandmass.SetActive(true);
nextIsland.journeySave = length * platformDistanceConstant * platformsPerBeat + (platformDistanceConstant / 2); nextIsland.journeySave = length * platformDistanceConstant * platformsPerBeat + (platformDistanceConstant * 1.5);
nextIsland.journeyStart = length * platformDistanceConstant * platformsPerBeat + (platformDistanceConstant / 2); nextIsland.journeyStart = length * platformDistanceConstant * platformsPerBeat + (platformDistanceConstant * 1.5);
nextIsland.journeyEnd = 0; nextIsland.journeyEnd = 0;
nextIsland.journeyLength = length; nextIsland.journeyLength = length;
currentIsland.journeySave = length * platformDistanceConstant * platformsPerBeat + (platformDistanceConstant / 2); currentIsland.journeySave = length * platformDistanceConstant * platformsPerBeat + (platformDistanceConstant * 1.5);
currentIsland.journeyStart = 0; currentIsland.journeyStart = 0;
currentIsland.journeyEnd = -length * platformDistanceConstant * platformsPerBeat - (platformDistanceConstant / 2); currentIsland.journeyEnd = -length * platformDistanceConstant * platformsPerBeat - (platformDistanceConstant * 1.5);
currentIsland.journeyLength = length; currentIsland.journeyLength = length;
journeyIntendedLength = beat - length - 1; journeyIntendedLength = beat - length - 1;
@ -1214,32 +1201,6 @@ namespace HeavenStudio.Games
}); });
} }
public void SpawnStones(double beat, double length, bool tooLate)
{
stonePlatformJourney = new StonePlatform[(int)(length * 4 - 1)];
for ( int i = 0; i < length * 4 - 1; i++ )
{
stonePlatformJourney[i].thisPlatform = Instantiate(IslandBase, transform).GetComponent<Island>();
stonePlatformJourney[i].stoneNumber = i;
}
foreach (var a in stonePlatformJourney)
{
stone = a.thisPlatform;
stone.transform.localPosition = new Vector3((float)(((a.stoneNumber + 1) * platformDistanceConstant) + (platformDistanceConstant / 2)), 0, 0);
stone.BecomeStonePlatform(a.stoneNumber);
stone.StoneFall(a.stoneNumber, tooLate);
stone.isBeingSet = true;
stone.journeySave = length * platformDistanceConstant * platformsPerBeat + (platformDistanceConstant / 2);
stone.journeyStart = ((a.stoneNumber + 1) * platformDistanceConstant) + (platformDistanceConstant / 2);
stone.journeyEnd = ((a.stoneNumber) * platformDistanceConstant) + (platformDistanceConstant / 2) - (length * platformDistanceConstant * platformsPerBeat - (platformDistanceConstant / 2));
stone.journeyLength = length;
stone.respawnEnd = beat + length;
}
}
public void BlastOff(float state = 0, bool missed = true) public void BlastOff(float state = 0, bool missed = true)
{ {
canPressWhiff = false; canPressWhiff = false;
@ -1271,13 +1232,6 @@ namespace HeavenStudio.Games
nextIsland.journeyBlastOffTime = Conductor.instance.songPositionInBeatsAsDouble; nextIsland.journeyBlastOffTime = Conductor.instance.songPositionInBeatsAsDouble;
currentIsland.journeyBlastOffTime = Conductor.instance.songPositionInBeatsAsDouble; currentIsland.journeyBlastOffTime = Conductor.instance.songPositionInBeatsAsDouble;
foreach (var a in stonePlatformJourney)
{
stone = a.thisPlatform;
stone.isMoving = true;
stone.journeyBlastOffTime = Conductor.instance.songPositionInBeatsAsDouble;
}
nextIsland.PositionIsland(state * forgivenessConstant); nextIsland.PositionIsland(state * forgivenessConstant);
if(missed) if(missed)
@ -1300,14 +1254,6 @@ namespace HeavenStudio.Games
if (nextIsland.journeyEnd <= 0 && nextIsland.journeyEnd > -2) { nextIsland.journeyEnd -= 4; currentIsland.journeyEnd -= 4; stoneAdder = -4; } if (nextIsland.journeyEnd <= 0 && nextIsland.journeyEnd > -2) { nextIsland.journeyEnd -= 4; currentIsland.journeyEnd -= 4; stoneAdder = -4; }
if (nextIsland.journeyEnd <= -2 && nextIsland.journeyEnd > 4) { nextIsland.journeyEnd -= 2; currentIsland.journeyEnd -= 2; stoneAdder = -2; } if (nextIsland.journeyEnd <= -2 && nextIsland.journeyEnd > 4) { nextIsland.journeyEnd -= 2; currentIsland.journeyEnd -= 2; stoneAdder = -2; }
foreach (var a in stonePlatformJourney)
{
stone = a.thisPlatform;
stone.journeyEnd += (stone.journeyLength - ((stone.journeyBlastOffTime - journeyIntendedLength)) * (stone.journeyLength / (stone.journeyLength + 1))) * platformDistanceConstant * platformsPerBeat + (platformDistanceConstant + 1.5);
stone.journeyEnd += stoneAdder;
stone.journeyLength = Math.Clamp(((stone.journeyBlastOffTime - journeyIntendedLength) / 1.5) + (stone.journeyLength / 3) - 1, 0, stone.journeyLength - 2);
}
BeatAction.New(GameManager.instance, new List<BeatAction.Action>() BeatAction.New(GameManager.instance, new List<BeatAction.Action>()
{ {
new BeatAction.Action(Conductor.instance.songPositionInBeatsAsDouble + currentIsland.journeyLength, delegate { new BeatAction.Action(Conductor.instance.songPositionInBeatsAsDouble + currentIsland.journeyLength, delegate {
@ -1324,12 +1270,6 @@ namespace HeavenStudio.Games
currentIsland.journeyEnd -= state * 1.03f * forgivenessConstant; currentIsland.journeyEnd -= state * 1.03f * forgivenessConstant;
foreach (var a in stonePlatformJourney)
{
stone = a.thisPlatform;
stone.journeyEnd -= state * 1.03f * forgivenessConstant;
}
BeatAction.New(GameManager.instance, new List<BeatAction.Action>() BeatAction.New(GameManager.instance, new List<BeatAction.Action>()
{ {
new BeatAction.Action(journeyIntendedLength + (currentIsland.journeyLength * 2) + 1, delegate { new BeatAction.Action(journeyIntendedLength + (currentIsland.journeyLength * 2) + 1, delegate {
@ -1389,11 +1329,6 @@ namespace HeavenStudio.Games
isInputting = false; isInputting = false;
nextIsland.journeyEnd = nextIsland.journeyLength * platformDistanceConstant * platformsPerBeat + (platformDistanceConstant / 2); nextIsland.journeyEnd = nextIsland.journeyLength * platformDistanceConstant * platformsPerBeat + (platformDistanceConstant / 2);
currentIsland.journeyEnd = 0; currentIsland.journeyEnd = 0;
foreach (var a in stonePlatformJourney)
{
stone = a.thisPlatform;
stone.journeyEnd = ((a.stoneNumber + 1) * platformDistanceConstant) + (platformDistanceConstant / 2);
}
//erase text //erase text
yardsTextIsEditable = false; yardsTextIsEditable = false;
@ -1416,11 +1351,6 @@ namespace HeavenStudio.Games
isInputting = false; isInputting = false;
nextIsland.journeyEnd = nextIsland.journeyLength * platformDistanceConstant * platformsPerBeat; nextIsland.journeyEnd = nextIsland.journeyLength * platformDistanceConstant * platformsPerBeat;
currentIsland.journeyEnd = 0; currentIsland.journeyEnd = 0;
foreach (var a in stonePlatformJourney)
{
stone = a.thisPlatform;
stone.journeyEnd = ((a.stoneNumber + 1) * platformDistanceConstant) + (platformDistanceConstant / 2);
}
//boom //boom
SoundByte.PlayOneShotGame("chargingChicken/SE_NTR_ROBOT_EN_BAKUHATU_PITCH100", pitch: SoundByte.GetPitchFromCents(UnityEngine.Random.Range(-150, 151), false)); SoundByte.PlayOneShotGame("chargingChicken/SE_NTR_ROBOT_EN_BAKUHATU_PITCH100", pitch: SoundByte.GetPitchFromCents(UnityEngine.Random.Range(-150, 151), false));
@ -1478,21 +1408,6 @@ namespace HeavenStudio.Games
}); });
} }
foreach (var a in stonePlatformJourney)
{
stone = a.thisPlatform;
if (stone.canFall && stone.IslandPos.localPosition.x < 3.5)
{
stone.PlatformAnim.DoScaledAnimationAsync("Fall", 0.3f);
SoundByte.PlayOneShotGame("chargingChicken/SE_CHIKEN_BLOCK_FALL_PITCH150", pitch: SoundByte.GetPitchFromCents(UnityEngine.Random.Range(-150, 151), false), volume: 0.5f);
BeatAction.New(GameManager.instance, new List<BeatAction.Action>()
{
new BeatAction.Action(Conductor.instance.songPositionInBeatsAsDouble + 0.50, delegate { stone.StoneSplash(); }),
});
stone.canFall = false;
}
}
ChickenRespawn(); ChickenRespawn();
} }
@ -1507,13 +1422,6 @@ namespace HeavenStudio.Games
nextIsland.isRespawning = true; nextIsland.isRespawning = true;
nextIsland.FakeChickenAnim.DoUnscaledAnimation("Respawn"); nextIsland.FakeChickenAnim.DoUnscaledAnimation("Respawn");
foreach (var a in stonePlatformJourney)
{
stone = a.thisPlatform;
stone.respawnStart = Conductor.instance.songPositionInBeatsAsDouble + length;
stone.isRespawning = true;
}
BeatAction.New(GameManager.instance, new List<BeatAction.Action>() BeatAction.New(GameManager.instance, new List<BeatAction.Action>()
{ {
new BeatAction.Action(nextIsland.respawnEnd, delegate { new BeatAction.Action(nextIsland.respawnEnd, delegate {
@ -1521,11 +1429,6 @@ namespace HeavenStudio.Games
nextIsland.isRespawning = false; nextIsland.isRespawning = false;
currentIsland.FakeChickenAnim.DoScaledAnimationAsync("Idle", 0.5f); currentIsland.FakeChickenAnim.DoScaledAnimationAsync("Idle", 0.5f);
nextIsland.FakeChickenAnim.DoScaledAnimationAsync("Idle", 0.5f); nextIsland.FakeChickenAnim.DoScaledAnimationAsync("Idle", 0.5f);
foreach (var a in stonePlatformJourney)
{
stone = a.thisPlatform;
stone.isRespawning = false;
}
RespawnedAnim(); RespawnedAnim();
}), }),
}); });

View file

@ -20,10 +20,6 @@ namespace HeavenStudio.Games.Scripts_ChargingChicken
[SerializeField] public GameObject BigLandmass; [SerializeField] public GameObject BigLandmass;
[SerializeField] public GameObject SmallLandmass; [SerializeField] public GameObject SmallLandmass;
[SerializeField] public GameObject FullLandmass; [SerializeField] public GameObject FullLandmass;
[SerializeField] public GameObject StonePlatform;
[SerializeField] public GameObject Platform1;
[SerializeField] public GameObject Platform2;
[SerializeField] public GameObject Platform3;
[SerializeField] public GameObject Helmet; [SerializeField] public GameObject Helmet;
[SerializeField] public ParticleSystem IslandCollapse; [SerializeField] public ParticleSystem IslandCollapse;
[SerializeField] public ParticleSystem IslandCollapseNg; [SerializeField] public ParticleSystem IslandCollapseNg;
@ -41,7 +37,6 @@ namespace HeavenStudio.Games.Scripts_ChargingChicken
[NonSerialized]public double respawnEnd = 0; [NonSerialized]public double respawnEnd = 0;
[NonSerialized]public bool isRespawning = false; [NonSerialized]public bool isRespawning = false;
[NonSerialized]public bool isStonePlatform = false;
[NonSerialized]public bool canFall = false; [NonSerialized]public bool canFall = false;
[NonSerialized]public bool isFalling = false; [NonSerialized]public bool isFalling = false;
@ -51,6 +46,16 @@ namespace HeavenStudio.Games.Scripts_ChargingChicken
[NonSerialized]public float speed1 = 0f; [NonSerialized]public float speed1 = 0f;
[NonSerialized]public float speed2 = 0f; [NonSerialized]public float speed2 = 0f;
[SerializeField] GameObject PlatformBase;
StonePlatform[] stonePlatformJourney;
private struct StonePlatform
{
public int stoneNumber;
public GameObject thisPlatform;
}
#endregion #endregion
//global methods //global methods
@ -76,18 +81,18 @@ namespace HeavenStudio.Games.Scripts_ChargingChicken
float newX2 = Util.EasingFunction.Linear((float)journeyStart - (float)journeySave, (float)journeyEnd, 1 - value2); float newX2 = Util.EasingFunction.Linear((float)journeyStart - (float)journeySave, (float)journeyEnd, 1 - value2);
IslandPos.localPosition = new Vector3(newX2, 0, 0); IslandPos.localPosition = new Vector3(newX2, 0, 0);
} }
if (canFall && IslandPos.localPosition.x < -0.5) //if (canFall && IslandPos.localPosition.x < -0.5)
{ //{
PlatformAnim.Play("Fall", -1, 0); // PlatformAnim.Play("Fall", -1, 0);
PlatformAnim.speed = (1f / Conductor.instance.pitchedSecPerBeat) * 0.3f; // PlatformAnim.speed = (1f / Conductor.instance.pitchedSecPerBeat) * 0.3f;
SoundByte.PlayOneShotGame("chargingChicken/SE_CHIKEN_BLOCK_FALL_PITCH150", pitch: SoundByte.GetPitchFromCents(UnityEngine.Random.Range(-150, 151), false), volume: 0.5f); // SoundByte.PlayOneShotGame("chargingChicken/SE_CHIKEN_BLOCK_FALL_PITCH150", pitch: SoundByte.GetPitchFromCents(UnityEngine.Random.Range(-150, 151), false), volume: 0.5f);
BeatAction.New(GameManager.instance, new List<BeatAction.Action>() // BeatAction.New(GameManager.instance, new List<BeatAction.Action>()
{ // {
new BeatAction.Action(Conductor.instance.songPositionInBeatsAsDouble + 0.50, delegate { StoneSplash(); }), // new BeatAction.Action(Conductor.instance.songPositionInBeatsAsDouble + 0.50, delegate { StoneSplash(); }),
new BeatAction.Action(Conductor.instance.songPositionInBeatsAsDouble + 3.00, delegate { Destroy(gameObject); }), // new BeatAction.Action(Conductor.instance.songPositionInBeatsAsDouble + 3.00, delegate { Destroy(gameObject); }),
}); // });
canFall = false; // canFall = false;
} //}
float currentPosition = IslandPos.localPosition.x; float currentPosition = IslandPos.localPosition.x;
speed1 = (previousPosition - currentPosition) / Time.deltaTime; speed1 = (previousPosition - currentPosition) / Time.deltaTime;
@ -150,30 +155,6 @@ namespace HeavenStudio.Games.Scripts_ChargingChicken
//stone platform methods //stone platform methods
#region Stone Platform Methods #region Stone Platform Methods
public void BecomeStonePlatform(int offset)
{
isStonePlatform = true;
canFall = true;
BigLandmass.SetActive(false);
FullLandmass.SetActive(false);
StonePlatform.SetActive(true);
switch (offset % 3) {
case 0: Platform1.SetActive(true); break;
case 1: Platform2.SetActive(true); break;
case 2: Platform3.SetActive(true); break;
}
}
public void StoneFall(int offset, bool tooLate)
{
if (tooLate) return;
PlatformAnim.DoScaledAnimation("Set", Conductor.instance.songPositionInBeatsAsDouble/* + ((double)offset / 64) */, 0.5f);
PlatformAnim.speed = (1f / Conductor.instance.pitchedSecPerBeat) * 0.5f;
}
public void StoneSplash() public void StoneSplash()
{ {
if (IslandPos.localPosition.x > -8) if (IslandPos.localPosition.x > -8)
@ -195,6 +176,33 @@ namespace HeavenStudio.Games.Scripts_ChargingChicken
ChickenSplashEffect.Play(); ChickenSplashEffect.Play();
} }
//stone platform ported code
public void SpawnStones(double beat, double length, bool tooLate)
{
stonePlatformJourney = new StonePlatform[(int)(length * 4)];
for ( int i = 0; i < length * 4; i++ )
{
var a = stonePlatformJourney[i];
a.thisPlatform = Instantiate(PlatformBase, transform);
a.stoneNumber = i;
var stone = a.thisPlatform;
var anim = stone.GetComponent<Animator>();
stone.SetActive(true);
stone.transform.localPosition = new Vector3((float)(((a.stoneNumber) * ChargingChicken.platformDistanceConstant) - (ChargingChicken.platformDistanceConstant / 2)) + stone.transform.localPosition.x, stone.transform.localPosition.y, 0);
if (!tooLate)
{
anim.DoScaledAnimation("Set", Conductor.instance.songPositionInBeatsAsDouble + ((double)a.stoneNumber / 64), 0.5f);
anim.speed = (1f / Conductor.instance.pitchedSecPerBeat) * 0.5f;
}
}
}
#endregion #endregion
} }
} }

View file

@ -422,6 +422,17 @@ namespace HeavenStudio
{ {
Debug.LogWarning("Game loader AgbQuizShowLoader failed!"); Debug.LogWarning("Game loader AgbQuizShowLoader failed!");
} }
game = AgbRapMenLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);
}
else
{
Debug.LogWarning("Game loader AgbRapMenLoader failed!");
}
game = NtrPingpongLoader.AddGame(eventCaller); game = NtrPingpongLoader.AddGame(eventCaller);
if (game != null) if (game != null)
{ {

View file

@ -29,5 +29,14 @@ MonoBehaviour:
- Assets/Scripts/Games/PowerCalligraphy/PowerCalligraphy.cs - Assets/Scripts/Games/PowerCalligraphy/PowerCalligraphy.cs
- Assets/Scripts/Games/ChargingChicken/ChargingChicken.cs - Assets/Scripts/Games/ChargingChicken/ChargingChicken.cs
- Assets/Scripts/Games/ChargingChicken/Island.cs - Assets/Scripts/Games/ChargingChicken/Island.cs
- Assets/Scripts/GameManager.cs
- Assets/Scripts/Games/DogNinja/SpawnHalves.cs
- Assets/Scripts/PostProcessingVFX.cs
- Assets/Scripts/Games/DogNinja/DogNinja.cs
- Assets/Scripts/Games/BuiltToScaleDS/BuiltToScaleDS.cs
- Assets/Scripts/LevelEditor/EventSelector/PropertyPrefabs/DropdownPropertyPrefab.cs
- Assets/Scripts/Minigames.cs
- Assets/Scripts/Games/DogNinja/ThrowObject.cs
- Assets/Scripts/AppInfo.cs
PathsToSkipImportEvent: [] PathsToSkipImportEvent: []
PathsToIgnoreOverwriteSettingOnAttribute: [] PathsToIgnoreOverwriteSettingOnAttribute: []