private void CreateDebris(Vector2 pos) { if (!IsInViewRange || Pause.IsStopped) { return; } if (!PartGen) { return; } int randomChoose = Random.Range(0, debrisSprites.Count); PartGen.GenerateParticle( debrisSprites[randomChoose], pos, speed: Random.value * 3f, slowDown: true, lifeTime: 1.5f, rotationDeg: Random.value * 360f, rotationSpeed: Random.value * 3f, sortingLayer: sprRend.sortingLayerID, sortingOrder: debrisSortingOrder); }
private void CreateDust(Vector2 pos, float alpha = 0.1f) { if (!IsInViewRange || Pause.IsStopped) { return; } if (PartGen == null) { return; } int randomChoose = Random.Range(0, dustSprites.Count); PartGen.GenerateParticle( dustSprites[randomChoose], pos, speed: Random.value * 0.5f, slowDown: true, lifeTime: Random.value * 3f + 2f, rotationDeg: Random.value * 360f, rotationSpeed: Random.value * 0.5f, size: 0.3f + Mathf.Pow(Random.value, 2f) * 0.7f, alpha: alpha, fadeIn: Random.value + 0.5f, sortingLayer: sprRend.sortingLayerID, growthOverLifetime: 2f, sortingOrder: dustSortingOrder); }