platforms are cool now
yay (still have a bunch of stuff to do tho)
This commit is contained in:
parent
e6415936e9
commit
a3b7ffb817
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
|
@ -33,90 +33,6 @@ Transform:
|
|||
m_Father: {fileID: 732984989503240041}
|
||||
m_RootOrder: 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
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -5017,8 +4933,6 @@ Transform:
|
|||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 315182087035321974}
|
||||
- {fileID: 9046507025991307577}
|
||||
- {fileID: 6285526404627867202}
|
||||
m_Father: {fileID: 5055808538011896587}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
@ -29620,7 +29534,7 @@ Transform:
|
|||
- {fileID: 2909786018473968062}
|
||||
- {fileID: 3554657717049269836}
|
||||
m_Father: {fileID: 732984989503240041}
|
||||
m_RootOrder: 2
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!198 &3249887671825539861
|
||||
ParticleSystem:
|
||||
|
@ -54406,7 +54320,6 @@ Transform:
|
|||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 6716266173113673127}
|
||||
- {fileID: 7284315749632485405}
|
||||
m_Father: {fileID: 732984989503240041}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
@ -64215,6 +64128,7 @@ Transform:
|
|||
m_Children:
|
||||
- {fileID: 8712487420719949613}
|
||||
- {fileID: 5055808538011896587}
|
||||
- {fileID: 7284315749632485405}
|
||||
- {fileID: 6720950278632178847}
|
||||
m_Father: {fileID: 2904719894427165250}
|
||||
m_RootOrder: 0
|
||||
|
@ -84061,15 +83975,12 @@ MonoBehaviour:
|
|||
BigLandmass: {fileID: 8004014250941503462}
|
||||
SmallLandmass: {fileID: 5628817811886241001}
|
||||
FullLandmass: {fileID: 7495323784547262482}
|
||||
StonePlatform: {fileID: 3778088294134279665}
|
||||
Platform1: {fileID: 7681896577572022242}
|
||||
Platform2: {fileID: 80156402005524873}
|
||||
Platform3: {fileID: 8734499266199773495}
|
||||
Helmet: {fileID: 1907570764600372448}
|
||||
IslandCollapse: {fileID: 6717171227533536638}
|
||||
IslandCollapseNg: {fileID: 8060048147632201339}
|
||||
StoneSplashEffect: {fileID: 9098506809280722272}
|
||||
ChickenSplashEffect: {fileID: 3249887671825539861}
|
||||
PlatformBase: {fileID: 3778088294134279665}
|
||||
--- !u!1 &5628817811886241001
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -99052,14 +98963,14 @@ Transform:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6994621726437684256}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 1.8575025, y: -4.2535124, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_LocalPosition: {x: 1.2792001, y: -3.6617992, z: 0}
|
||||
m_LocalScale: {x: 1.0177, y: 1.0177, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 6920580394480364709}
|
||||
- {fileID: 4946703533964991925}
|
||||
m_Father: {fileID: 5055808538011896587}
|
||||
m_RootOrder: 1
|
||||
m_Father: {fileID: 732984989503240041}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!198 &9098506809280722272
|
||||
ParticleSystem:
|
||||
|
@ -113986,12 +113897,12 @@ GameObject:
|
|||
- component: {fileID: 315182087035321974}
|
||||
- component: {fileID: 523039980841813546}
|
||||
m_Layer: 0
|
||||
m_Name: Platform1
|
||||
m_Name: PlatformTexture
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &315182087035321974
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -119131,90 +119042,6 @@ Transform:
|
|||
m_Father: {fileID: 8712487420719949613}
|
||||
m_RootOrder: 1
|
||||
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
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -280,7 +280,6 @@ namespace HeavenStudio.Games
|
|||
[SerializeField] GameObject countBubble;
|
||||
[SerializeField] GameObject Helmet;
|
||||
[SerializeField] GameObject FallingHelmet;
|
||||
[SerializeField] Island IslandBase;
|
||||
[SerializeField] Material chickenColors;
|
||||
[SerializeField] Material chickenColorsCar;
|
||||
[SerializeField] Material chickenColorsCloud;
|
||||
|
@ -401,20 +400,13 @@ namespace HeavenStudio.Games
|
|||
Sound whirring;
|
||||
bool isWhirringPlaying = false;
|
||||
|
||||
[SerializeField] Island IslandBase;
|
||||
Island nextIsland;
|
||||
Island currentIsland;
|
||||
Island stone;
|
||||
double journeyIntendedLength;
|
||||
StonePlatform[] stonePlatformJourney;
|
||||
|
||||
private struct StonePlatform
|
||||
{
|
||||
public int stoneNumber;
|
||||
public Island thisPlatform;
|
||||
}
|
||||
|
||||
double platformDistanceConstant = 5.35 / 2;
|
||||
int platformsPerBeat = 4;
|
||||
public static double platformDistanceConstant = 5.35 / 2;
|
||||
public static int platformsPerBeat = 4;
|
||||
|
||||
float forgivenessConstant = 1.3f;
|
||||
|
||||
|
@ -906,7 +898,7 @@ namespace HeavenStudio.Games
|
|||
{
|
||||
//convert length to an integer, which is at least 4
|
||||
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
|
||||
if (beat < nextInputReady) return;
|
||||
|
@ -988,7 +980,7 @@ namespace HeavenStudio.Games
|
|||
string yardsTextStringTemp = yardsTextString.Replace("%", $"{yardsTextLength}");
|
||||
yardsText.text = yardsTextStringTemp;
|
||||
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
|
||||
|
@ -1002,14 +994,9 @@ namespace HeavenStudio.Games
|
|||
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 {
|
||||
countBubble.SetActive(bubble);
|
||||
foreach (var a in stonePlatformJourney)
|
||||
{
|
||||
stone = a.thisPlatform;
|
||||
stone.isBeingSet = false;
|
||||
}
|
||||
successAnimationKillOnBeat = double.MaxValue;
|
||||
Helmet.SetActive(helmet);
|
||||
FallingHelmet.SetActive(helmet);
|
||||
|
@ -1167,7 +1154,7 @@ namespace HeavenStudio.Games
|
|||
public void PlayDrum(string whichDrum, float drumVolumeThis, double lateness)
|
||||
{
|
||||
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()
|
||||
|
@ -1184,17 +1171,17 @@ namespace HeavenStudio.Games
|
|||
|
||||
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.journeySave = length * platformDistanceConstant * platformsPerBeat + (platformDistanceConstant / 2);
|
||||
nextIsland.journeyStart = length * platformDistanceConstant * platformsPerBeat + (platformDistanceConstant / 2);
|
||||
nextIsland.journeySave = length * platformDistanceConstant * platformsPerBeat + (platformDistanceConstant * 1.5);
|
||||
nextIsland.journeyStart = length * platformDistanceConstant * platformsPerBeat + (platformDistanceConstant * 1.5);
|
||||
nextIsland.journeyEnd = 0;
|
||||
nextIsland.journeyLength = length;
|
||||
|
||||
currentIsland.journeySave = length * platformDistanceConstant * platformsPerBeat + (platformDistanceConstant / 2);
|
||||
currentIsland.journeySave = length * platformDistanceConstant * platformsPerBeat + (platformDistanceConstant * 1.5);
|
||||
currentIsland.journeyStart = 0;
|
||||
currentIsland.journeyEnd = -length * platformDistanceConstant * platformsPerBeat - (platformDistanceConstant / 2);
|
||||
currentIsland.journeyEnd = -length * platformDistanceConstant * platformsPerBeat - (platformDistanceConstant * 1.5);
|
||||
currentIsland.journeyLength = length;
|
||||
|
||||
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)
|
||||
{
|
||||
canPressWhiff = false;
|
||||
|
@ -1271,13 +1232,6 @@ namespace HeavenStudio.Games
|
|||
nextIsland.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);
|
||||
|
||||
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 <= -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>()
|
||||
{
|
||||
new BeatAction.Action(Conductor.instance.songPositionInBeatsAsDouble + currentIsland.journeyLength, delegate {
|
||||
|
@ -1324,12 +1270,6 @@ namespace HeavenStudio.Games
|
|||
|
||||
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>()
|
||||
{
|
||||
new BeatAction.Action(journeyIntendedLength + (currentIsland.journeyLength * 2) + 1, delegate {
|
||||
|
@ -1389,11 +1329,6 @@ namespace HeavenStudio.Games
|
|||
isInputting = false;
|
||||
nextIsland.journeyEnd = nextIsland.journeyLength * platformDistanceConstant * platformsPerBeat + (platformDistanceConstant / 2);
|
||||
currentIsland.journeyEnd = 0;
|
||||
foreach (var a in stonePlatformJourney)
|
||||
{
|
||||
stone = a.thisPlatform;
|
||||
stone.journeyEnd = ((a.stoneNumber + 1) * platformDistanceConstant) + (platformDistanceConstant / 2);
|
||||
}
|
||||
|
||||
//erase text
|
||||
yardsTextIsEditable = false;
|
||||
|
@ -1416,11 +1351,6 @@ namespace HeavenStudio.Games
|
|||
isInputting = false;
|
||||
nextIsland.journeyEnd = nextIsland.journeyLength * platformDistanceConstant * platformsPerBeat;
|
||||
currentIsland.journeyEnd = 0;
|
||||
foreach (var a in stonePlatformJourney)
|
||||
{
|
||||
stone = a.thisPlatform;
|
||||
stone.journeyEnd = ((a.stoneNumber + 1) * platformDistanceConstant) + (platformDistanceConstant / 2);
|
||||
}
|
||||
|
||||
//boom
|
||||
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();
|
||||
}
|
||||
|
||||
|
@ -1507,13 +1422,6 @@ namespace HeavenStudio.Games
|
|||
nextIsland.isRespawning = true;
|
||||
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>()
|
||||
{
|
||||
new BeatAction.Action(nextIsland.respawnEnd, delegate {
|
||||
|
@ -1521,11 +1429,6 @@ namespace HeavenStudio.Games
|
|||
nextIsland.isRespawning = false;
|
||||
currentIsland.FakeChickenAnim.DoScaledAnimationAsync("Idle", 0.5f);
|
||||
nextIsland.FakeChickenAnim.DoScaledAnimationAsync("Idle", 0.5f);
|
||||
foreach (var a in stonePlatformJourney)
|
||||
{
|
||||
stone = a.thisPlatform;
|
||||
stone.isRespawning = false;
|
||||
}
|
||||
RespawnedAnim();
|
||||
}),
|
||||
});
|
||||
|
|
|
@ -20,10 +20,6 @@ namespace HeavenStudio.Games.Scripts_ChargingChicken
|
|||
[SerializeField] public GameObject BigLandmass;
|
||||
[SerializeField] public GameObject SmallLandmass;
|
||||
[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 ParticleSystem IslandCollapse;
|
||||
[SerializeField] public ParticleSystem IslandCollapseNg;
|
||||
|
@ -41,7 +37,6 @@ namespace HeavenStudio.Games.Scripts_ChargingChicken
|
|||
[NonSerialized]public double respawnEnd = 0;
|
||||
[NonSerialized]public bool isRespawning = false;
|
||||
|
||||
[NonSerialized]public bool isStonePlatform = false;
|
||||
[NonSerialized]public bool canFall = false;
|
||||
[NonSerialized]public bool isFalling = false;
|
||||
|
||||
|
@ -51,6 +46,16 @@ namespace HeavenStudio.Games.Scripts_ChargingChicken
|
|||
[NonSerialized]public float speed1 = 0f;
|
||||
[NonSerialized]public float speed2 = 0f;
|
||||
|
||||
[SerializeField] GameObject PlatformBase;
|
||||
|
||||
StonePlatform[] stonePlatformJourney;
|
||||
|
||||
private struct StonePlatform
|
||||
{
|
||||
public int stoneNumber;
|
||||
public GameObject thisPlatform;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
//global methods
|
||||
|
@ -76,18 +81,18 @@ namespace HeavenStudio.Games.Scripts_ChargingChicken
|
|||
float newX2 = Util.EasingFunction.Linear((float)journeyStart - (float)journeySave, (float)journeyEnd, 1 - value2);
|
||||
IslandPos.localPosition = new Vector3(newX2, 0, 0);
|
||||
}
|
||||
if (canFall && IslandPos.localPosition.x < -0.5)
|
||||
{
|
||||
PlatformAnim.Play("Fall", -1, 0);
|
||||
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);
|
||||
BeatAction.New(GameManager.instance, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(Conductor.instance.songPositionInBeatsAsDouble + 0.50, delegate { StoneSplash(); }),
|
||||
new BeatAction.Action(Conductor.instance.songPositionInBeatsAsDouble + 3.00, delegate { Destroy(gameObject); }),
|
||||
});
|
||||
canFall = false;
|
||||
}
|
||||
//if (canFall && IslandPos.localPosition.x < -0.5)
|
||||
//{
|
||||
// PlatformAnim.Play("Fall", -1, 0);
|
||||
// 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);
|
||||
// BeatAction.New(GameManager.instance, new List<BeatAction.Action>()
|
||||
// {
|
||||
// new BeatAction.Action(Conductor.instance.songPositionInBeatsAsDouble + 0.50, delegate { StoneSplash(); }),
|
||||
// new BeatAction.Action(Conductor.instance.songPositionInBeatsAsDouble + 3.00, delegate { Destroy(gameObject); }),
|
||||
// });
|
||||
// canFall = false;
|
||||
//}
|
||||
|
||||
float currentPosition = IslandPos.localPosition.x;
|
||||
speed1 = (previousPosition - currentPosition) / Time.deltaTime;
|
||||
|
@ -150,30 +155,6 @@ namespace HeavenStudio.Games.Scripts_ChargingChicken
|
|||
//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()
|
||||
{
|
||||
if (IslandPos.localPosition.x > -8)
|
||||
|
@ -195,6 +176,33 @@ namespace HeavenStudio.Games.Scripts_ChargingChicken
|
|||
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
|
||||
}
|
||||
}
|
|
@ -422,6 +422,17 @@ namespace HeavenStudio
|
|||
{
|
||||
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);
|
||||
if (game != null)
|
||||
{
|
||||
|
|
|
@ -29,5 +29,14 @@ MonoBehaviour:
|
|||
- Assets/Scripts/Games/PowerCalligraphy/PowerCalligraphy.cs
|
||||
- Assets/Scripts/Games/ChargingChicken/ChargingChicken.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: []
|
||||
PathsToIgnoreOverwriteSettingOnAttribute: []
|
||||
|
|
Loading…
Reference in a new issue