feat: fixed spawn particles

This commit is contained in:
Gerard Gascón 2024-04-22 21:59:30 +02:00
parent bab2db51e5
commit f131a4945a
3 changed files with 6 additions and 6 deletions

View file

@ -29,8 +29,8 @@ Transform:
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.56, y: -8.47, z: 0} m_LocalPosition: {x: 0.56, y: -8.47, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 1
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -83,7 +83,7 @@ SpriteRenderer:
m_Size: {x: 2.7, y: 4.8} m_Size: {x: 2.7, y: 4.8}
m_AdaptiveModeThreshold: 0.5 m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0 m_SpriteTileMode: 0
m_WasSpriteAssigned: 1 m_WasSpriteAssigned: 0
m_MaskInteraction: 0 m_MaskInteraction: 0
m_SpriteSortPoint: 0 m_SpriteSortPoint: 0
--- !u!114 &1908639354391246343 --- !u!114 &1908639354391246343

View file

@ -2056,8 +2056,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -23, y: -1} m_AnchoredPosition: {x: -23, y: 0}
m_SizeDelta: {x: 599.0315, y: 252.7164} m_SizeDelta: {x: 509.2837, y: 214.854}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1127832730 --- !u!114 &1127832730
MonoBehaviour: MonoBehaviour:

View file

@ -36,7 +36,7 @@ namespace View.Scene {
return growParticlePositions[^1].position; return growParticlePositions[^1].position;
for (int i = 0; i < growParticlePositions.Length; i++) { for (int i = 0; i < growParticlePositions.Length; i++) {
if (_score.GrowPercentage < (i + 1) * iterationStep) if (_score.GrowPercentage < (i + 1) * iterationStep - .001f)
return growParticlePositions[i].position; return growParticlePositions[i].position;
} }