6 Commits
Author SHA1 Message Date
Lncvrt 9cbc9ec36d Set icon 2025-11-09 17:05:28 -07:00
Lncvrt c9803da757 Fix loading menu 2025-11-08 21:57:19 -07:00
happy-bob007 750e9dbb42 BEERRY DASH GUNS CUSTOM EDITION FIRE EMOJI 2025-11-08 22:49:13 -06:00
happy-bob007 4314f5b073 rand file 2025-10-29 23:57:56 -05:00
happy-bob007 316a5d4eb4 2 players 🤯 2025-10-29 23:57:22 -05:00
Lncvrt afcc84fa7e Fix 2025-10-29 20:55:09 -07:00
8 changed files with 312 additions and 77 deletions

No files matched your search

+1 -1
View File
@@ -66,7 +66,7 @@
"explorer.fileNesting.patterns": { "explorer.fileNesting.patterns": {
"*.sln": "*.csproj" "*.sln": "*.csproj"
}, },
"dotnet.defaultSolution": "BerryDashGuns.slnx", "dotnet.defaultSolution": "happybob-guns-custom.slnx",
"editor.formatOnSave": true, "editor.formatOnSave": true,
"dotnet.formatting.organizeImportsOnFormat": true, "dotnet.formatting.organizeImportsOnFormat": true,
"csharp.format.enable": true "csharp.format.enable": true
+6
View File
@@ -0,0 +1,6 @@
{
"version": "1.0",
"components": [
"Microsoft.VisualStudio.Workload.ManagedGame"
]
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 559 KiB

After

Width:  |  Height:  |  Size: 707 KiB

+227 -1
View File
@@ -119,6 +119,125 @@ NavMeshSettings:
debug: debug:
m_Flags: 0 m_Flags: 0
m_NavMeshData: {fileID: 0} m_NavMeshData: {fileID: 0}
--- !u!1 &28161217
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 28161220}
- component: {fileID: 28161219}
- component: {fileID: 28161218}
m_Layer: 0
m_Name: Bird2
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!50 &28161218
Rigidbody2D:
serializedVersion: 5
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 28161217}
m_BodyType: 0
m_Simulated: 1
m_UseFullKinematicContacts: 0
m_UseAutoMass: 0
m_Mass: 3.5
m_LinearDamping: 3.5
m_AngularDamping: 0
m_GravityScale: 0
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_Interpolate: 0
m_SleepingMode: 1
m_CollisionDetection: 0
m_Constraints: 0
--- !u!212 &28161219
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 28161217}
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_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
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_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: dbf71fe5f2caad1409da64bdbb781eb5, type: 3}
m_Color: {r: 0.12967247, g: 0.4656796, b: 0.8867924, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1.28, y: 1.28}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!4 &28161220
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 28161217}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 3.64, y: -4.1359, z: 0}
m_LocalScale: {x: 1.35, y: 1.35, z: 1.35}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 952789931}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &34767204 --- !u!1 &34767204
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -2566,9 +2685,11 @@ MonoBehaviour:
highScoreText: {fileID: 1606868532} highScoreText: {fileID: 1606868532}
boostText: {fileID: 497996347} boostText: {fileID: 497996347}
bird: {fileID: 808236448} bird: {fileID: 808236448}
bird2: {fileID: 28161217}
pausePanel: {fileID: 302151016} pausePanel: {fileID: 302151016}
statsPanel: {fileID: 1140906499} statsPanel: {fileID: 1140906499}
rb: {fileID: 808236449} rb: {fileID: 808236449}
rb2: {fileID: 28161218}
backgroundMusic: {fileID: 1625416039} backgroundMusic: {fileID: 1625416039}
berryParent: {fileID: 157908646} berryParent: {fileID: 157908646}
mobileButtons: {fileID: 872476494} mobileButtons: {fileID: 872476494}
@@ -4491,6 +4612,110 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 927852285} m_GameObject: {fileID: 927852285}
m_CullTransparentMesh: 1 m_CullTransparentMesh: 1
--- !u!1 &952789930
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 952789931}
- component: {fileID: 952789933}
- component: {fileID: 952789932}
m_Layer: 0
m_Name: Gun
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &952789931
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 952789930}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -0.519, y: 0.315, z: 0}
m_LocalScale: {x: -2, y: 2, z: 2}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 28161220}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &952789932
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 952789930}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 99925664e1b4e403ea674c8646fcf842, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::GunHandler
bulletTemplate: {fileID: 1719498250}
--- !u!212 &952789933
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 952789930}
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_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, 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_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 1
m_Sprite: {fileID: 21300000, guid: 23d93754de02c4faba5df580f9f61da0, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 0.26, y: 0.18}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1 &981975472 --- !u!1 &981975472
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -6712,7 +6937,7 @@ AudioSource:
SpatializePostEffects: 0 SpatializePostEffects: 0
Priority: 0 Priority: 0
DopplerLevel: 1 DopplerLevel: 1
MinDistance: 1 MinDistance: 1.2993745
MaxDistance: 500 MaxDistance: 500
Pan2D: 0 Pan2D: 0
rolloffMode: 0 rolloffMode: 0
@@ -8442,6 +8667,7 @@ SceneRoots:
- {fileID: 1931111989} - {fileID: 1931111989}
- {fileID: 1625416040} - {fileID: 1625416040}
- {fileID: 808236451} - {fileID: 808236451}
- {fileID: 28161220}
- {fileID: 1811565639} - {fileID: 1811565639}
- {fileID: 1035262213} - {fileID: 1035262213}
- {fileID: 157908647} - {fileID: 157908647}
+66 -10
View File
@@ -27,13 +27,16 @@ public class GamePlayer : MonoBehaviour
private float antiLeft; private float antiLeft;
private float screenWidth; private float screenWidth;
internal bool isGrounded; internal bool isGrounded;
internal bool isGrounded2;
public TMP_Text scoreText; public TMP_Text scoreText;
public TMP_Text highScoreText; public TMP_Text highScoreText;
public TMP_Text boostText; public TMP_Text boostText;
public GameObject bird; public GameObject bird;
public GameObject bird2;
public GameObject pausePanel; public GameObject pausePanel;
public GameObject statsPanel; public GameObject statsPanel;
public Rigidbody2D rb; public Rigidbody2D rb;
public Rigidbody2D rb2;
public AudioSource backgroundMusic; public AudioSource backgroundMusic;
public GameObject berryParent; public GameObject berryParent;
@@ -73,7 +76,10 @@ public class GamePlayer : MonoBehaviour
float baseSpeed = 0.18f * (screenWidth / 20.19257f); float baseSpeed = 0.18f * (screenWidth / 20.19257f);
bool doMoveRight = false; bool doMoveRight = false;
bool doMoveLeft = false; bool doMoveLeft = false;
bool doMoveRight2 = false;
bool doMoveLeft2 = false;
bool doJump = false; bool doJump = false;
bool doJump2 = false;
bool doRestart = false; bool doRestart = false;
bool doBack = false; bool doBack = false;
float movespeed = baseSpeed; float movespeed = baseSpeed;
@@ -91,18 +97,30 @@ public class GamePlayer : MonoBehaviour
bool controllerJump = Gamepad.current != null && (Gamepad.current.leftStick.up.isPressed || Gamepad.current.leftStick.down.isPressed || Gamepad.current.dpad.up.isPressed || Gamepad.current.dpad.down.isPressed || Gamepad.current.rightStick.up.isPressed || Gamepad.current.rightStick.down.isPressed); bool controllerJump = Gamepad.current != null && (Gamepad.current.leftStick.up.isPressed || Gamepad.current.leftStick.down.isPressed || Gamepad.current.dpad.up.isPressed || Gamepad.current.dpad.down.isPressed || Gamepad.current.rightStick.up.isPressed || Gamepad.current.rightStick.down.isPressed);
if (!Application.isMobilePlatform) if (!Application.isMobilePlatform)
{ {
if (controllerLeft || Keyboard.current.leftArrowKey.isPressed || Keyboard.current.aKey.isPressed || Keyboard.current.jKey.isPressed) if (controllerLeft || Keyboard.current.aKey.isPressed)
{ {
doMoveLeft = true; doMoveLeft = true;
} }
if (controllerRight || Keyboard.current.rightArrowKey.isPressed || Keyboard.current.dKey.isPressed || Keyboard.current.lKey.isPressed) if (controllerRight || Keyboard.current.dKey.isPressed)
{ {
doMoveRight = true; doMoveRight = true;
} }
if (controllerJump || Keyboard.current.spaceKey.isPressed || Keyboard.current.upArrowKey.isPressed || Keyboard.current.wKey.isPressed || Keyboard.current.downArrowKey.isPressed || Keyboard.current.sKey.isPressed || Keyboard.current.kKey.isPressed || Keyboard.current.iKey.isPressed || (Gamepad.current != null && Gamepad.current.buttonSouth.isPressed)) if (Keyboard.current.leftArrowKey.isPressed)
{
doMoveLeft2 = true;
}
if (Keyboard.current.rightArrowKey.isPressed)
{
doMoveRight2 = true;
}
if (Keyboard.current.wKey.isPressed)
{ {
doJump = true; doJump = true;
} }
if (Keyboard.current.upArrowKey.isPressed)
{
doJump2 = true;
}
if (Keyboard.current.rKey.isPressed) if (Keyboard.current.rKey.isPressed)
{ {
doRestart = true; doRestart = true;
@@ -133,6 +151,16 @@ public class GamePlayer : MonoBehaviour
bird.transform.position += new UnityEngine.Vector3(movespeed, 0f, 0f); bird.transform.position += new UnityEngine.Vector3(movespeed, 0f, 0f);
ClampPosition(bird); ClampPosition(bird);
} }
if (doMoveLeft2 && !doMoveRight2)
{
bird2.transform.position += new UnityEngine.Vector3(-movespeed, 0f, 0f);
ClampPosition(bird2);
}
if (doMoveRight2 && !doMoveLeft2)
{
bird2.transform.position += new UnityEngine.Vector3(movespeed, 0f, 0f);
ClampPosition(bird2);
}
if (doJump && isGrounded) if (doJump && isGrounded)
{ {
AudioSource.PlayClipAtPoint(Resources.Load<AudioClip>("Sounds/Jump"), Camera.main.transform.position, 0.75f * BazookaManager.Instance.GetSettingSFXVolume()); AudioSource.PlayClipAtPoint(Resources.Load<AudioClip>("Sounds/Jump"), Camera.main.transform.position, 0.75f * BazookaManager.Instance.GetSettingSFXVolume());
@@ -149,6 +177,22 @@ public class GamePlayer : MonoBehaviour
rb.linearVelocity = UnityEngine.Vector2.up * 9f; rb.linearVelocity = UnityEngine.Vector2.up * 9f;
} }
} }
if (doJump2 && isGrounded2)
{
AudioSource.PlayClipAtPoint(Resources.Load<AudioClip>("Sounds/Jump"), Camera.main.transform.position, 0.75f * BazookaManager.Instance.GetSettingSFXVolume());
if (boostLeft > 0f || speedyLeft > 0f)
{
rb2.linearVelocity = UnityEngine.Vector2.up * 12f;
}
else if (slownessLeft > 0f)
{
rb2.linearVelocity = UnityEngine.Vector2.up * 6f;
}
else
{
rb2.linearVelocity = UnityEngine.Vector2.up * 9f;
}
}
if (doBack) if (doBack)
{ {
TogglePause(); TogglePause();
@@ -304,6 +348,7 @@ public class GamePlayer : MonoBehaviour
{ {
screenWidth = Camera.main.orthographicSize * 2f * Camera.main.aspect; screenWidth = Camera.main.orthographicSize * 2f * Camera.main.aspect;
ClampPosition(bird); ClampPosition(bird);
ClampPosition(bird2);
GameObject[] allberries = GameObject.FindGameObjectsWithTag("NormalBerry") GameObject[] allberries = GameObject.FindGameObjectsWithTag("NormalBerry")
.Concat(GameObject.FindGameObjectsWithTag("PoisonBerry")) .Concat(GameObject.FindGameObjectsWithTag("PoisonBerry"))
.Concat(GameObject.FindGameObjectsWithTag("SlowBerry")) .Concat(GameObject.FindGameObjectsWithTag("SlowBerry"))
@@ -336,7 +381,7 @@ public class GamePlayer : MonoBehaviour
{ {
Destroy(normalBerry); Destroy(normalBerry);
} }
else if (UnityEngine.Vector3.Distance(bird.transform.position, normalBerry.transform.position) < 1.5f) else if (UnityEngine.Vector3.Distance(bird.transform.position, normalBerry.transform.position) < 1.5f || UnityEngine.Vector3.Distance(bird2.transform.position, normalBerry.transform.position) < 1.5f)
{ {
totalNormalBerries++; totalNormalBerries++;
DoNormalBerry(normalBerry); DoNormalBerry(normalBerry);
@@ -369,7 +414,7 @@ public class GamePlayer : MonoBehaviour
{ {
Destroy(poisonBerry); Destroy(poisonBerry);
} }
else if (UnityEngine.Vector3.Distance(bird.transform.position, poisonBerry.transform.position) < 1.5f) else if (UnityEngine.Vector3.Distance(bird.transform.position, poisonBerry.transform.position) < 1.5f || UnityEngine.Vector3.Distance(bird2.transform.position, poisonBerry.transform.position) < 1.5f)
{ {
totalPoisonBerries++; totalPoisonBerries++;
DoPoisonBerry(); DoPoisonBerry();
@@ -402,7 +447,7 @@ public class GamePlayer : MonoBehaviour
{ {
Destroy(slowBerry); Destroy(slowBerry);
} }
else if (UnityEngine.Vector3.Distance(bird.transform.position, slowBerry.transform.position) < 1.5f) else if (UnityEngine.Vector3.Distance(bird.transform.position, slowBerry.transform.position) < 1.5f || UnityEngine.Vector3.Distance(bird2.transform.position, slowBerry.transform.position) < 1.5f)
{ {
totalSlowBerries++; totalSlowBerries++;
DoSlowBerry(slowBerry); DoSlowBerry(slowBerry);
@@ -435,7 +480,7 @@ public class GamePlayer : MonoBehaviour
{ {
Destroy(ultraBerry); Destroy(ultraBerry);
} }
else if (UnityEngine.Vector3.Distance(bird.transform.position, ultraBerry.transform.position) < 1.5f) else if (UnityEngine.Vector3.Distance(bird.transform.position, ultraBerry.transform.position) < 1.5f || UnityEngine.Vector3.Distance(bird2.transform.position, ultraBerry.transform.position) < 1.5f)
{ {
totalUltraBerries++; totalUltraBerries++;
DoUltraBerry(ultraBerry); DoUltraBerry(ultraBerry);
@@ -468,7 +513,7 @@ public class GamePlayer : MonoBehaviour
{ {
Destroy(speedyBerry); Destroy(speedyBerry);
} }
else if (UnityEngine.Vector3.Distance(bird.transform.position, speedyBerry.transform.position) < 1.5f) else if (UnityEngine.Vector3.Distance(bird.transform.position, speedyBerry.transform.position) < 1.5f || UnityEngine.Vector3.Distance(bird2.transform.position, speedyBerry.transform.position) < 1.5f)
{ {
totalSpeedyBerries++; totalSpeedyBerries++;
DoSpeedyBerry(speedyBerry); DoSpeedyBerry(speedyBerry);
@@ -501,7 +546,7 @@ public class GamePlayer : MonoBehaviour
{ {
Destroy(randomBerry); Destroy(randomBerry);
} }
else if (UnityEngine.Vector3.Distance(bird.transform.position, randomBerry.transform.position) < 1.5f) else if (UnityEngine.Vector3.Distance(bird.transform.position, randomBerry.transform.position) < 1.5f || UnityEngine.Vector3.Distance(bird2.transform.position, randomBerry.transform.position) < 1.5f)
{ {
totalRandomBerries++; totalRandomBerries++;
System.Action[] funcs = { System.Action[] funcs = {
@@ -547,7 +592,7 @@ public class GamePlayer : MonoBehaviour
{ {
Destroy(antiBerry); Destroy(antiBerry);
} }
else if (UnityEngine.Vector3.Distance(bird.transform.position, antiBerry.transform.position) < 1.5f) else if (UnityEngine.Vector3.Distance(bird.transform.position, antiBerry.transform.position) < 1.5f || UnityEngine.Vector3.Distance(bird2.transform.position, antiBerry.transform.position) < 1.5f)
{ {
totalAntiBerries++; totalAntiBerries++;
DoAntiBerry(antiBerry); DoAntiBerry(antiBerry);
@@ -598,8 +643,11 @@ public class GamePlayer : MonoBehaviour
void Respawn() void Respawn()
{ {
bird.transform.position = new UnityEngine.Vector3(0f, -4.3f, 0f); bird.transform.position = new UnityEngine.Vector3(0f, -4.3f, 0f);
bird2.transform.position = new UnityEngine.Vector3(0f, -4.3f, 0f);
rb.gravityScale = 0f; rb.gravityScale = 0f;
rb.linearVelocity = UnityEngine.Vector2.zero; rb.linearVelocity = UnityEngine.Vector2.zero;
rb2.gravityScale = 0f;
rb2.linearVelocity = UnityEngine.Vector2.zero;
score = 0; score = 0;
boostLeft = 0f; boostLeft = 0f;
slownessLeft = 0f; slownessLeft = 0f;
@@ -659,6 +707,14 @@ public class GamePlayer : MonoBehaviour
bird.transform.position = new UnityEngine.Vector2(bird.transform.position.x, -4.1359f); bird.transform.position = new UnityEngine.Vector2(bird.transform.position.x, -4.1359f);
rb.linearVelocity = new UnityEngine.Vector2(rb.linearVelocity.x, 0f); rb.linearVelocity = new UnityEngine.Vector2(rb.linearVelocity.x, 0f);
} }
isGrounded2 = bird2.transform.position.y <= -4.1299996f;
rb2.gravityScale = isGrounded2 ? 0f : 1.5f;
if (bird2.transform.position.y < -4.1359f)
{
bird2.transform.position = new UnityEngine.Vector2(bird2.transform.position.x, -4.1359f);
rb2.linearVelocity = new UnityEngine.Vector2(rb2.linearVelocity.x, 0f);
}
if (Application.isMobilePlatform) jumpButton.transform.GetChild(0).GetComponent<TMP_Text>().color = isGrounded ? Color.white : Color.red; if (Application.isMobilePlatform) jumpButton.transform.GetChild(0).GetComponent<TMP_Text>().color = isGrounded ? Color.white : Color.red;
} }
+4 -57
View File
@@ -1,7 +1,6 @@
using System; using System.Threading.Tasks;
using TMPro; using TMPro;
using UnityEngine; using UnityEngine;
using UnityEngine.Networking;
using UnityEngine.SceneManagement; using UnityEngine.SceneManagement;
using UnityEngine.UI; using UnityEngine.UI;
@@ -11,7 +10,7 @@ public class LoadingMenu : MonoBehaviour
public Button updateButton; public Button updateButton;
public Button continueButton; public Button continueButton;
void Start() async void Start()
{ {
if (!Application.isMobilePlatform) if (!Application.isMobilePlatform)
{ {
@@ -28,60 +27,8 @@ public class LoadingMenu : MonoBehaviour
PlayerPrefs.SetString("latestVersion", Application.version); PlayerPrefs.SetString("latestVersion", Application.version);
updateButton.onClick.AddListener(() => updateButton.onClick.AddListener(() =>
{ {
Application.OpenURL("https://berrydashwithguns.lncvrt.xyz/download"); Application.OpenURL("https://games.lncvrt.xyz/download");
}); });
CheckUpdate(); await SceneManager.LoadSceneAsync("GamePlayer");
}
async void CheckUpdate()
{
using UnityWebRequest request = UnityWebRequest.Get("https://berrydashwithguns.lncvrt.xyz/database/canLoadClient.php");
request.SetRequestHeader("Requester", "BerryDashClient");
request.SetRequestHeader("ClientVersion", Application.version);
request.SetRequestHeader("ClientPlatform", Application.platform.ToString());
await request.SendWebRequest();
if (request.result != UnityWebRequest.Result.Success)
{
text.text = "Failed to check version";
return;
}
string response = request.downloadHandler.text;
if (response == "1")
{
await SceneManager.LoadSceneAsync("GamePlayer");
}
else if (response == "2")
{
text.text = "Outdated client! You can still play the game and access the servers, but it isn't recommended.";
var updateButtonPos = updateButton.transform.localPosition;
updateButtonPos.x = -135;
updateButton.transform.localPosition = updateButtonPos;
updateButton.gameObject.SetActive(true);
continueButton.gameObject.SetActive(true);
}
else if (response == "3")
{
text.text = "Outdated client! You can still load into the game, but online features may not be available.";
var updateButtonPos = updateButton.transform.localPosition;
updateButtonPos.x = -135;
updateButton.transform.localPosition = updateButtonPos;
updateButton.gameObject.SetActive(true);
continueButton.gameObject.SetActive(true);
}
else if (response == "4")
{
text.text = "You are on a beta version of the game. You can still play the game and access the servers, but it is recommended to use the latest stable version.";
continueButton.transform.position = updateButton.transform.position;
continueButton.gameObject.SetActive(true);
}
else
{
text.text = "Outdated client! Please update your client to play";
updateButton.gameObject.SetActive(true);
}
} }
} }
+6 -6
View File
@@ -12,8 +12,8 @@ PlayerSettings:
targetDevice: 2 targetDevice: 2
useOnDemandResources: 0 useOnDemandResources: 0
accelerometerFrequency: 60 accelerometerFrequency: 60
companyName: Lncvrt companyName: happybob007
productName: Berry Dash with Guns productName: Berry Dash with Guns Custom
defaultCursor: {fileID: 0} defaultCursor: {fileID: 0}
cursorHotspot: {x: 0, y: 0} cursorHotspot: {x: 0, y: 0}
m_SplashScreenBackgroundColor: {r: 0.09411765, g: 0.09411765, b: 0.09411765, a: 1} m_SplashScreenBackgroundColor: {r: 0.09411765, g: 0.09411765, b: 0.09411765, a: 1}
@@ -143,7 +143,7 @@ PlayerSettings:
loadStoreDebugModeEnabled: 0 loadStoreDebugModeEnabled: 0
visionOSBundleVersion: 1.0 visionOSBundleVersion: 1.0
tvOSBundleVersion: 1.0 tvOSBundleVersion: 1.0
bundleVersion: 1.1 bundleVersion: 1.0
preloadedAssets: preloadedAssets:
- {fileID: -944628639613478452, guid: 2bcd2660ca9b64942af0de543d8d7100, type: 3} - {fileID: -944628639613478452, guid: 2bcd2660ca9b64942af0de543d8d7100, type: 3}
metroInputSource: 0 metroInputSource: 0
@@ -167,9 +167,9 @@ PlayerSettings:
androidMaxAspectRatio: 2.4 androidMaxAspectRatio: 2.4
androidMinAspectRatio: 1 androidMinAspectRatio: 1
applicationIdentifier: applicationIdentifier:
Android: xyz.lncvrt.berrydashwithguns Android: xyz.lncvrt.happybobgunscustom
Standalone: xyz.lncvrt.berrydashwithguns Standalone: xyz.lncvrt.happybob-gunscustom
iPhone: xyz.lncvrt.berrydashwithguns iPhone: xyz.lncvrt.happybob-gunscustom
buildNumber: buildNumber:
Standalone: 0 Standalone: 0
VisionOS: 0 VisionOS: 0
+2 -2
View File
@@ -1,2 +1,2 @@
m_EditorVersion: 6000.2.9f1 m_EditorVersion: 6000.2.10f1
m_EditorVersionWithRevision: 6000.2.9f1 (e0c4e791ab71) m_EditorVersionWithRevision: 6000.2.10f1 (d3d30d158480)