Got a basic particle effect going for when spray is applied and when dirt is removed
This commit is contained in:
@@ -97,6 +97,8 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
Spray: {fileID: 1877631211027388265, guid: cf0e463e9e067dc4680f2204fac7d819, type: 3}
|
Spray: {fileID: 1877631211027388265, guid: cf0e463e9e067dc4680f2204fac7d819, type: 3}
|
||||||
|
Particles: {fileID: 3095590803893992786, guid: 3c878b24dc13d434190206d95f9ffafa,
|
||||||
|
type: 3}
|
||||||
WipeSounds:
|
WipeSounds:
|
||||||
- {fileID: 8300000, guid: 17da7a2184ca8da4fb716428ebf2619c, type: 3}
|
- {fileID: 8300000, guid: 17da7a2184ca8da4fb716428ebf2619c, type: 3}
|
||||||
- {fileID: 8300000, guid: 34c28207bbad06f438afe38d510705b0, type: 3}
|
- {fileID: 8300000, guid: 34c28207bbad06f438afe38d510705b0, type: 3}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3c878b24dc13d434190206d95f9ffafa
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -6,6 +6,7 @@ using UnityEngine;
|
|||||||
public class DirtScript : MonoBehaviour
|
public class DirtScript : MonoBehaviour
|
||||||
{
|
{
|
||||||
public GameObject Spray;
|
public GameObject Spray;
|
||||||
|
public GameObject Particles;
|
||||||
public AudioClip[] WipeSounds;
|
public AudioClip[] WipeSounds;
|
||||||
public AudioClip[] SpraySounds;
|
public AudioClip[] SpraySounds;
|
||||||
|
|
||||||
@@ -26,6 +27,7 @@ public class DirtScript : MonoBehaviour
|
|||||||
sprayed = true;
|
sprayed = true;
|
||||||
Instantiate(Spray, new Vector2(this.transform.position.x, this.transform.position.y), Quaternion.Euler(Random.Range(0, 2)*180, Random.Range(0, 2)*180, 0));
|
Instantiate(Spray, new Vector2(this.transform.position.x, this.transform.position.y), Quaternion.Euler(Random.Range(0, 2)*180, Random.Range(0, 2)*180, 0));
|
||||||
soundPlayer.PlayOneShot(SpraySounds[Random.Range(0, SpraySounds.Length)]);
|
soundPlayer.PlayOneShot(SpraySounds[Random.Range(0, SpraySounds.Length)]);
|
||||||
|
Instantiate(Particles, new Vector2(this.transform.position.x, this.transform.position.y), Quaternion.identity);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -46,7 +48,8 @@ public class DirtScript : MonoBehaviour
|
|||||||
{
|
{
|
||||||
|
|
||||||
AudioSource.PlayClipAtPoint(WipeSounds[Random.Range(0, WipeSounds.Length)], Camera.main.transform.position );
|
AudioSource.PlayClipAtPoint(WipeSounds[Random.Range(0, WipeSounds.Length)], Camera.main.transform.position );
|
||||||
Destroy(this.gameObject);
|
Instantiate(Particles, new Vector2(this.transform.position.x, this.transform.position.y), Quaternion.identity);
|
||||||
|
Destroy(this.gameObject);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
@@ -0,0 +1,92 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 37685d112eb847345a116ec22faefe99
|
||||||
|
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.
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 7868e8d587ab99a4a9573965af5e8603
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Reference in New Issue
Block a user