Added ParticleEffect

dev-ali
Ali Sharoz 3 days ago
parent faf59d6815
commit 9032bcde66

@ -19,6 +19,7 @@ namespace D2D
private async UniTaskVoid Start() private async UniTaskVoid Start()
{ {
await 1f.Seconds(); await 1f.Seconds();
GameManager.Instance.LevelCompleteParticleEffectObj.Play(true);
_stateMachine.Push(new WinState(),false,true); _stateMachine.Push(new WinState(),false,true);
} }

@ -33,6 +33,8 @@ namespace D2D
[Button("Win")] [Button("Win")]
private void PushWin() private void PushWin()
{ {
GameManager.Instance.LevelCompleteParticleEffectObj.Play(true);
_stateMachine.Push(new WinState(), false, true); _stateMachine.Push(new WinState(), false, true);
} }

@ -2,13 +2,18 @@
%TAG !u! tag:unity3d.com,2011: %TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000 --- !u!21 &2100000
Material: Material:
serializedVersion: 6 serializedVersion: 8
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: confetti_AB m_Name: confetti_AB
m_Shader: {fileID: 211, guid: 0000000000000000f000000000000000, type: 0} m_Shader: {fileID: 211, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: _ALPHABLEND_ON m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- _ALPHABLEND_ON
m_InvalidKeywords: []
m_LightmapFlags: 0 m_LightmapFlags: 0
m_EnableInstancingVariants: 0 m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0 m_DoubleSidedGI: 0
@ -16,7 +21,8 @@ Material:
stringTagMap: stringTagMap:
RenderType: Transparent RenderType: Transparent
disabledShaderPasses: disabledShaderPasses:
- ALWAYS - GRABPASS
m_LockedProperties:
m_SavedProperties: m_SavedProperties:
serializedVersion: 3 serializedVersion: 3
m_TexEnvs: m_TexEnvs:
@ -32,6 +38,7 @@ Material:
m_Texture: {fileID: 2800000, guid: fc889383b2da2db439ea6a25ba1b4f9b, type: 3} m_Texture: {fileID: 2800000, guid: fc889383b2da2db439ea6a25ba1b4f9b, type: 3}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats: m_Floats:
- _BlendOp: 0 - _BlendOp: 0
- _BumpScale: 1 - _BumpScale: 1
@ -63,3 +70,4 @@ Material:
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SoftParticleFadeParams: {r: 0, g: 0, b: 0, a: 0} - _SoftParticleFadeParams: {r: 0, g: 0, b: 0, a: 0}
- _TintColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} - _TintColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5}
m_BuildTextureStacks: []

@ -125280,6 +125280,89 @@ Transform:
- {fileID: 643924014} - {fileID: 643924014}
m_Father: {fileID: 1440717090} m_Father: {fileID: 1440717090}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1414093249
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 409766307384202603, guid: 8bba6ce67b7dc4f57a017d0bd38958d6, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 409766307384202603, guid: 8bba6ce67b7dc4f57a017d0bd38958d6, type: 3}
propertyPath: m_LocalPosition.y
value: 3.53
objectReference: {fileID: 0}
- target: {fileID: 409766307384202603, guid: 8bba6ce67b7dc4f57a017d0bd38958d6, type: 3}
propertyPath: m_LocalPosition.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 409766307384202603, guid: 8bba6ce67b7dc4f57a017d0bd38958d6, type: 3}
propertyPath: m_LocalRotation.w
value: 0.7071068
objectReference: {fileID: 0}
- target: {fileID: 409766307384202603, guid: 8bba6ce67b7dc4f57a017d0bd38958d6, type: 3}
propertyPath: m_LocalRotation.x
value: -0.7071068
objectReference: {fileID: 0}
- target: {fileID: 409766307384202603, guid: 8bba6ce67b7dc4f57a017d0bd38958d6, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 409766307384202603, guid: 8bba6ce67b7dc4f57a017d0bd38958d6, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 409766307384202603, guid: 8bba6ce67b7dc4f57a017d0bd38958d6, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: -90
objectReference: {fileID: 0}
- target: {fileID: 409766307384202603, guid: 8bba6ce67b7dc4f57a017d0bd38958d6, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 409766307384202603, guid: 8bba6ce67b7dc4f57a017d0bd38958d6, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 412169348722089053, guid: 8bba6ce67b7dc4f57a017d0bd38958d6, type: 3}
propertyPath: m_Name
value: Firework_FastPooled
objectReference: {fileID: 0}
- target: {fileID: 412169348722089053, guid: 8bba6ce67b7dc4f57a017d0bd38958d6, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 413991725820021211, guid: 8bba6ce67b7dc4f57a017d0bd38958d6, type: 3}
propertyPath: playOnAwake
value: 0
objectReference: {fileID: 0}
- target: {fileID: 413991725820050167, guid: 8bba6ce67b7dc4f57a017d0bd38958d6, type: 3}
propertyPath: playOnAwake
value: 0
objectReference: {fileID: 0}
- target: {fileID: 540322352524163837, guid: 8bba6ce67b7dc4f57a017d0bd38958d6, type: 3}
propertyPath: looping
value: 0
objectReference: {fileID: 0}
- target: {fileID: 540322352524163837, guid: 8bba6ce67b7dc4f57a017d0bd38958d6, type: 3}
propertyPath: playOnAwake
value: 0
objectReference: {fileID: 0}
m_RemovedComponents:
- {fileID: 1418601364, guid: 8bba6ce67b7dc4f57a017d0bd38958d6, type: 3}
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 8bba6ce67b7dc4f57a017d0bd38958d6, type: 3}
--- !u!1 &1414093250 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 412169348722089053, guid: 8bba6ce67b7dc4f57a017d0bd38958d6, type: 3}
m_PrefabInstance: {fileID: 1414093249}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1414277186 --- !u!1 &1414277186
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -189051,6 +189134,10 @@ PrefabInstance:
propertyPath: reviveOnClick propertyPath: reviveOnClick
value: value:
objectReference: {fileID: 671232091} objectReference: {fileID: 671232091}
- target: {fileID: 210116023425839573, guid: 2afb0c0b1e9834310869cb2f0c994844, type: 3}
propertyPath: LevelCompleteParticleEffectObj
value:
objectReference: {fileID: 1414093250}
- target: {fileID: 450773179923285749, guid: 2afb0c0b1e9834310869cb2f0c994844, type: 3} - target: {fileID: 450773179923285749, guid: 2afb0c0b1e9834310869cb2f0c994844, type: 3}
propertyPath: m_SizeDelta.x propertyPath: m_SizeDelta.x
value: 650 value: 650
@ -190680,3 +190767,4 @@ SceneRoots:
- {fileID: 1587148440} - {fileID: 1587148440}
- {fileID: 1688528664} - {fileID: 1688528664}
- {fileID: 1790654131} - {fileID: 1790654131}
- {fileID: 1414093249}

@ -6,7 +6,7 @@ using UnityEngine;
public class GameManager : MonoBehaviour public class GameManager : MonoBehaviour
{ {
public static GameManager Instance = null; public static GameManager Instance = null;
public ParticleSystem LevelCompleteParticleEffectObj;
private void Awake() private void Awake()
{ {
//if (Instance is null) //if (Instance is null)

@ -115,6 +115,8 @@ public class GameProgress : GameStateMachineUser
if (levelTime >= _levelSO.TotalDuration) if (levelTime >= _levelSO.TotalDuration)
{ {
GameManager.Instance.LevelCompleteParticleEffectObj.Play(true);
_stateMachine.Push(new WinState(), false, true); _stateMachine.Push(new WinState(), false, true);
} }
} }
@ -157,6 +159,7 @@ public class GameProgress : GameStateMachineUser
if (totalXP >= needToFinish) if (totalXP >= needToFinish)
{ {
GameManager.Instance.LevelCompleteParticleEffectObj.Play(true);
_stateMachine.Push(new WinState(), false, true); _stateMachine.Push(new WinState(), false, true);
} }
} }

@ -60,6 +60,7 @@ public class PistolMember : SquadMember
var reload = memberClass.ReloadDuration - memberClass.ReloadDuration * (1 + EvolveLevel / 20) / 1.5f; var reload = memberClass.ReloadDuration - memberClass.ReloadDuration * (1 + EvolveLevel / 20) / 1.5f;
reloadTime = Time.time + memberClass.ReloadDuration; reloadTime = Time.time + memberClass.ReloadDuration;
ShootSound.pitch = Random.Range(0.85f, 1.15f);
ShootSound.Play(); ShootSound.Play();
} }

Loading…
Cancel
Save