TO SQUASH: Multiplier label.
This commit is contained in:
@@ -0,0 +1,111 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!128 &12800000
|
||||
Font:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: 131
|
||||
serializedVersion: 5
|
||||
m_LineSpacing: 13
|
||||
m_DefaultMaterial: {fileID: 2100000, guid: c2fcc424b74cf0722a661d05a4a93f80, type: 2}
|
||||
m_FontSize: 13
|
||||
m_Texture: {fileID: 0}
|
||||
m_AsciiStartOffset: 0
|
||||
m_Tracking: 1
|
||||
m_CharacterSpacing: 0
|
||||
m_CharacterPadding: 1
|
||||
m_ConvertCase: 0
|
||||
m_CharacterRects:
|
||||
- serializedVersion: 2
|
||||
index: 49
|
||||
uv:
|
||||
serializedVersion: 2
|
||||
x: 0.024390243
|
||||
y: 0.06666667
|
||||
width: 0.22560975
|
||||
height: 0.8666667
|
||||
vert:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 14
|
||||
width: 9
|
||||
height: -13
|
||||
advance: 10
|
||||
flipped: 0
|
||||
- serializedVersion: 2
|
||||
index: 50
|
||||
uv:
|
||||
serializedVersion: 2
|
||||
x: 0.25
|
||||
y: 0.06666667
|
||||
width: 0.25
|
||||
height: 0.8666667
|
||||
vert:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 14
|
||||
width: 10
|
||||
height: -13
|
||||
advance: 10
|
||||
flipped: 0
|
||||
- serializedVersion: 2
|
||||
index: 51
|
||||
uv:
|
||||
serializedVersion: 2
|
||||
x: 0.5243902
|
||||
y: 0.06666667
|
||||
width: 0.22560978
|
||||
height: 0.8666667
|
||||
vert:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 14
|
||||
width: 9
|
||||
height: -13
|
||||
advance: 10
|
||||
flipped: 0
|
||||
- serializedVersion: 2
|
||||
index: 52
|
||||
uv:
|
||||
serializedVersion: 2
|
||||
x: 0.7743902
|
||||
y: 0.06666667
|
||||
width: 0.22560978
|
||||
height: 0.8666667
|
||||
vert:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 14
|
||||
width: 9
|
||||
height: -13
|
||||
advance: 10
|
||||
flipped: 0
|
||||
- serializedVersion: 2
|
||||
index: 32
|
||||
uv:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 0
|
||||
height: 0
|
||||
vert:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 0
|
||||
height: 0
|
||||
advance: 10
|
||||
flipped: 0
|
||||
m_KerningValues: []
|
||||
m_PixelScale: 0.1
|
||||
m_FontData:
|
||||
m_Ascent: 0
|
||||
m_Descent: 0
|
||||
m_DefaultStyle: 0
|
||||
m_FontNames: []
|
||||
m_FallbackFonts: []
|
||||
m_FontRenderingMode: 0
|
||||
m_UseLegacyBoundsCalculation: 0
|
||||
m_ShouldRoundAdvanceValue: 1
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 792fa6b713a7d17a1ac059723fbaee8e
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 12800000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,34 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: 131
|
||||
m_Shader: {fileID: 10750, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 2642d79ffba7f69ff88ecdaefb6ef050, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats: []
|
||||
m_Colors: []
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c2fcc424b74cf0722a661d05a4a93f80
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -435,9 +435,10 @@ MonoBehaviour:
|
||||
percentCoveredText: {fileID: 2023199346}
|
||||
lasersText: {fileID: 361861068}
|
||||
magnetsText: {fileID: 473045979}
|
||||
multiplierText: {fileID: 0}
|
||||
multiplierText: {fileID: 729220260}
|
||||
lastLifeWarning: {fileID: 8300000, guid: 9deef8b82436fb6e9b8f840c19e18ef5, type: 3}
|
||||
lastLifeLabel: {fileID: 1217030921}
|
||||
progressBar: {fileID: 205614406}
|
||||
--- !u!82 &83016094
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -813,7 +814,7 @@ GameObject:
|
||||
- component: {fileID: 205614405}
|
||||
- component: {fileID: 205614406}
|
||||
m_Layer: 5
|
||||
m_Name: Progress Bar
|
||||
m_Name: Speed Bonus Bar
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -1803,6 +1804,85 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1e92faff401e6e3e692af8d2386af093, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::WallResetter
|
||||
--- !u!1 &729220258
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 729220259}
|
||||
- component: {fileID: 729220261}
|
||||
- component: {fileID: 729220260}
|
||||
m_Layer: 5
|
||||
m_Name: Multiplier
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &729220259
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 729220258}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2071745862}
|
||||
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: 239, y: -225}
|
||||
m_SizeDelta: {x: 12.31, y: 12.04}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &729220260
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 729220258}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Text
|
||||
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_FontData:
|
||||
m_Font: {fileID: 12800000, guid: 792fa6b713a7d17a1ac059723fbaee8e, type: 2}
|
||||
m_FontSize: 13
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 1
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text:
|
||||
--- !u!222 &729220261
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 729220258}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &739145244
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -2826,13 +2906,13 @@ MonoBehaviour:
|
||||
lives: 8
|
||||
score: 0
|
||||
bonus: 3100
|
||||
speedBonus: 0.25
|
||||
gunAnimator: {fileID: 171200256}
|
||||
muzzleAnimator: {fileID: 739145247}
|
||||
muzzleRenderer: {fileID: 739145246}
|
||||
debrisPrefab: {fileID: 520778743330604540, guid: 6930ea4660412d28aaf519db31147070, type: 3}
|
||||
magnetCount: 1
|
||||
laserCount: 1
|
||||
barPower: 0
|
||||
magnetCount: 0
|
||||
laserCount: 0
|
||||
magnetLeft: {fileID: 1360965131}
|
||||
magnetRight: {fileID: 1465768807}
|
||||
magnetTop: {fileID: 797752166}
|
||||
@@ -4763,7 +4843,7 @@ GameObject:
|
||||
- component: {fileID: 2007789488}
|
||||
- component: {fileID: 2007789487}
|
||||
m_Layer: 5
|
||||
m_Name: Image
|
||||
m_Name: Border
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -5318,6 +5398,7 @@ RectTransform:
|
||||
- {fileID: 361861067}
|
||||
- {fileID: 473045978}
|
||||
- {fileID: 205614405}
|
||||
- {fileID: 729220259}
|
||||
m_Father: {fileID: 663111600}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
@@ -5335,7 +5416,7 @@ PrefabInstance:
|
||||
m_Modifications:
|
||||
- target: {fileID: 2455465290438712436, guid: 37cccc8c2583c8987851bdc00b56a09e, type: 3}
|
||||
propertyPath: orthographic size
|
||||
value: 2.4
|
||||
value: 5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2455465290438712436, guid: 37cccc8c2583c8987851bdc00b56a09e, type: 3}
|
||||
propertyPath: m_CullingMask.m_Bits
|
||||
|
||||
@@ -48,6 +48,8 @@ public class Player : MonoBehaviour
|
||||
|
||||
public int bonus = 3100;
|
||||
|
||||
public float speedBonus = 0.25f;
|
||||
|
||||
public Animator gunAnimator;
|
||||
|
||||
public Animator muzzleAnimator;
|
||||
@@ -60,8 +62,6 @@ public class Player : MonoBehaviour
|
||||
|
||||
public int laserCount = 0;
|
||||
|
||||
public float barPower = 0f;
|
||||
|
||||
public GameObject magnetLeft;
|
||||
|
||||
public GameObject magnetRight;
|
||||
@@ -528,6 +528,12 @@ public class Player : MonoBehaviour
|
||||
}
|
||||
|
||||
canFire = true; // Allow firing again after bar hit.
|
||||
|
||||
speedBonus -= 0.05f; // Decrease speed bonus on bar hit.
|
||||
if (speedBonus < 0.0f)
|
||||
{
|
||||
speedBonus = 0.0f; // Clamp to minimum value.
|
||||
}
|
||||
}
|
||||
|
||||
void OnCollisionEnter2D(Collision2D collision)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityProgressBar;
|
||||
|
||||
public class UIManager : MonoBehaviour
|
||||
{
|
||||
@@ -25,6 +26,8 @@ public class UIManager : MonoBehaviour
|
||||
|
||||
public SpriteRenderer lastLifeLabel;
|
||||
|
||||
public ProgressBar progressBar;
|
||||
|
||||
private AudioSource audioSource;
|
||||
|
||||
private float warningTimer = 0f;
|
||||
@@ -56,6 +59,17 @@ public class UIManager : MonoBehaviour
|
||||
percentCoveredText.text = $"{Clamp(player.percentCovered, 0, 100)}";
|
||||
lasersText.text = $"{Clamp(player.laserCount, 0, 99)}";
|
||||
magnetsText.text = $"{Clamp(player.magnetCount, 0, 99)}";
|
||||
progressBar.Value = player.speedBonus;
|
||||
|
||||
if (player.multiplier != 1)
|
||||
{
|
||||
int multiplierValue = player.multiplier == 0.5f ? 1 : (int)(player.multiplier);
|
||||
multiplierText.text = $"{multiplierValue}";
|
||||
}
|
||||
else
|
||||
{
|
||||
multiplierText.text = "";
|
||||
}
|
||||
|
||||
if (player.lives == 1)
|
||||
{
|
||||
|
||||
@@ -4,6 +4,11 @@ public class YummyLightningBolt : YummyBase
|
||||
{
|
||||
protected override void ObtainedCallback(Player player)
|
||||
{
|
||||
player.barPower += 0.1f;
|
||||
player.speedBonus += 0.05f;
|
||||
|
||||
if (player.speedBonus > 1f)
|
||||
{
|
||||
player.speedBonus = 1f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ TextureImporter:
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
isReadable: 1
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
@@ -43,7 +43,7 @@ TextureImporter:
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
filterMode: 0
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
@@ -124,10 +124,10 @@ TextureImporter:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 21
|
||||
width: 10
|
||||
height: 15
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
@@ -144,12 +144,12 @@ TextureImporter:
|
||||
name: 131_1
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 20
|
||||
x: 10
|
||||
y: 0
|
||||
width: 11
|
||||
width: 10
|
||||
height: 15
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
@@ -166,12 +166,12 @@ TextureImporter:
|
||||
name: 131_2
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 30
|
||||
x: 20
|
||||
y: 0
|
||||
width: 11
|
||||
width: 10
|
||||
height: 15
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
@@ -184,11 +184,33 @@ TextureImporter:
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: 131_3
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 30
|
||||
y: 0
|
||||
width: 10
|
||||
height: 15
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: f34f5bc72e3f4dfcea12db999f1820fd
|
||||
internalID: -44556050
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
spriteID: d1ef87823428ab5cc92440782657c9cd
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
@@ -196,11 +218,14 @@ TextureImporter:
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
entries:
|
||||
- key: SpriteEditor.SliceSettings
|
||||
value: '{"sliceOnImport":false,"gridCellCount":{"x":4.0,"y":1.0},"gridSpriteSize":{"x":10.0,"y":15.0},"gridSpriteOffset":{"x":0.0,"y":0.0},"gridSpritePadding":{"x":0.0,"y":0.0},"pivot":{"x":0.5,"y":0.5},"pivotPixels":{"x":0.0,"y":0.0},"autoSlicingMethod":0,"spriteAlignment":0,"pivotUnitMode":0,"slicingType":2,"keepEmptyRects":false,"isAlternate":false}'
|
||||
nameFileIdTable:
|
||||
131_0: -6919194877884806517
|
||||
131_1: -9013064895149411402
|
||||
131_2: 6065743806060064411
|
||||
131_3: -44556050
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
|
||||
Reference in New Issue
Block a user