add some extra assets FX and SFX

This commit is contained in:
Robii Aragon
2026-03-29 23:03:14 -07:00
parent 6ef3eb1535
commit 24dc66a81e
10142 changed files with 2535978 additions and 36608 deletions

View File

@@ -46,7 +46,9 @@ public class simpleBreakObject : MonoBehaviour
public Shader transparentShader;
public string defaultShaderName = "Legacy Shaders/Transparent/Diffuse";
[Space]
public string colorPropertyName = "_Color";
[Space]
[Header ("Explosion Damage Settings")]
[Space]
@@ -161,6 +163,8 @@ public class simpleBreakObject : MonoBehaviour
float currentTimeToRemovePieces;
int colorID = -1;
private void Start ()
{
@@ -198,17 +202,19 @@ public class simpleBreakObject : MonoBehaviour
for (i = 0; i < rendererPartsCount; i++) {
currentMaterial = rendererParts [i];
Color alpha = currentMaterial.color;
if (currentMaterial.HasProperty (colorID)) {
Color alpha = currentMaterial.GetColor (colorID);
alpha.a -= Time.deltaTime / fadePiecesSpeed;
alpha.a -= Time.deltaTime / fadePiecesSpeed;
currentMaterial.color = alpha;
currentMaterial.SetColor (colorID, alpha);
//once the alpha is 0, remove the gameObject
if (currentMaterial.color.a > 0) {
allPiecesFaded = false;
}
}
//once the alpha is 0, remove the gameObject
if (alpha.a > 0) {
allPiecesFaded = false;
}
}
}
if (allPiecesFaded) {
if (destroyObjectAfterFade) {
@@ -309,6 +315,10 @@ public class simpleBreakObject : MonoBehaviour
if (transparentShader == null) {
transparentShader = Shader.Find (defaultShaderName);
}
if (colorID == -1) {
colorID = Shader.PropertyToID (colorPropertyName);
}
}
if (useExplosionAroundEnabled) {