buncha text stuff
this wasn't so bad, hopefully i won't want to eat my own shorts next time i work on miss stuff
This commit is contained in:
parent
a1f3bb005e
commit
58b844c3f0
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
|
@ -1,5 +1,179 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &424267339272819189
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2807155189271445528}
|
||||
- component: {fileID: 1364785459526937910}
|
||||
- component: {fileID: 8315137396691253404}
|
||||
m_Layer: 13
|
||||
m_Name: ArrivalText
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &2807155189271445528
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 424267339272819189}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1.1236, y: 1.1236, z: 1.1236}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3661019275362709209}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 4.11}
|
||||
m_SizeDelta: {x: 10.2, y: 1}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!23 &1364785459526937910
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 424267339272819189}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 0
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: -1034967165085496816, guid: 00ba8359d55aea94799b54c203adf38f, 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: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 20
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!114 &8315137396691253404
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 424267339272819189}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 9541d86e2fd84c1d9990edf0852d74ab, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: You arrived in Dubai!
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 00ba8359d55aea94799b54c203adf38f, type: 2}
|
||||
m_sharedMaterial: {fileID: -1034967165085496816, guid: 00ba8359d55aea94799b54c203adf38f, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 10
|
||||
m_fontSizeBase: 10
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 1
|
||||
m_fontSizeMin: 5
|
||||
m_fontSizeMax: 10
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 20
|
||||
m_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 1
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 0
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 1
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
_SortingLayer: 0
|
||||
_SortingLayerID: 0
|
||||
_SortingOrder: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_renderer: {fileID: 1364785459526937910}
|
||||
m_maskType: 0
|
||||
--- !u!1 &801850082581195523
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -32,7 +206,7 @@ RectTransform:
|
|||
m_Children:
|
||||
- {fileID: 1155075624227833492}
|
||||
m_Father: {fileID: 3661019275362709209}
|
||||
m_RootOrder: 4
|
||||
m_RootOrder: 5
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
|
@ -232,7 +406,7 @@ RectTransform:
|
|||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 4.11}
|
||||
m_SizeDelta: {x: 15.8884, y: 3.44}
|
||||
m_SizeDelta: {x: 15, y: 1}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!23 &3599163212245617447
|
||||
MeshRenderer:
|
||||
|
@ -326,19 +500,19 @@ MonoBehaviour:
|
|||
m_fontSize: 10
|
||||
m_fontSizeBase: 10
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_enableAutoSizing: 1
|
||||
m_fontSizeMin: 5
|
||||
m_fontSizeMax: 10
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacing: -100
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_charWidthMaxAdj: 20
|
||||
m_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
|
@ -370,6 +544,38 @@ MonoBehaviour:
|
|||
m_hasFontAssetChanged: 0
|
||||
m_renderer: {fileID: 3599163212245617447}
|
||||
m_maskType: 0
|
||||
--- !u!1 &1476223279408625812
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3999153472455551722}
|
||||
m_Layer: 0
|
||||
m_Name: BubblePivot
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!4 &3999153472455551722
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1476223279408625812}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -1.3, y: 1, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1720440360485531206}
|
||||
m_Father: {fileID: 3741404894539420991}
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &2265488871017466720
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -437,9 +643,9 @@ Transform:
|
|||
- {fileID: 757813538384980026}
|
||||
- {fileID: 8586197149551125814}
|
||||
- {fileID: 4973083106942372806}
|
||||
- {fileID: 1720440360485531206}
|
||||
- {fileID: 3999153472455551722}
|
||||
m_Father: {fileID: 3661019275362709209}
|
||||
m_RootOrder: 3
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!95 &122590160896605966
|
||||
Animator:
|
||||
|
@ -578,6 +784,7 @@ Transform:
|
|||
- {fileID: 6237478353226017371}
|
||||
- {fileID: 8655585282123895374}
|
||||
- {fileID: 2346577099309691168}
|
||||
- {fileID: 2807155189271445528}
|
||||
- {fileID: 3741404894539420991}
|
||||
- {fileID: 5079513360686983010}
|
||||
- {fileID: 1483015052922442540}
|
||||
|
@ -606,7 +813,7 @@ MonoBehaviour:
|
|||
sea: {fileID: 5079513360686983010}
|
||||
yardsText: {fileID: 8575941321201979456}
|
||||
bubbleText: {fileID: 5637715493577622280}
|
||||
countBubble: {fileID: 8579964775969778696}
|
||||
countBubble: {fileID: 1476223279408625812}
|
||||
IslandBase: {fileID: 452761269397350257, guid: 9b9f56f7fd4b4ea43a550dca1b787e98, type: 3}
|
||||
chickenColors: {fileID: 2100000, guid: acc543038ca31514fa57524efa7642f9, type: 2}
|
||||
headlightColor: {fileID: 1126427993834615640}
|
||||
|
@ -1643,7 +1850,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1720440360485531206
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -1652,13 +1859,13 @@ Transform:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8579964775969778696}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -0.038, y: 2.13, z: 0}
|
||||
m_LocalPosition: {x: 1.262, y: 1.13, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 6035796816335496107}
|
||||
m_Father: {fileID: 3741404894539420991}
|
||||
m_RootOrder: 4
|
||||
m_Father: {fileID: 3999153472455551722}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &1822927712438747797
|
||||
SpriteRenderer:
|
||||
|
@ -1721,7 +1928,7 @@ PrefabInstance:
|
|||
m_Modifications:
|
||||
- target: {fileID: 2904719894427165250, guid: 9b9f56f7fd4b4ea43a550dca1b787e98, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 5
|
||||
value: 6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2904719894427165250, guid: 9b9f56f7fd4b4ea43a550dca1b787e98, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
|
|
|
@ -35,6 +35,37 @@ namespace HeavenStudio.Games.Loaders
|
|||
resizable = true,
|
||||
preFunctionLength = 4,
|
||||
},
|
||||
new GameAction("bubbleShrink", "Shrink Countdown Bubble")
|
||||
{
|
||||
function = delegate {
|
||||
var e = eventCaller.currentEntity;
|
||||
if (eventCaller.gameManager.minigameObj.TryGetComponent(out ChargingChicken instance)) {
|
||||
instance.BubbleShrink(e.beat, e.length, e["grow"], e["instant"]);
|
||||
}
|
||||
},
|
||||
parameters = new List<Param>()
|
||||
{
|
||||
new Param("grow", false, "Grow Bubble", "Make the bubble grow instead."),
|
||||
new Param("instant", false, "Instant", "Make the bubble appear or disappear instantly."),
|
||||
},
|
||||
defaultLength = 4,
|
||||
resizable = true,
|
||||
},
|
||||
new GameAction("textEdit", "Edit Cue Text")
|
||||
{
|
||||
function = delegate {
|
||||
var e = eventCaller.currentEntity;
|
||||
if (eventCaller.gameManager.minigameObj.TryGetComponent(out ChargingChicken instance)) {
|
||||
instance.TextEdit(e.beat, e["text"], e["color"]);
|
||||
}
|
||||
},
|
||||
parameters = new List<Param>()
|
||||
{
|
||||
new Param("text", "# yards to the goal.", "Cue Text", "The text to display for a cue ('#' is the length of the cue in beats)."),
|
||||
new Param("color", ChargingChicken.defaultHighlightColor, "Highlight Color", "Set the color of the cue number."),
|
||||
},
|
||||
defaultLength = 0.5f,
|
||||
},
|
||||
new GameAction("changeBgColor", "Background Appearance")
|
||||
{
|
||||
function = delegate {
|
||||
|
@ -123,6 +154,23 @@ namespace HeavenStudio.Games
|
|||
float lightTo2 = 0;
|
||||
|
||||
double bubbleEndCount = 0;
|
||||
double bubbleSizeChangeStart = 0;
|
||||
double bubbleSizeChangeEnd = 0;
|
||||
bool bubbleSizeChangeGrows = false;
|
||||
|
||||
string yardsTextString = "# yards to the goal.";
|
||||
bool yardsTextIsEditable = false;
|
||||
double yardsTextLength = 0;
|
||||
private static Color _defaultHighlightColor;
|
||||
public static Color defaultHighlightColor
|
||||
{
|
||||
get
|
||||
{
|
||||
ColorUtility.TryParseHtmlString("#FFFF00", out _defaultHighlightColor);
|
||||
return _defaultHighlightColor;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Island nextIsland;
|
||||
Island currentIsland;
|
||||
|
@ -396,16 +444,28 @@ namespace HeavenStudio.Games
|
|||
ChickenAnim.SetScaledAnimationSpeed((newAnimScale * 0.8f) + 0.2f);
|
||||
WaterAnim.SetScaledAnimationSpeed((nextIsland.speed1) + (nextIsland.speed2) + 0.2f);
|
||||
}
|
||||
|
||||
if (bubbleSizeChangeStart < Conductor.instance.songPositionInBeatsAsDouble && Conductor.instance.songPositionInBeatsAsDouble <= bubbleSizeChangeEnd)
|
||||
{
|
||||
float value = (Conductor.instance.GetPositionFromBeat(bubbleSizeChangeStart, bubbleSizeChangeEnd - bubbleSizeChangeStart));
|
||||
float newScale = Util.EasingFunction.Linear(1, 0, value);
|
||||
countBubble.transform.localScale = bubbleSizeChangeGrows ? new Vector3(1 - newScale, 1 - newScale, 1) : new Vector3(newScale, newScale, 1);
|
||||
if (bubbleSizeChangeGrows) //refresh the text to remove mipmapping
|
||||
{
|
||||
bubbleText.text = "";
|
||||
bubbleText.text = ($"{Math.Clamp(Math.Ceiling(bubbleEndCount - Conductor.instance.songPositionInBeatsAsDouble - 1), 0, bubbleEndCount)}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnPlay(double beat)
|
||||
{
|
||||
PersistColor(beat);
|
||||
PersistThings(beat);
|
||||
}
|
||||
|
||||
public override void OnGameSwitch(double beat)
|
||||
{
|
||||
PersistColor(beat);
|
||||
PersistThings(beat);
|
||||
}
|
||||
|
||||
private void Awake()
|
||||
|
@ -418,6 +478,11 @@ namespace HeavenStudio.Games
|
|||
nextIsland = Instantiate(IslandBase, transform).GetComponent<Island>();
|
||||
nextIsland.SmallLandmass.SetActive(true);
|
||||
WaterAnim.DoScaledAnimationAsync("Scroll", 0.2f);
|
||||
|
||||
string textColor = ColorUtility.ToHtmlStringRGBA(defaultHighlightColor);
|
||||
yardsTextString = yardsTextString.Replace("#", $"<color=#{textColor}>%</color>");
|
||||
|
||||
PersistThings(Conductor.instance.songPositionInBeatsAsDouble);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -446,7 +511,7 @@ namespace HeavenStudio.Games
|
|||
//hose count animation
|
||||
nextIsland.ChargerArmCountIn(beat);
|
||||
|
||||
//collapse island (successful)
|
||||
//collapse island (successful) TO DO: MAKE THIS PER-ISLAND SO IT'S NOT A FUCKING RACE CONDITION
|
||||
BeatAction.New(GameManager.instance, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(beat + (length * 2) - 1, delegate {
|
||||
|
@ -464,10 +529,12 @@ namespace HeavenStudio.Games
|
|||
var actions = new List<BeatAction.Action>();
|
||||
|
||||
//"X yards to goal" text, spawn the journey
|
||||
double yardsTextLength = length;
|
||||
yardsTextLength = length;
|
||||
double journeyBeat = beat + yardsTextLength;
|
||||
actions.Add(new(beat - 2, delegate {
|
||||
yardsText.text = $"<color=yellow>{yardsTextLength}</color> yards to the goal.";
|
||||
string yardsTextStringTemp = yardsTextString.Replace("%", $"{yardsTextLength}");
|
||||
yardsText.text = yardsTextStringTemp;
|
||||
yardsTextIsEditable = true;
|
||||
SpawnStones(journeyBeat, yardsTextLength - 1);
|
||||
}));
|
||||
|
||||
|
@ -549,6 +616,7 @@ namespace HeavenStudio.Games
|
|||
isInputting = false; //ends the drums (just in case)
|
||||
|
||||
//erase text TO DO: make this happen later (but for now it's fine here)
|
||||
yardsTextIsEditable = false;
|
||||
yardsText.text = "";
|
||||
|
||||
//despawn the counting bubble TO DO: make this happen later (but for now it's fine here)
|
||||
|
@ -672,10 +740,11 @@ namespace HeavenStudio.Games
|
|||
isInputting = false; //ends the drums
|
||||
SoundByte.PlayOneShotGame("chargingChicken/blastoff");
|
||||
|
||||
//TO DO: remove this and make it better
|
||||
//make him go :)
|
||||
ChickenAnim.DoScaledAnimationAsync("Ride", 0.5f);
|
||||
|
||||
//erase text
|
||||
yardsTextIsEditable = false;
|
||||
yardsText.text = "";
|
||||
|
||||
//despawn the counting bubble
|
||||
|
@ -764,6 +833,7 @@ namespace HeavenStudio.Games
|
|||
isInputting = false;
|
||||
|
||||
//erase text
|
||||
yardsTextIsEditable = false;
|
||||
yardsText.text = "";
|
||||
|
||||
//despawn the counting bubble
|
||||
|
@ -784,6 +854,7 @@ namespace HeavenStudio.Games
|
|||
}
|
||||
|
||||
//erase text
|
||||
yardsTextIsEditable = false;
|
||||
yardsText.text = "";
|
||||
|
||||
//despawn the counting bubble
|
||||
|
@ -808,6 +879,7 @@ namespace HeavenStudio.Games
|
|||
}
|
||||
|
||||
//erase text
|
||||
yardsTextIsEditable = false;
|
||||
yardsText.text = "";
|
||||
|
||||
//despawn the counting bubble
|
||||
|
@ -865,6 +937,45 @@ namespace HeavenStudio.Games
|
|||
});
|
||||
}
|
||||
|
||||
public void BubbleShrink(double beat, double length, bool grows, bool instant)
|
||||
{
|
||||
if (nextIsland.isRespawning || !isInputting) return;
|
||||
|
||||
if (instant)
|
||||
{
|
||||
countBubble.SetActive(grows);
|
||||
countBubble.transform.localScale = new Vector3(1, 1, 1);
|
||||
return;
|
||||
}
|
||||
|
||||
if (grows) countBubble.SetActive(true);
|
||||
|
||||
bubbleSizeChangeStart = beat;
|
||||
bubbleSizeChangeEnd = beat + length;
|
||||
bubbleSizeChangeGrows = grows;
|
||||
|
||||
BeatAction.New(GameManager.instance, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(beat + length, delegate {
|
||||
if (!grows) { countBubble.SetActive(false); countBubble.transform.localScale = new Vector3(1, 1, 1); }
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
||||
public void TextEdit(double beat, string text, Color highlightColor)
|
||||
{
|
||||
yardsTextString = text;
|
||||
|
||||
string textColor = ColorUtility.ToHtmlStringRGBA(highlightColor);
|
||||
yardsTextString = yardsTextString.Replace("#", $"<color=#{textColor}>%</color>");
|
||||
|
||||
if(yardsTextIsEditable)
|
||||
{
|
||||
string yardsTextStringTemp = yardsTextString.Replace("%", $"{yardsTextLength}");
|
||||
yardsText.text = yardsTextStringTemp;
|
||||
}
|
||||
}
|
||||
|
||||
#region ColorShit
|
||||
|
||||
public void ChangeColor(double beat, float length, Color color1, Color color2, Color color3, Color color4, int ease)
|
||||
|
@ -889,7 +1000,7 @@ namespace HeavenStudio.Games
|
|||
lastEase = (Util.EasingFunction.Ease)ease;
|
||||
}
|
||||
|
||||
private void PersistColor(double beat)
|
||||
private void PersistThings(double beat)
|
||||
{
|
||||
var allEventsBeforeBeat = EventCaller.GetAllInGameManagerList("chargingChicken", new string[] { "changeBgColor" }).FindAll(x => x.beat < beat);
|
||||
if (allEventsBeforeBeat.Count > 0)
|
||||
|
@ -906,6 +1017,14 @@ namespace HeavenStudio.Games
|
|||
var lastEvent = allEventsBeforeBeat[^1];
|
||||
ChangeLight(lastEvent.beat, lastEvent.length, lastEvent["lightFrom"], lastEvent["lightTo"], lastEvent["headLightFrom"], lastEvent["headLightTo"], lastEvent["ease"]);
|
||||
}
|
||||
|
||||
allEventsBeforeBeat = EventCaller.GetAllInGameManagerList("chargingChicken", new string[] { "textEdit" }).FindAll(x => x.beat < beat);
|
||||
if (allEventsBeforeBeat.Count > 0)
|
||||
{
|
||||
allEventsBeforeBeat.Sort((x, y) => x.beat.CompareTo(y.beat)); //just in case
|
||||
var lastEvent = allEventsBeforeBeat[^1];
|
||||
TextEdit(lastEvent.beat, lastEvent["text"], lastEvent["color"]);
|
||||
}
|
||||
}
|
||||
|
||||
private void AllColorsUpdate(Conductor cond)
|
||||
|
|
Loading…
Reference in a new issue