Skip to content

Commit

Permalink
Add loading screen transition animation, add new crimes and tips
Browse files Browse the repository at this point in the history
  • Loading branch information
Fueredoriku committed Jan 1, 2025
1 parent 8acb19b commit 0d401da
Show file tree
Hide file tree
Showing 6 changed files with 3,210 additions and 3 deletions.
151 changes: 149 additions & 2 deletions Assets/Prefabs/UI/LoadingScreen.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ Transform:
m_ConstrainProportionsScale: 1
m_Children:
- {fileID: 2576682853555585358}
- {fileID: 137433583397651966}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
Expand All @@ -131,7 +132,7 @@ MonoBehaviour:
- 'A clever trick awaits: Crouch, jump, then jump again when you hit a surface
to gain speed.'
- You can jump farther by crouching and then jumping in any direction.
- With more than 250 weapon combinations available, you've got many strategies
- With more than 500 weapon combinations available, you've got many strategies
to explore!
- You can use the pan extension <sprite name="extension_white"> as a makeshift
skateboard if you crouch and look slightly downwards!
Expand Down Expand Up @@ -175,6 +176,10 @@ MonoBehaviour:
extension <sprite name="extension_white"> turns your dynamites into explosive
barrels. Trick your opponents by hiding them well!
- The cowbots <sprite name="cowbot"> yearn for cattle.
- You can leap jump from the top of the giant fan air streams for an extra boost!
- The enemy of artifical intelligence is natural stupidity.
- Some special weapon combinations have unique names, they usually have some kind
of synergy!
background: {fileID: 8814292908430132048}
mandatoryDuration: 4
normalRotationSpeed: 60
Expand Down Expand Up @@ -451,6 +456,148 @@ MonoBehaviour:
y: 0
width: 30
height: 13
--- !u!1 &2861130451342191357
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 137433583397651966}
- component: {fileID: 3396547481487014123}
- component: {fileID: 1401931501047091552}
- component: {fileID: 532126310618488488}
- component: {fileID: 6810969230588656204}
- component: {fileID: 5322328896927091427}
m_Layer: 5
m_Name: Transition
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &137433583397651966
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2861130451342191357}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7800017457875967080}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!223 &3396547481487014123
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2861130451342191357}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_VertexColorAlwaysGammaSpace: 0
m_AdditionalShaderChannelsFlag: 0
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!114 &1401931501047091552
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2861130451342191357}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 1
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 1
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 0
--- !u!114 &532126310618488488
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2861130451342191357}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!222 &6810969230588656204
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2861130451342191357}
m_CullTransparentMesh: 1
--- !u!114 &5322328896927091427
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2861130451342191357}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: -876546973899608171, guid: 73bee47dbd86e114ca0f6b057f75abdf, type: 3}
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_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &3020746609343585238
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1465,7 +1612,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 2100000, guid: 1b932d1bf9d2da849a39d7c6d1dd4e47, type: 2}
m_Material: {fileID: 0}
m_Color: {r: 0.5849056, g: 0.2795775, b: 0.2795775, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
Expand Down
18 changes: 18 additions & 0 deletions Assets/Prefabs/UI/Scoreboards.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,24 @@ MonoBehaviour:
- IN A BLOCK OF MEMORY OR ALIVE
- FOR POLLING IN THE RIGHT HALF PLANE
- FOR RADIOACTIVE MIRACLE SORTING
- FOR NATURAL STUPIDITY
- FOR BOTHERING THE BOIDS
- FOR GASLIGHTING LARGE LANGUAGE MODELS
- FOR ONLY WORKING IN FACTORIAL TIME
- FOR LEAVING COILS ALL OVER THE PLACE
- FOR CRUSTY UNSAFE RUST
- FOR AMBIGUOUS SEMANTICS
- FOR EXTRAPOLATING MEANING FROM
- FOR UNTANGLING QUBIT SPAGHETTI
- FOR DE-FUZZING DATA WITH A HIGH-PASS LINT ROLLER
- IN HEAPS AND BUCKETS FOR SKIPPING THE QUEUE
- FOR I/O ABUSE
- FOR PROVIDING A MARSHAL WITH THE WRONG COUNT
- FOR PLAYING 18 HOLES WITH A SINGLE LINE OF WHITESPACE
- FOR USING 9 BIT BYTES
- FOR NOT RESPECTING A VARIABLE'S PRIVACY
- FOR STACKING THE ODDS WITH PUSH OPERATIONS
- FOR Horrible_Naming_Variable
nextCrimeSound: {fileID: 11400000, guid: b85c2d27bf39bda4787e149b19385438, type: 2}
newCrimeDelay: 1
matchProgressDelay: 5
Expand Down
29 changes: 28 additions & 1 deletion Assets/Scripts/LoadingScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using UnityEngine.UI;
using TMPro;
using CollectionExtensions;
using System.Linq;

public class LoadingScreen : MonoBehaviour
{
Expand Down Expand Up @@ -103,8 +104,19 @@ public void Show()
return;

enabled = true;
gameObject.transform.GetChild(0).gameObject.SetActive(true);
gameObject.transform.GetChild(1).gameObject.SetActive(true);
var slideMaterial = transform.GetChild(1).gameObject.GetComponent<Image>().material;
slideMaterial.SetFloat("_Direction", 0f);
LeanTween.value(gameObject, (value) => slideMaterial.SetFloat("_Coverage", value), -0.5f, 1.5f, 0.5f)
.setEaseInOutQuad()
.setOnComplete(ShowEntireScreen);

}

private void ShowEntireScreen()
{
gameObject.transform.GetChild(0).gameObject.SetActive(true);
gameObject.transform.GetChild(1).gameObject.SetActive(false);
// Random background funkiness
var angle = Random.Range(-15f, 15f);
background.transform.eulerAngles = angle * Vector3.forward;
Expand Down Expand Up @@ -146,6 +158,21 @@ public void Hide()
return;
enabled = false;
gameObject.transform.GetChild(0).gameObject.SetActive(false);

var transition = gameObject.transform.GetChild(1).gameObject;
// Avoids animating transitions when not transitioning from a loading screen
if (loadingCounter < 1)
{
transition.SetActive(false);
return;
}

transition.SetActive(true);
var slideMaterial = transition.GetComponent<Image>().material;
slideMaterial.SetFloat("_Direction", 1f);
LeanTween.value(gameObject, (value) => slideMaterial.SetFloat("_Coverage", value), -0.5f, 1.5f, 0.5f)
.setEaseInOutQuad()
.setOnComplete(() => transition.SetActive(false));
}

private void Update()
Expand Down
1 change: 1 addition & 0 deletions Assets/Scripts/UI/ArenaCamera.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using UnityEngine;
using UnityEngine.UI;

public class ArenaCamera : MonoBehaviour
{
Expand Down
Loading

0 comments on commit 0d401da

Please sign in to comment.