Added basic particles for when enemy dies

This commit is contained in:
Gregory Campbell
2020-07-12 01:34:47 -04:00
parent e2aef2a35b
commit f316ebf320
9 changed files with 4925 additions and 1 deletions
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: a16a22578ccb09e4e94544b7157c3882
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
+2
View File
@@ -240,6 +240,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 8fbb02e1dc3bc974aa589a68804bca34, type: 3}
m_Name:
m_EditorClassIdentifier:
particleEffect: {fileID: 427686463867823810, guid: a16a22578ccb09e4e94544b7157c3882,
type: 3}
spawnSounds:
- {fileID: 8300000, guid: 799d65ff7527e3e489d249dd08a956c1, type: 3}
- {fileID: 8300000, guid: 34a994bf36ad1f34796bc95e5e53cbdb, type: 3}
-1
View File
@@ -1831,7 +1831,6 @@ MonoBehaviour:
- {fileID: 8300000, guid: 718c7a969c7162c4d9a3371ed7e640e2, type: 3}
damage:
- {fileID: 8300000, guid: ce545721254386b41b29192d867663a2, type: 3}
reload: {fileID: 8300000, guid: d2710774aabc5664e8fa288d8e1519ea, type: 3}
--- !u!50 &1990476333
Rigidbody2D:
serializedVersion: 4
+3
View File
@@ -4,6 +4,7 @@ using UnityEngine;
public class EnemyScript : MonoBehaviour
{
public GameObject particleEffect;
public AudioClip[] spawnSounds;
public AudioClip[] defeatSounds;
@@ -41,6 +42,7 @@ public class EnemyScript : MonoBehaviour
PlayerPrefs.SetInt("Score", PlayerPrefs.GetInt("Score")+1);
AudioSource.PlayClipAtPoint(
defeatSounds[Random.Range(0,defeatSounds.Length)], new Vector3(0, 0, 0));
Instantiate(particleEffect, transform.position, transform.rotation);
Destroy(gameObject);
}
@@ -48,6 +50,7 @@ public class EnemyScript : MonoBehaviour
{
AudioSource.PlayClipAtPoint(
defeatSounds[Random.Range(0,defeatSounds.Length)], new Vector3(0, 0, 0));
Instantiate(particleEffect, transform.position, transform.rotation);
Destroy(gameObject);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 629 B

+92
View File
@@ -0,0 +1,92 @@
fileFormatVersion: 2
guid: b65dcdd1114bfc64fb823d886bb71bcb
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.
+7
View File
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 3568a757b9079a542af04fb7addb89d0
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: