EffectsController - alexneargarder/Broforce-Docs GitHub Wiki
EffectsController
Table of Contents
- Unity Lifecycle & Setup
- Combat & Damage
- Methods
- CreateAlienParticles
- CreateAlienScrapParticles
- CreateBackgroundBloodSplat
- CreateBackgroundBloodSpray
- CreateBackgroundFlameParticle
- CreateBackgroundFlameParticle
- CreateBackgroundWoodParticles
- CreateBarbedWireParticles
- CreateBlackPlumeParticle
- CreateBloodArteryEffect
- CreateBloodExplosionSmall
- CreateBloodGushEffect
- CreateBloodParticles
- CreateBloodParticles
- CreateBloodParticlesBig
- CreateBloodParticlesBig
- CreateBloodParticlesDots
- CreateBloodParticlesDots
- CreateBloodParticlesDrip
- CreateBloodParticlesSmall
- CreateBloodParticlesSmall
- CreateBloodSmallSplashEffect
- CreateBloodSplashEffect
- CreateBloodSprayExplodeEffect
- CreateBloodTinySplashEffect
- CreateBoneParticles
- CreateBoomerangWindEffect
- CreateBubbles
- CreateBulletPoofEffect
- CreateChakramTrailEffect
- CreateDepletedUraniumExplosion
- CreateDirtParticles
- CreateDirtWhiteParticles
- CreateDoodadGib
- CreateDoodadGib
- CreateDustParticles
- CreateDustParticles
- CreateDustParticlesRow
- CreateEggPopEffect
- CreateExplosion
- CreateExplosion
- CreateExplosionInRectangle
- CreateExplosionParticle
- CreateFire
- CreateFire
- CreateFireSparks
- CreateFireTrail
- CreateFlameEffect
- CreateFlameParticle
- CreateFlameParticle
- CreateGib
- CreateGib
- CreateGibs
- CreateGibs
- CreateGibs
- CreateGibs
- CreateGibs
- CreateGibsFromNestedGibHolder
- CreateGlassShards
- CreateGrenadeTrailEffect
- CreateGreySandParticles
- CreateGrindingSparkShower
- CreateGroundWave
- CreateHellPlumeParticle
- CreateHugeExplosion
- CreateHugeShockWave
- CreateLargeBloodGushEffect
- CreateLaserParticle
- CreateLeafBurst
- CreateLeafBurst
- CreateMassiveExplosion
- CreateMeleeStrikeEffect
- CreateMeleeStrikeLargeEffect
- CreateMetalParticles
- CreateMetalParticles
- CreateMetalParticles
- CreateMusicalShockWave
- CreateMuzzleFlashBigEffect
- CreateMuzzleFlashEffect
- CreateMuzzleFlashMediumEffect
- CreateMuzzleFlashRoundEffect
- CreateMuzzleFlashRoundEffectBlue
- CreateMuzzleFlashTankCannonEffect
- CreateMuzzleFlashVomitEffect
- CreateNuclearExplosion
- CreateOilyFlameEffect
- CreateOilyFlameParticle
- CreateOilyFlameParticle
- CreatePinkPlumeParticle
- CreatePitchBlackPlumeParticle
- CreatePlumeParticle
- CreatePlumeParticle
- CreatePlumes
- CreatePredabroPlasmaPop
- CreatePredictionTrailEffect
- CreateProjectileLargePopEffect
- CreateProjectilePopEffect
- CreateProjectilePopWhiteEffect
- CreateProjectilePuff
- CreateProjectileTimeBroPopEffect
- CreatePunchPopEffect
- CreatePurplePlumeParticle
- CreateRedWarningDiamondHuge
- CreateRedWarningDiamondLargege
- CreateRedWarningEffect
- CreateSandDots
- CreateSandParticles
- CreateSandWhiteParticles
- CreateScrapParticles
- CreateSemenParticles
- CreateSemenParticlesDots
- CreateSemenParticlesDots
- CreateSemenParticlesSmall
- CreateSemenParticlesSmall
- CreateShaderExplosion
- CreateShellSpeedTrail
- CreateShinyMetalParticles
- CreateShockWave
- CreateShrapnel
- CreateShrapnel
- CreateShrapnel
- CreateShrapnelBlindStar
- CreateShrapnelCircle
- CreateSlimeExplosion
- CreateSlimeExplosionSmall
- CreateSlimeParticles
- CreateSlimeParticles
- CreateSmallExplosion
- CreateSmallFireTrail
- CreateSmallWhiteParticles
- CreateSparkParticle
- CreateSparkParticle
- CreateSparkParticle
- CreateSparkParticles
- CreateSparkParticles
- CreateSparkParticles
- CreateSparkParticles
- CreateSparkShower
- CreateStoneShrapnel
- CreateSuddenSparkShower
- CreateSummonMagicParticle
- CreateTimeBroMuzzleFlashEffect
- CreateTravellingExplosion
- CreateWaterDrip
- CreateWaterDrip
- CreateWhiteFlashPop
- CreateWhiteFlashPopSmall
- CreateWoodDarkParticles
- CreateWoodDarkParticles
- CreateWoodParticles
- CreateWoodParticles
- SpawnExplosion
- SpawnExplosion
- SpawnExplosion
- SpawnExplosion
- SprayBlood
- Fields
- acidMeltBigDog
- acidMeltDeadBigDog
- acidMeltDeadDog
- acidMeltDog
- acidMeltGrenadier
- backgroundBloodSprayPrefab
- bigDogSkeletonPrefab
- bigMookMeltingPrefab
- bigMookSkeletonPrefab
- blankDoodadGibPrefab
- blankGibPrefab
- bloodArtery1Prefab
- bloodArtery2Prefab
- bloodBlockOverlayPrefabs
- bloodExplosion
- bloodGush1Prefab
- bloodGush2Prefab
- bloodGush3Prefab
- bloodGushGreen1Prefab
- bloodGushGreen2Prefab
- bloodGushGreen3Prefab
- bloodLargeGush1Prefab
- bloodLargeGush2Prefab
- bloodLargeGush3Prefab
- bloodSmallSplash1Prefab
- bloodSmallSplash2Prefab
- bloodSplash1Prefab
- bloodSplash2Prefab
- bloodSplatDecalSmallPrefab
- bloodSprayExplode1Prefab
- bloodSprayExplode2Prefab
- bloodSpurt1Prefab
- bloodSpurt2Prefab
- bloodSpurt3Prefab
- bloodTinySplash1Prefab
- bloodTinySplash2Prefab
- blueMuzzleFlashRoundPrefab
- boulderRollPoof
- boulderRollPoofPrefab
- bulletPoofPrefab
- chakramTrail
- corpseSkeletonPrefab
- deadBigDogSkeletonPrefab
- deadBigMookSkeletonPrefab
- deadDogSkeletonPrefab
- deadGrenadierSkeletonPrefab
- dogSkeletonPrefab
- ExplodeParticle
- Explosion
- explosion
- explosionBig
- explosionGroundWavePrefab
- explosionHuge
- ExplosionLarge
- ExplosionLargeNoWhite
- ExplosionMassive
- explosionMassive
- explosionMusicalShockWavePrefab
- ExplosionNuclear
- explosionRangePrefab
- explosionShockWaveHugePrefab
- explosionShockWavePrefab
- ExplosionSmall
- explosionSparkShrapnel
- ExplosionSpawner
- ExplosionTiny
- ExplosionTravelling
- fileCabinetGibPrefab
- FireTrail
- FireTrailSmall
- FlameLicks
- flameSheetBackgroundParticle1
- flameSheetBackgroundParticle2
- flameSheetBackgroundParticle3
- flameSheetBackgroundParticle4
- freezeDamageEffect
- grenadeTrail
- grenadierSkeletonPrefab
- groundExplodePoofPrefab
- laserBurnSprite
- liftOffBlastFlameWall
- lostSoulSkeletonPrefab
- meleeStrikePrefab1
- meleeStrikePrefabLarge
- meleeStrikeYScale
- meltingBigMookCorpsePrefab
- meltingCorpsePrefab
- meltingGrenadierCorpsePrefab
- metalDoodadGibPrefab
- muzzleFlashBigGlowPrefab
- muzzleFlashBigPrefab
- muzzleFlashGlowPrefab
- muzzleFlashHugeGlowPrefab
- muzzleFlashMediumPrefab
- muzzleFlashPrefab
- muzzleFlashRoundPrefab
- muzzleFlashSmallGlowPrefab
- muzzleFlashTankCannonPrefab
- muzzleFlashVomitPrefab
- OilyFlameLicks
- particlesGlassShards
- predabroPlasmaPop
- predictionTrail
- projectileFlickPuff
- projectileLargeFlickPuff
- projectileWhiteFlickPuff
- redWarningDiamondHugePrefab
- redWarningDiamondLargePrefab
- redWarningPulsePrefab
- shellSpeedTrailPrefab
- shockWaveExplodePoofPrefab
- shrapnelStonePrefab
- slimeExplosion
- slimeExplosionSmall
- smokeSmall1Prefab
- smokeSmall2Prefab
- smokeSmall3Prefab
- SmokeTrail
- sparkParticleFire
- sparkParticleFloat
- sparkParticleShower
- tinyPopPrefab
- unitMeltingPrefab
- unitSkeletonPrefab
- whiteFlashPopPrefab
- whiteFlashPopSmallPrefab
- woodDoodadGibPiece
- Methods
- Position & Physics
- Animation & Sprite Systems
- Methods
- CreateEffect
- CreateEffect
- CreateEffect
- CreateEffect
- CreateEffect
- CreateEffect
- CreateEffect
- CreateEffect
- CreateEffect
- CreateEffect
- CreateEffect
- CreateEffect
- CreateEffect
- CreateFlexEffectAir
- CreateFlexEffectGolden
- CreateFlexEffectInvulnerable
- CreateSmoke
- CreateTeleportFlexExplosion
- CreateTeleportFlexOut
- SpawnMuscleTempleAvatar
- SpawnSparklePuff
- Fields
- boomerangWindPrefab
- electricity1Prefab
- electricity2Prefab
- electricity3Prefab
- fireSpark1Prefab
- fireSpark2Prefab
- flame1Prefab
- flame2Prefab
- flame3Prefab
- flameCandle1Prefab
- flameCandle2Prefab
- flameCandle3Prefab
- flameCandle4Prefab
- leaf1Prefab
- leaf2Prefab
- puffDisappearPrefab
- puffDisappearRingPrefab
- puffNinjaSmokePrefab
- puffPeckShinePrefab
- sparkleDisappearPrefab
- Methods
- Character State & Effects
- Methods
- CreateAmmoBubble
- CreateBloodTrailParticle
- CreateBloodTrailParticle
- CreateEvilFloatParticle
- CreateFleshParticles
- CreateFreeLifeBubble
- CreateHeroIndicator
- CreateKickPlayerBubble
- CreatePromotedBubble
- CreateSlimeDrip
- CreateSlimeParticles
- CreateSlimeParticlesSpray
- CreateSlimeParticlesSpray
- CreateSlimeTrailParticle
- CreateSlimeTrailParticle
- CreateWaterDrip
- GetBloodColor
- Fields
- AlienEggPop
- ammoBubble
- BlackBloodParticlesBig
- BlackBloodParticlesDots
- BlackBloodParticlesSmall
- bloodParticlesDripsBlack
- bloodParticlesDripsGreen
- bloodParticlesDripsRed
- broCoveredInAcidMaterial
- bubbleParticles
- freeLifeBubble
- FrozenBloodColor
- GreenBloodColor
- GreenBloodParticlesBig
- GreenBloodParticlesDots
- GreenBloodParticlesSmall
- heroIndicator
- kickBubble
- kickConfirmedMaterial
- kickConfirmMaterial
- kickdDefaultMaterial
- mookCoveredInAcidMaterial
- muscleTempleAvatarEffect
- muscleTempleFlexEffectAir
- muscleTempleFlexEffectGolden
- muscleTempleFlexEffectInvulnerable
- muscleTempleFlexTeleportExplosion
- muscleTempleFlexTeleportOut
- OilBloodColor
- PoopBloodParticlesDots
- PoopParticlesBig
- PoopParticlesSmall
- promotedBubble
- QuicksandBloodColor
- RedBloodColor
- RedBloodParticlesBig
- RedBloodParticlesDots
- RedBloodParticlesSmall
- semenParticlesDots
- semenParticlesSmall
- sparklePuff
- waterParticlesDrip
- Methods
- Environmental Interaction
- Methods
- Properties
- Fields
- _oilAccidentTickers
- _timeSinceAccident
- ashHolder
- backgroundWoodShrapnel1
- backgroundWoodShrapnel2
- backgroundWoodShrapnel3
- backgroundWoodShrapnel4
- bloodTrailPuffBigParticle1
- bloodTrailPuffBigParticle2
- bloodTrailPuffBigParticle3
- bloodTrailPuffParticle1
- bloodTrailPuffParticle2
- dustParticles
- evilFloatParticles
- fireAndAsh
- fireWorks
- fireWorksCount
- fireWorksCounter
- fireworksOn
- flashEffect
- fogObject
- forceFireworksOn
- gustFrequency
- gustM
- hellFogObject
- lightningController
- lightObject
- offsetM
- oilParticleParent
- plumePuffBigParticle1
- plumePuffBigParticle2
- plumePuffParticle1
- plumePuffParticle2
- plumePuffParticleBlack1
- plumePuffParticleBlack2
- plumePuffParticleHell
- plumePuffParticlePink
- plumePuffParticlePitchBlack
- plumePuffParticlePurple
- plumeShrapnelPrefab
- rainAndLightning
- rainFollowTransform
- rainHolder
- slimeCoverPrefab
- slimeCoverSidesPrefab
- slimeDripSpawner
- slimeParticles
- slimeTrailPuffBigParticle1
- slimeTrailPuffBigParticle2
- slimeTrailPuffBigParticle3
- slimeTrailPuffParticle1
- slimeTrailPuffParticle2
- summonMagicParticle
- sunObject
- thickFogObject
- waterDripSpawner
- windGustPattern
- windStrength
- Status Effects
- Methods
- CreateBlindedEffect
- CreateCreateTinyPop
- CreateDistortionHeatWaveEffect
- CreateDistortionWobbleLargeRingEffect
- CreateDistortionWobbleLargeRingFullScreenEffect
- CreateDistortionWobblePinchEffect
- CreateDistortionWobbleRingEffect
- CreateDistortionWobbleSmallRingEffect
- CreateElectricShock
- CreateExplosionRangePop
- CreateFreezeDamageEffect
- CreateNinjaSmokeEffect
- CreatePuffDisappearEffect
- CreatePuffDisappearRingEffect
- CreatePuffPeckShineEffect
- CreateRevivedZombiePassiveEffect
- CreateReviveZombieEffect
- CreateSparkleDisappearEffect
- CreateUndeadSelfReviveEffect
- Fields
- bigDogCoveredInAcidMaterial
- bigMookCoveredInAcidMaterial
- distortionHeatWavePrefab
- distortionPinchGrowPrefab
- distortionWobbleGrowPrefab
- distortionWobbleLargeGrowPrefab
- distortionWobbleSmallGrowPrefab
- dogCoveredInAcidMaterial
- grenadierMookCoveredInAcidMaterial
- hellBoomerCoveredInAcidMaterial
- revivedZombiePassivePrefab
- reviveZombiePrefab
- stunnedStars1Prefab
- stunnedStars2Prefab
- stunnedStars3Prefab
- stunnedStarsCount
- undeadSelfRevivePrefab
- Methods
- Audio System
- Helper & Utility
- Methods
- AttachLight
- CreateBoneParticles
- CreateDustParticles
- CreateDustParticles
- CreateDustParticlesRow
- CreateFleshDustParticles
- CreateParticle
- CreateParticle
- CreateParticle
- CreateParticle
- CreateParticle
- CreateParticle
- CreateParticle
- CreateParticle
- CreateParticle
- CreateParticle
- CreateParticles
- CreateParticles
- CreateParticles
- CreateParticles
- CreateParticles
- CreateSandParticles
- GetBloodOverlay
- InstantiateEffect
- InstantiateEffect
- OnDestroy
- Fields
- Methods
Unity Lifecycle & Setup
Methods
private void Awake()
Initializes critical components on object creation. Sets up the ground layer mask for collision detection, initializes the oil accident ticker system, and sets a random initial accident timer between 10-250 seconds.
private void Start()
Configures visual effects based on the current level's theme. Disables all fog objects by default, then selectively enables theme-specific effects: city fog and sun for City theme, hell fog for Hell theme, and fire/ash effects for BurningJungle theme (except in BroDown mode). Also checks for constant fireworks flag.
private void Update()
Updates weather effect positions to follow the camera each frame. Manages rain and ash positioning with offset (-25, 380). Handles firework spawning when enabled and conditions are met (campaign mode, level finished). Increments the accident timer used for oil spill warning displays.
Properties
public static EffectsController instance { get; set; }
Gets the singleton instance of EffectsController. Uses lazy initialization to find and cache the instance in the scene on first access. Provides global access to the effects system from any script.
Fields
private static EffectsController inst
Private static field that caches the singleton instance used by the instance property getter for lazy initialization and quick access.
Combat & Damage
Methods
public static void CreateAlienParticles(float x, float y, int count, float offsetRadius, float force, float xI, float yI)
Creates alien-themed particle effects. Uses alien earth dots at 1.4x force with half the requested count for extraterrestrial debris or organic alien matter destruction.
Parameters:
- float x: The x-coordinate of the alien debris origin
- float y: The y-coordinate of the alien debris origin
- int count: The total number of particles to create
- float offsetRadius: The spread radius for particle placement
- float force: The base force multiplier for particle velocity
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
public static void CreateAlienScrapParticles(float x, float y, int count, float xOffsetRadius, float yOffsetRadius, float force, float xI, float yI, float angularVelocity)
Creates complex alien-themed scrap particles for extraterrestrial destruction effects. Distributes particles across 7 different alien scrap emitters with varying force multipliers (1.0x to 1.6x). The second emitter uses 1.5x angular velocity for enhanced spinning. Includes both regular and tiny alien scrap variants for detailed alien material destruction.
Parameters:
- float x: The x-coordinate of the alien scrap origin
- float y: The y-coordinate of the alien scrap origin
- int count: The total number of particles to create
- float xOffsetRadius: The horizontal spread radius for particle placement
- float yOffsetRadius: The vertical spread radius for particle placement
- float force: The base force multiplier for particle velocity
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
- float angularVelocity: The base rotational velocity for spinning pieces
public void CreateBackgroundBloodSplat(float x, float y)
Creates a small blood splat decal at the specified position. This is a static blood mark that doesn't move.
Parameters:
- float x: The X coordinate where the blood splat appears.
- float y: The Y coordinate where the blood splat appears.
public void CreateBackgroundBloodSpray(float x, float y, float xI, float yI)
Creates a background blood spray effect that moves with velocity. This effect appears behind other game elements.
Parameters:
- float x: The X coordinate where the blood spray originates.
- float y: The Y coordinate where the blood spray originates.
- float xI: The horizontal velocity of the blood spray.
- float yI: The vertical velocity of the blood spray.
public static void CreateBackgroundFlameParticle(float x, float y, float z)
Creates a background flame particle at default depth. Randomly selects from four flame sheet variations for visual variety. Calls the z-parameter overload with z = -12 for background placement.
Parameters:
- float x: The x-coordinate where the flame appears
- float y: The y-coordinate where the flame appears
public static void CreateBackgroundFlameParticle(float x, float y, float z)
Creates a background flame particle with custom z-depth. Randomly selects from four flame sheet particle variations (flameSheetBackgroundParticle1-4) to add visual variety to fire effects in the background.
Parameters:
- float x: The x-coordinate where the flame appears
- float y: The y-coordinate where the flame appears
- float z: The z-coordinate (depth) of the flame particle
public static void CreateBackgroundWoodParticles(float x, float y, int count, float offsetRadius, float force, float xI, float yI)
Creates background wood shrapnel effects. Distributes particles among four different wood shrapnel types, with the first two types getting slightly more particles (count/4 + 1) than the last two (count/4). Uses CreateShrapnel internally for physics-based wood debris.
Parameters:
- float x: The x-coordinate of the wood debris origin
- float y: The y-coordinate of the wood debris origin
- int count: The total number of wood pieces to create
- float offsetRadius: The spread radius for shrapnel placement
- float force: The force multiplier for shrapnel velocity
- float xI: The initial x-velocity added to all shrapnel
- float yI: The initial y-velocity added to all shrapnel
public static void CreateBarbedWireParticles(float x, float y, int count, float offsetRadius, float force, float xI, float yI, float angularVelocity)
Creates barbed wire destruction particles. Combines smaller white dirt particles at 1.6x force (half count) with grey tinting for rust/dirt, plus shiny metal particles (half count) for the wire segments, all with angular velocity for realistic wire breakage.
Parameters:
- float x: The x-coordinate of the barbed wire origin
- float y: The y-coordinate of the barbed wire origin
- int count: The total number of particles to create
- float offsetRadius: The spread radius for particle placement
- float force: The base force multiplier for particle velocity
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
- float angularVelocity: The rotational velocity for spinning wire pieces
public static void CreateBlackPlumeParticle(float x, float y, float z, float force, float xI, float yI, float lifeM, float sizeM)
Creates black smoke plume particles with customizable physics and appearance. Randomly selects between two black plume variations for visual variety. Supports life and size multipliers for different smoke intensities.
Parameters:
- float x: The x-coordinate where the plume originates
- float y: The y-coordinate where the plume originates
- float z: The z-coordinate (depth) of the plume
- float force: The initial force applied to the plume particle
- float xI: The initial x-velocity component
- float yI: The initial y-velocity component
- float lifeM: Life duration multiplier for the particle
- float sizeM: Size multiplier for the particle
public static void CreateBloodArteryEffect(BloodColor color, float x, float y, int direction = 0)
Creates arterial blood spurting effects with directional spray. Randomly selects between two artery animation variants and rotates based on direction (-90° left, 90° right, 0° up). Spawns accompanying blood dot particles and plays squirt sound at 25% volume.
Parameters:
- BloodColor color: The blood color type for the effect
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- int direction: Direction of spray: negative = left, positive = right, 0 = upward
public static void CreateBloodExplosionSmall(float x, float y, float offsetXRadius, float offsetYRadius, float disturbRange, float delayM, float puffSpeed, float shakeM, float volume, int shrapnelCount, float shrapnelForce, Vector3 normal)
Creates a small blood explosion effect. Randomly selects from three blood gush prefabs, spawns red blood particles, shakes camera, plays wet explosion sound, and disturbs wildlife. Similar to slime explosion but with blood visuals.
Parameters:
- float x: The x-coordinate of explosion center
- float y: The y-coordinate of explosion center
- float offsetXRadius: The horizontal spawn radius (unused)
- float offsetYRadius: The vertical spawn radius (unused)
- float disturbRange: The radius for disturbing wildlife
- float delayM: The delay multiplier (unused)
- float puffSpeed: The particle speed multiplier (unused)
- float shakeM: The camera shake intensity multiplier
- float volume: The explosion sound volume
- int shrapnelCount: Number of blood particles to create
- float shrapnelForce: The velocity force for blood particles
- Vector3 normal: The surface normal direction (unused)
public static void CreateBloodGushEffect(BloodColor color, float x, float y, float xI, float yI, bool dots, bool slimes)
Creates a comprehensive blood gush effect combining multiple elements. Randomly selects from 3 gush and 3 spurt variations, with optional slime and dot particles. Effects are flipped based on direction and particles spray opposite to impact direction.
Parameters:
- BloodColor color: The blood color type for all effect elements
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float xI: The horizontal impact direction (sign determines flip)
- float yI: The vertical impact direction
- bool dots: Whether to include blood dot particles
- bool slimes: Whether to include slime particles
public static void CreateBloodParticles(BloodColor color, float x, float y, float z, int count, float offsetXRadius, float offsetYRadius, float force, float xI, float yI)
Creates blood particle effects at the specified position with z-coordinate of 1. This is a convenience overload that delegates to the full version with default z-depth for standard 2D positioning.
Parameters:
- BloodColor color: The blood color type (red, green, oil, frozen)
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- int count: The total number of particles to create across all sizes
- float offsetXRadius: The horizontal spawn radius around the center position
- float offsetYRadius: The vertical spawn radius around the center position
- float force: The force multiplier for particle velocity
- float xI: The base horizontal velocity component
- float yI: The base vertical velocity component
public static void CreateBloodParticles(BloodColor color, float x, float y, float z, int count, float offsetXRadius, float offsetYRadius, float force, float xI, float yI)
Creates a complete blood splatter effect using multiple particle sizes. Distributes particles across three different emitters: big particles (1/3 of count), small particles (1/2 of count + 1), and dot particles (1/2 of count + 1). Each particle type uses reduced spawn radius (10% of provided).
Parameters:
- BloodColor color: The blood color type (red, green, oil, frozen)
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- int count: The total number of particles to create across all sizes
- float offsetXRadius: The horizontal spawn radius around the center position
- float offsetYRadius: The vertical spawn radius around the center position
- float force: The force multiplier for particle velocity
- float xI: The base horizontal velocity component
- float yI: The base vertical velocity component
public static void CreateBloodParticlesBig(BloodColor color, float x, float y, float z, int count, float offsetXRadius, float offsetYRadius, float force, float xI, float yI)
Creates large blood particle effects at the specified position with z-coordinate of
- This is a convenience overload that delegates to the full version with default z-depth.
Parameters:
- BloodColor color: The blood color type (red, green, oil, sewerage)
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- int count: The number of large particles to create
- float offsetXRadius: The horizontal spawn radius around the center position
- float offsetYRadius: The vertical spawn radius around the center position
- float force: The force multiplier for particle velocity
- float xI: The base horizontal velocity component
- float yI: The base vertical velocity component
public static void CreateBloodParticlesBig(BloodColor color, float x, float y, float z, int count, float offsetXRadius, float offsetYRadius, float force, float xI, float yI)
Creates large blood particle effects with color-specific emitters. Selects appropriate particle emitter based on blood type: sewerage (poop), green, oil (black), or default red. Falls back to cutscene blood particles when main EffectsController is inactive. Each particle has randomized color brightness (80-100%).
Parameters:
- BloodColor color: The blood color type (red, green, oil, sewerage)
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- int count: The number of large particles to create
- float offsetXRadius: The horizontal spawn radius around the center position
- float offsetYRadius: The vertical spawn radius around the center position
- float force: The force multiplier for particle velocity
- float xI: The base horizontal velocity component
- float yI: The base vertical velocity component
public static void CreateBloodParticlesDots(BloodColor color, float x, float y, float z, int count, float offsetXRadius, float offsetYRadius, float force, float xI, float yI, float scaleM)
Creates blood dot particle effects at the specified position with z-coordinate of 1. This is a convenience overload that delegates to the full version with default z-depth and scale of 1.
Parameters:
- BloodColor color: The blood color type (red, green, oil, sewerage)
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- int count: The number of dot particles to create
- float offsetXRadius: The horizontal spawn radius around the center position
- float offsetYRadius: The vertical spawn radius around the center position
- float force: The force multiplier for particle velocity
- float xI: The base horizontal velocity component
- float yI: The base vertical velocity component
- float scaleM: The scale multiplier for particle size
public static void CreateBloodParticlesDots(BloodColor color, float x, float y, float z, int count, float offsetXRadius, float offsetYRadius, float force, float xI, float yI, float scaleM)
Creates blood dot particle effects with clustered spawning and size scaling. Uses color-specific emitters with 50% chance to add one extra particle. Implements clustering where 60% spawn near previous positions. Particles have semi-transparent color (70-110% alpha) and scalable size.
Parameters:
- BloodColor color: The blood color type (red, green, oil, sewerage)
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- int count: The number of dot particles to create
- float offsetXRadius: The horizontal spawn radius around the center position
- float offsetYRadius: The vertical spawn radius around the center position
- float force: The force multiplier for particle velocity
- float xI: The base horizontal velocity component
- float yI: The base vertical velocity component
- float scaleM: The scale multiplier for particle size
public static void CreateBloodParticlesDrip(float x, float y, float offsetXRadius, float offsetYRadius, float scaleM, BloodColor color)
Creates a blood drip particle effect at a random position within the specified radius. Selects color-specific drip emitter (green, oil/black, or default red) and spawns with zero velocity.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float offsetXRadius: The horizontal spawn radius around the center position
- float offsetYRadius: The vertical spawn radius around the center position
- float scaleM: The scale multiplier for particle size
- BloodColor color: The blood color type (green, oil, or default red)
public static void CreateBloodParticlesSmall(BloodColor color, float x, float y, float z, int count, float offsetXRadius, float offsetYRadius, float force, float xI, float yI)
Creates small blood particle effects at the specified position with z-coordinate of
- This is a convenience overload that delegates to the full version with default z-depth.
Parameters:
- BloodColor color: The blood color type (red, green, oil, sewerage)
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- int count: The number of small particles to create
- float offsetXRadius: The horizontal spawn radius around the center position
- float offsetYRadius: The vertical spawn radius around the center position
- float force: The force multiplier for particle velocity
- float xI: The base horizontal velocity component
- float yI: The base vertical velocity component
public static void CreateBloodParticlesSmall(BloodColor color, float x, float y, float z, int count, float offsetXRadius, float offsetYRadius, float force, float xI, float yI)
Creates small blood particle effects with clustered spawning pattern. Uses color-specific emitters and implements a clustering algorithm where 60% of particles spawn near previous positions. Particles emit with velocity based on spawn position plus base velocity, with color brightness varying 80-100%.
Parameters:
- BloodColor color: The blood color type (red, green, oil, sewerage)
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- int count: The number of small particles to create
- float offsetXRadius: The horizontal spawn radius around the center position
- float offsetYRadius: The vertical spawn radius around the center position
- float force: The force multiplier for particle velocity
- float xI: The base horizontal velocity component
- float yI: The base vertical velocity component
public static void CreateBloodSmallSplashEffect(BloodColor color, float x, float y, float xI, float yI)
Creates small blood splash effects for minor impacts. Randomly selects between two splash variations with 25% chance each (50% chance of no effect). Used for smaller wounds or blood droplet impacts.
Parameters:
- BloodColor color: The blood color type for the splash
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float xI: The horizontal impact velocity (unused in implementation)
- float yI: The vertical impact velocity (unused in implementation)
public static void CreateBloodSplashEffect(BloodColor bloodColor, float x, float y, float xI, float yI)
Creates a blood splash impact effect. Randomly selects between two splash variations (50% chance each, with 50% chance of no effect). The blood color parameter determines the tint of the splash sprite.
Parameters:
- BloodColor bloodColor: The blood color type for tinting the splash
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float xI: The horizontal impact velocity (unused in implementation)
- float yI: The vertical impact velocity (unused in implementation)
public static void CreateBloodSprayExplodeEffect(BloodColor color, float x, float y, float xI, float yI)
Creates an explosive blood spray effect for violent deaths. Randomly selects between two spray variations and horizontally flips based on direction. Used for gibbing and explosive damage effects.
Parameters:
- BloodColor color: The blood color type for the spray
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float xI: The horizontal force direction (sign determines flip)
- float yI: The vertical force direction (unused in implementation)
public static void CreateBloodTinySplashEffect(BloodColor color, float x, float y, float xI, float yI)
Creates tiny blood splash effects for minimal impacts. Randomly selects between two tiny splash variations with 25% chance each (50% chance of no effect). Used for very small wounds or single blood drops.
Parameters:
- BloodColor color: The blood color type for the splash
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float xI: The horizontal impact velocity (unused in implementation)
- float yI: The vertical impact velocity (unused in implementation)
public static void CreateBoneParticles(ParticleEmitter emitter, float x, float y, int count, float offsetRadius, float force, float xI, float yI)
Creates bone debris particles. Identical implementation to CreateGreySandParticles, combining bone dots at 1.4x force with small bone particles for skeletal destruction effects.
Parameters:
- float x: The x-coordinate of the debris origin
- float y: The y-coordinate of the debris origin
- int count: The total number of particles to create
- float offsetRadius: The spread radius for particle placement
- float force: The base force multiplier for particle velocity
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
public static void CreateBoomerangWindEffect(float x, float y, float z, float xI, float yI, Transform parent, float rotationSpeed, float rotation)
Creates a spinning wind effect for boomerang weapons. The effect is parented to the projectile and rotates continuously. Sets initial rotation and spin speed for the visual wind trail effect.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- float xI: The horizontal velocity component for orientation
- float yI: The vertical velocity component for orientation
- Transform parent: The transform to parent the effect to (usually the boomerang)
- float rotationSpeed: The rotation speed in degrees per second
- float rotation: The initial rotation angle in degrees
public static void CreateBubbles(float x, float y, float z, int count, float offsetXRadius, float offsetYRadius)
Creates underwater bubble particle effects rising upward. Uses clustered spawning where 60% of bubbles spawn near previous positions. All bubbles emit with upward velocity of 10 units/second and use randomized size/lifetime from RedBloodParticlesSmall settings.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- int count: The number of bubbles to create
- float offsetXRadius: The horizontal spawn radius around the center position
- float offsetYRadius: The vertical spawn radius around the center position
public static void CreateBulletPoofEffect(float x, float y)
Creates a small impact poof effect for bullet hits. Used when projectiles strike surfaces to provide visual feedback of the impact point with a small dust cloud.
Parameters:
- float x: The x-coordinate of the bullet impact
- float y: The y-coordinate of the bullet impact
public static ProjectileTrail CreateChakramTrailEffect(float x, float y, float z, float life, Color color)
Creates a chakram (spinning blade) trail effect. Instantiates the chakramTrail prefab and initializes it with the specified color and lifetime for visual tracking of spinning projectiles.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- float life: The lifetime of the trail in seconds
- Color color: The color of the trail effect
Returns:
ProjectileTrail
: The created ProjectileTrail component for further manipulation
public static void CreateDepletedUraniumExplosion(Vector2 position)
Creates a small explosion effect specifically for depleted uranium projectiles. Combines a tiny shader explosion visual with a small explosion sound at 60% volume for appropriate impact feedback.
Parameters:
- Vector2 position: The 2D position where the explosion occurs
public static void CreateDirtParticles(float x, float y, int count, float offsetRadius, float force, float xI, float yI)
Creates dirt and earth debris particles. Combines dirt dust dots at 1.4x force (half count) with three types of small dirt particles (one-third count each), with the third type using 1.1x force for varied dirt explosion effects.
Parameters:
- float x: The x-coordinate of the dirt origin
- float y: The y-coordinate of the dirt origin
- int count: The total number of particles to create
- float offsetRadius: The spread radius for particle placement
- float force: The base force multiplier for particle velocity
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
public static void CreateDirtWhiteParticles(float x, float y, int count, float offsetRadius, float force, float xI, float yI, Color color1, Color color2)
Creates white-tinted dirt particles with two color variations. Combines dirt dots at 1.4x force (half count), small white dirt particles (two-thirds count), and smaller white dirt at 1.1x force (one-third count) for snow, ash, or other light-colored debris.
Parameters:
- float x: The x-coordinate of the particle origin
- float y: The y-coordinate of the particle origin
- int count: The total number of particles to create
- float offsetRadius: The spread radius for particle placement
- float force: The base force multiplier for particle velocity
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
- Color color1: The first color variation for the particles
- Color color2: The second color variation for the particles
public static void CreateDoodadGib(SpriteSM baseSprite, DoodadPiece doodadGibPrefab, Material material, float x, float y, float xForce, float yForce, float xI, float yI, int flipDirection)
Creates environmental debris based on DoodadGibsType enum. Special handling for SmallMolotov type which burns ground and damages units on impact. Falls back to blank doodad prefab for unspecified types. Copies sprite parameters from the base sprite for visual consistency.
Parameters:
- SpriteSM baseSprite: The source sprite to copy parameters from
- DoodadGibsType gibType: The type of doodad gib to create
- Material material: The material to apply to the doodad
- float x: The x-coordinate of the doodad origin
- float y: The y-coordinate of the doodad origin
- float xForce: The horizontal force multiplier
- float yForce: The vertical force multiplier
- float xI: The initial x-velocity
- float yI: The initial y-velocity
- int flipDirection: The horizontal flip direction
public static void CreateDoodadGib(SpriteSM baseSprite, DoodadPiece doodadGibPrefab, Material material, float x, float y, float xForce, float yForce, float xI, float yI, int flipDirection)
Creates environmental debris with explicit prefab specification. Copies all sprite parameters from the base sprite including offset, dimensions, and UV coordinates to maintain visual consistency when destructible objects break apart.
Parameters:
- SpriteSM baseSprite: The source sprite to copy parameters from
- DoodadPiece doodadGibPrefab: The doodad piece prefab to instantiate
- Material material: The material to apply to the doodad
- float x: The x-coordinate of the doodad origin
- float y: The y-coordinate of the doodad origin
- float xForce: The horizontal force multiplier
- float yForce: The vertical force multiplier
- float xI: The initial x-velocity
- float yI: The initial y-velocity
- int flipDirection: The horizontal flip direction
public static void CreateDustParticles(ParticleEmitter emitter, float x, float y, int count, float offsetRadius, float force, float xI, float yI, Color color)
Creates simple dust particles using the default dirt dots emitter. This convenience method forwards to the emitter-based overload for standard dust cloud effects with automatic dirt coloring.
Parameters:
- float x: The x-coordinate of the dust origin
- float y: The y-coordinate of the dust origin
- int count: The number of dust particles to create
- float offsetRadius: The spread radius for particle placement
- float force: The force multiplier for particle velocity
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
public static void CreateDustParticles(ParticleEmitter emitter, float x, float y, int count, float offsetRadius, float force, float xI, float yI, Color color)
Creates dust particles with a specified color. This wrapper method uses the default dirt dots emitter but applies the provided color instead of random dirt colors for custom dust effects.
Parameters:
- float x: The x-coordinate of the dust origin
- float y: The y-coordinate of the dust origin
- int count: The number of dust particles to create
- float offsetRadius: The spread radius for particle placement
- float force: The force multiplier for particle velocity
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
- Color color: The color to apply to all dust particles
public static void CreateDustParticlesRow(ParticleEmitter emitter, float x, float y, int count, float offsetXRadius, float xForce, float yForce, float xI, float yI, Color color)
Creates dust particles in a horizontal row pattern with custom color. This wrapper uses the default dirt dots emitter and forwards to the emitter-based row creation method.
Parameters:
- float x: The x-coordinate of the row center
- float y: The y-coordinate of the row (remains constant)
- int count: The number of dust particles to create
- float offsetRadius: The horizontal spread radius for the row
- float xForce: The horizontal force component
- float yForce: The vertical force component
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
- Color color: The color to apply to all dust particles
public static void CreateEggPopEffect(float x, float y, float z)
Creates an alien egg bursting effect at the specified 3D position. Used when alien eggs are destroyed or when facehuggers emerge from eggs.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
public static void CreateExplosion(float x, float y, float offsetXRadius, float offsetYRadius, float disturbRange, float delayM, float puffSpeed, float shakeM, float volume, bool groundWave, bool complexExplosion, int sparkCount = 40, bool whitePop = true)
Creates standard explosion effects with customizable parameters. Delegates to the full explosion method with default values for complex explosions (true), spark count (40), and white pop effect (true).
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float offsetXRadius: The horizontal randomization radius
- float offsetYRadius: The vertical randomization radius
- float disturbRange: The radius for environmental disturbance
- float delayM: The delay multiplier for effect timing
- float puffSpeed: The expansion speed of explosion puffs
- float shakeM: The camera shake intensity multiplier
- float volume: The explosion sound volume
- bool groundWave: Whether to create a ground shockwave effect
public static void CreateExplosion(float x, float y, float offsetXRadius, float offsetYRadius, float disturbRange, float delayM, float puffSpeed, float shakeM, float volume, bool groundWave, bool complexExplosion, int sparkCount = 40, bool whitePop = true)
Creates comprehensive explosion effects with full parameter control. Includes shader explosion, optional ground wave, tree shaking, wildlife/alien disturbance, sound effects, and screen shake. Resets accident ticker and can spawn complex multi-part explosions.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float offsetXRadius: The horizontal randomization radius
- float offsetYRadius: The vertical randomization radius
- float disturbRange: The radius for environmental disturbance
- float delayM: The delay multiplier for effect timing
- float puffSpeed: The expansion speed of explosion puffs
- float shakeM: The camera shake intensity multiplier
- float volume: The explosion sound volume
- bool groundWave: Whether to create a ground shockwave effect
- bool complexExplosion: Whether to spawn additional explosion parts
- int sparkCount: The number of spark particles to create
- bool whitePop: Whether to include the white flash effect
public static void CreateExplosionInRectangle(Vector3 bottonLeft, int widthInBlocks, int heightInBlocks, float randomOffset, float delayM, float puffSpeed, float xi, float yi, float shakeM, float volume, bool groundWave, bool debugDraw)
Creates a grid of explosions within a rectangular area. Spawns explosions at 16-unit intervals with random position offset and delay. Each explosion has randomized velocity based on the provided base values. Note: Several parameters are unused in implementation.
Parameters:
- Vector3 bottonLeft: The bottom-left corner position of the rectangle
- int widthInBlocks: The width in 16-unit blocks
- int heightInBlocks: The height in 16-unit blocks
- float randomOffset: The random position offset radius for each explosion
- float delayM: The delay multiplier (unused in implementation)
- float puffSpeed: The particle velocity speed multiplier
- float xi: The base horizontal velocity component
- float yi: The base vertical velocity component
- float shakeM: The camera shake multiplier (unused in implementation)
- float volume: The sound volume (unused in implementation)
- bool groundWave: Whether to create ground waves (unused in implementation)
- bool debugDraw: Whether to draw debug visualization (partially implemented)
public static void CreateExplosionParticle(Vector2 position, float size, Vector2 velocity)
Creates explosion particles at a fixed z-depth of 32. Currently ignores the size and velocity parameters in the implementation, creating standard explosion particles at the specified position.
Parameters:
- Vector2 position: The 2D position for the explosion particles
- float size: The intended size parameter (currently unused)
- Vector2 velocity: The intended velocity parameter (currently unused)
public static FlickerFader CreateFire(float x, float y, float z, float delay, Vector3 velocity)
Creates multiple fire effects distributed randomly within a circular area. Each fire has randomized delay and velocity based on its position relative to the center. Used for area fire damage and spreading flames.
Parameters:
- float x: The center x-coordinate in world space
- float y: The center y-coordinate in world space
- float z: The z-coordinate in world space
- int count: The number of fires to create
- float range: The radius of the circular spawn area
- float delay: The base delay multiplier for fire spawning
- float force: The velocity force multiplier
- Vector3 velocity: The base velocity vector for all fires
public static FlickerFader CreateFire(float x, float y, float z, float delay, Vector3 velocity)
Creates a single fire effect with specified parameters. Randomly selects from three flame prefab variations (flame1, flame2, flame3) with equal probability. Returns the FlickerFader component for further manipulation.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- float delay: The spawn delay in seconds
- Vector3 velocity: The initial velocity vector
Returns:
FlickerFader
: The created FlickerFader component for the fire effect
public static void CreateFireSparks(float x, float y, int count, float offsetRadius, float force, float xI, float yI, float redM)
Creates fire-type spark particles for burning and welding effects. Uses the specialized fire spark emitter to create hot sparks that appear during fire damage, explosions, or metalwork.
Parameters:
- float x: The x-coordinate where sparks originate
- float y: The y-coordinate where sparks originate
- int count: The number of fire sparks to create
- float offsetRadius: The spread radius for spark placement
- float force: The force multiplier for spark velocity
- float xI: The initial x-velocity added to all sparks
- float yI: The initial y-velocity added to all sparks
- float redM: The red color multiplier (0=yellow, 1=red)
public static ParticleSystem CreateFireTrail(Transform parent, Vector3 localOffset)
Creates a fire trail particle system attached to a parent transform. The trail follows the parent's movement and is positioned at the specified local offset. Used for flaming projectiles and burning objects.
Parameters:
- Transform parent: The transform to attach the fire trail to
- Vector3 localOffset: The local position offset from the parent
Returns:
ParticleSystem
: The created ParticleSystem component for further manipulation
public static void CreateFlameEffect(float x, float y, float delay, Vector3 velocity)
Creates flame particle effects with occasional fire sparks. Always creates a flame particle and has 16.7% chance (2/12) to also spawn fire sparks for added visual variety. Used for standard fire effects.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float delay: The spawn delay for the flame particle
- Vector3 velocity: The initial velocity vector
public static void CreateFlameParticle(float x, float y, float z)
Creates standard flame lick particles at default background depth. Calls the z-parameter overload with z = -12 for consistent background flame placement.
Parameters:
- float x: The x-coordinate where the flame appears
- float y: The y-coordinate where the flame appears
public static void CreateFlameParticle(float x, float y, float z)
Creates standard flame lick particles with custom z-depth. Uses the FlameLicks particle emitter to generate realistic fire particles. Includes null checks for both instance and FlameLicks emitter.
Parameters:
- float x: The x-coordinate where the flame appears
- float y: The y-coordinate where the flame appears
- float z: The z-coordinate (depth) of the flame particle
public static void CreateGib(Gib gibPrefab, Material material, float centerX, float centerY, float hitX, float hitY, float xForce, float yForce, float xI, float yI, int flipDirection)
Creates a single gib instance with material and flip control. Sets up the gib's sprite with rotation settings from the prefab and launches it based on its local position relative to the origin point.
Parameters:
- Gib gibPrefab: The gib prefab to instantiate
- Material material: The material to apply to the gib
- float centerX: The x-coordinate of the gib origin
- float centerY: The y-coordinate of the gib origin
- float xForce: The horizontal force multiplier
- float yForce: The vertical force multiplier
- float xI: The initial x-velocity
- float yI: The initial y-velocity
- int flipDirection: The horizontal flip direction
public static void CreateGib(Gib gibPrefab, Material material, float centerX, float centerY, float hitX, float hitY, float xForce, float yForce, float xI, float yI, int flipDirection)
Creates a single gib with hit position parameters. Currently identical to the simpler overload as hit position parameters are not utilized in the implementation. Maintained for API compatibility.
Parameters:
- Gib gibPrefab: The gib prefab to instantiate
- Material material: The material to apply to the gib
- float centerX: The x-coordinate of the gib origin
- float centerY: The y-coordinate of the gib origin
- float hitX: The x-coordinate of the impact (unused)
- float hitY: The y-coordinate of the impact (unused)
- float xForce: The horizontal force multiplier
- float yForce: The vertical force multiplier
- float xI: The initial x-velocity
- float yI: The initial y-velocity
- int flipDirection: The horizontal flip direction
public static void CreateGibs(GibHolder gibs, int count, float x, float y, float xForce, float yForce, float xI, float yI, int flipDirection)
Creates gibs with center offset calculation for directional launching. Calculates launch vectors based on the difference between hit position and center position, creating realistic debris patterns that fly away from the impact point.
Parameters:
- GibHolder gibs: The GibHolder containing gib prefabs
- float centerX: The x-coordinate of the object center
- float centerY: The y-coordinate of the object center
- float hitX: The x-coordinate of the impact point
- float hitY: The y-coordinate of the impact point
- float xForce: The horizontal force multiplier
- float yForce: The vertical force multiplier
- float xI: The initial x-velocity for all gibs
- float yI: The initial y-velocity for all gibs
public static void CreateGibs(GibHolder gibs, int count, float x, float y, float xForce, float yForce, float xI, float yI, int flipDirection)
Creates gibs with explicit material override. Forces all created gibs to use the specified material regardless of their prefab settings, useful for themed destruction effects or material-specific debris.
Parameters:
- GibHolder gibs: The GibHolder containing gib prefabs
- Material material: The material to apply to all gibs
- float x: The x-coordinate of the gib origin
- float y: The y-coordinate of the gib origin
- float xForce: The horizontal force multiplier
- float yForce: The vertical force multiplier
- float xI: The initial x-velocity for all gibs
- float yI: The initial y-velocity for all gibs
public static void CreateGibs(GibHolder gibs, int count, float x, float y, float xForce, float yForce, float xI, float yI, int flipDirection)
Creates gibs using each child's original material. The standard gib creation method that preserves the visual appearance defined in the prefabs while applying physics forces.
Parameters:
- GibHolder gibs: The GibHolder containing gib prefabs
- float x: The x-coordinate of the gib origin
- float y: The y-coordinate of the gib origin
- float xForce: The horizontal force multiplier
- float yForce: The vertical force multiplier
- float xI: The initial x-velocity for all gibs
- float yI: The initial y-velocity for all gibs
public static void CreateGibs(GibHolder gibs, int count, float x, float y, float xForce, float yForce, float xI, float yI, int flipDirection)
Creates a limited number of gibs with default flip direction. Allows control over the maximum number of gibs created, useful for performance management or specific visual effects.
Parameters:
- GibHolder gibs: The GibHolder containing gib prefabs
- int count: The maximum number of gibs to create
- float x: The x-coordinate of the gib origin
- float y: The y-coordinate of the gib origin
- float xForce: The horizontal force multiplier
- float yForce: The vertical force multiplier
- float xI: The initial x-velocity for all gibs
- float yI: The initial y-velocity for all gibs
public static void CreateGibs(GibHolder gibs, int count, float x, float y, float xForce, float yForce, float xI, float yI, int flipDirection)
Creates a limited number of gibs with flip direction control. Applies 0.8-1.2x random force variance to each gib for natural scatter patterns. The flip direction parameter controls horizontal sprite orientation.
Parameters:
- GibHolder gibs: The GibHolder containing gib prefabs
- int count: The maximum number of gibs to create
- float x: The x-coordinate of the gib origin
- float y: The y-coordinate of the gib origin
- float xForce: The horizontal force multiplier
- float yForce: The vertical force multiplier
- float xI: The initial x-velocity for all gibs
- float yI: The initial y-velocity for all gibs
- int flipDirection: The horizontal flip direction (-1 for left, 1 for right)
public static void CreateGibsFromNestedGibHolder(GibHolder gibs, float hitX, float hitY, float xForce, float yForce, float xI, float yI)
Activates and launches pre-existing nested gib children from their parent holder. Iterates through all child transforms backwards, detaching and activating each gib before launching with scaled force (0.0625x multiplier). Preserves existing gib positions for authentic destruction patterns.
Parameters:
- GibHolder gibs: The GibHolder containing nested gib children
- float hitX: The x-coordinate of the impact point
- float hitY: The y-coordinate of the impact point
- float xForce: The horizontal force multiplier
- float yForce: The vertical force multiplier
- float xI: The initial x-velocity for all gibs
- float yI: The initial y-velocity for all gibs
public static void CreateGlassShards(float x, float y, int count, float offsetXRadius, float offsetYRadius, float disturbRange, float force, float xI, float yI, float shakeM, float shakeSpeedM, float volume, float sizeM = 1f)
Creates glass shattering effects with particle shards, sound, and environmental impact. Emits glass shard particles with random distribution, triggers camera shake, plays shattering sound, and disturbs nearby wildlife within the specified range.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- int count: The number of glass shard particles to create
- float offsetXRadius: The horizontal spawn radius for shards
- float offsetYRadius: The vertical spawn radius for shards
- float disturbRange: The radius for disturbing wildlife
- float force: The force multiplier for shard velocity
- float xI: The base horizontal velocity component
- float yI: The base vertical velocity component
- float shakeM: The camera shake intensity multiplier
- float shakeSpeedM: The camera shake speed multiplier
- float volume: The sound effect volume
- float sizeM: The size multiplier for glass shard particles
public static ProjectileTrail CreateGrenadeTrailEffect(float x, float y, float z, float life, Color color)
Creates a grenade trail effect that follows projectile movement. Instantiates the grenadeTrail prefab and initializes it with the specified color and lifetime for visual tracking.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- float life: The lifetime of the trail in seconds
- Color color: The color of the trail effect
Returns:
ProjectileTrail
: The created ProjectileTrail component for further manipulation
public static void CreateGreySandParticles(float x, float y, int count, float offsetRadius, float force, float xI, float yI)
Creates grey sand or bone-like debris particles. Combines bone dots at 1.4x force (full count) with small bone particles at normal force (one-third count) for ashen or skeletal debris effects.
Parameters:
- float x: The x-coordinate of the debris origin
- float y: The y-coordinate of the debris origin
- int count: The total number of particles to create
- float offsetRadius: The spread radius for particle placement
- float force: The base force multiplier for particle velocity
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
public static void CreateGrindingSparkShower(float x, float y, int count, float offsetRadius, float force, float xI, float yI, float redM)
Creates grinding or friction spark shower effects. Uses shower spark emitter with 20-40% lifetime for metal grinding, saw cutting, or heavy friction visual effects.
Parameters:
- float x: The x-coordinate where sparks originate
- float y: The y-coordinate where sparks originate
- int count: The number of grinding sparks to create
- float offsetRadius: The spread radius for spark placement
- float force: The force multiplier for spark velocity
- float xI: The initial x-velocity added to all sparks
- float yI: The initial y-velocity added to all sparks
- float redM: The red color multiplier (0=yellow, 1=red)
public static void CreateGroundWave(float x, float y, float range)
Creates an expanding ground shockwave effect radiating from the center point. The wave expands outward to the specified range, typically used with explosions to show ground impact effects.
Parameters:
- float x: The x-coordinate of the wave center
- float y: The y-coordinate of the wave center
- float range: The maximum expansion distance of the wave
public static void CreateHellPlumeParticle(float x, float y, float z, float force, float xI, float yI, float lifeM, float sizeM)
Creates hell-themed smoke plume particles with reduced opacity. Uses a red-tinted smoke variant with 30% alpha multiplier (0.3) for a supernatural, hellish atmosphere effect.
Parameters:
- float x: The x-coordinate where the plume originates
- float y: The y-coordinate where the plume originates
- float z: The z-coordinate (depth) of the plume
- float force: The initial force applied to the plume particle
- float xI: The initial x-velocity component
- float yI: The initial y-velocity component
- float lifeM: Life duration multiplier for the particle
- float sizeM: Size multiplier for the particle
public static void CreateHugeExplosion(float x, float y, float offsetXRadius, float offsetYRadius, float disturbRange, float delayM, float puffSpeed, float shakeM, float volume, int extraExplosionsCount, int shrapnelCount, float shrapnelForce, float groundWaveDistance, float lowPassFrequencyLossM, float flashEffectM)
Creates a comprehensive huge explosion with multiple visual and audio effects. Includes main explosion, extra random explosions, spark shower, camera shake, audio filters, wildlife disturbance, optional ground wave, and screen flash. Designed for major explosive events.
Parameters:
- float x: The x-coordinate of explosion center
- float y: The y-coordinate of explosion center
- float offsetXRadius: The horizontal spread for extra explosions
- float offsetYRadius: The vertical spread for extra explosions
- float disturbRange: The radius for disturbing wildlife
- float delayM: The delay multiplier (unused in implementation)
- float puffSpeed: The particle velocity multiplier
- float shakeM: The camera shake intensity multiplier
- float volume: The explosion sound volume
- int extraExplosionsCount: Number of additional explosion effects to spawn
- int shrapnelCount: Number of spark particles to create
- float shrapnelForce: The velocity force for spark particles
- float groundWaveDistance: The ground wave range (must be > 16 to activate)
- float lowPassFrequencyLossM: The audio low-pass filter intensity
- float flashEffectM: The screen flash effect intensity
public static ExplosionGroundWave CreateHugeShockWave(float x, float y, float range, bool createWavesInAir = false)
Creates a massive shockwave effect with optional aerial waves. The huge variant has greater visual impact and can optionally create waves in the air for enhanced effect. Returns the wave instance for customization.
Parameters:
- float x: The x-coordinate of the wave center
- float y: The y-coordinate of the wave center
- float range: The maximum expansion distance of the wave
- bool createWavesInAir: Whether to create additional aerial wave effects
Returns:
ExplosionGroundWave
: The created ExplosionGroundWave component
public static void CreateLargeBloodGushEffect(BloodColor color, float x, float y, float xI, float yI)
Creates an extra large blood gush effect for massive damage. Randomly selects from 3 large gush variations and flips horizontally based on impact direction. Used for heavy weapons and boss damage.
Parameters:
- BloodColor color: The blood color type for the gush effect
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float xI: The horizontal impact direction (sign determines flip)
- float yI: The vertical impact direction (unused in implementation)
public static void CreateLaserParticle(float x, float y, GameObject attachedGameObject)
Creates a laser burn effect that can attach to a GameObject. The burn effect follows the attached object if provided, useful for showing persistent laser damage on moving targets.
Parameters:
- float x: The x-coordinate of the laser burn
- float y: The y-coordinate of the laser burn
- GameObject attachedGameObject: Optional GameObject to attach the burn effect to
public static void CreateLeafBurst(float x, float y, float z, int count, float range, float xI, float yI, float force)
Creates foliage destruction effects with colored leaf particles. Distributes leaves between two prefab types as shrapnel-style particles. Used when vegetation is damaged or destroyed by explosions or impacts.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- int count: The number of leaf particles to create
- float range: The spawn radius for leaf distribution
- float xI: The base horizontal velocity component
- float yI: The base vertical velocity component
- float force: The velocity force multiplier
- Color leafColor: The color tint for the leaf particles
public static void CreateLeafBurst(float x, float y, float z, int count, float range, float xI, float yI, float force)
Creates foliage destruction effects with automatic leaf coloring. Delegates to the color-specific overload using the current map's leaf color setting. Provides convenient access to leaf effects without manual color specification.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- int count: The number of leaf particles to create
- float range: The spawn radius for leaf distribution
- float xI: The base horizontal velocity component
- float yI: The base vertical velocity component
- float force: The velocity force multiplier
public static void CreateMassiveExplosion(float x, float y, float offsetXRadius, float offsetYRadius, float disturbRange, float delayM, float puffSpeed, float shakeM, float volume, int extraExplosionsCount, int shrapnelCount, float shrapnelForce, float groundWaveDistance, float lowPassFrequencyLossM, float flashEffectM)
Creates a comprehensive massive explosion with enhanced effects. Nearly identical to huge explosion but uses larger prefabs and sounds. Includes all the same multi-layered effects for maximum visual and audio impact.
Parameters:
- float x: The x-coordinate of explosion center
- float y: The y-coordinate of explosion center
- float offsetXRadius: The horizontal spread for extra explosions
- float offsetYRadius: The vertical spread for extra explosions
- float disturbRange: The radius for disturbing wildlife
- float delayM: The delay multiplier (unused in implementation)
- float puffSpeed: The particle velocity multiplier
- float shakeM: The camera shake intensity multiplier
- float volume: The explosion sound volume
- int extraExplosionsCount: Number of additional explosion effects to spawn
- int shrapnelCount: Number of spark particles to create
- float shrapnelForce: The velocity force for spark particles
- float groundWaveDistance: The ground wave range (must be > 16 to activate)
- float lowPassFrequencyLossM: The audio low-pass filter intensity
- float flashEffectM: The screen flash effect intensity
public static void CreateMeleeStrikeEffect(float x, float y, float xI, float yI)
Creates a melee weapon strike effect. The effect is horizontally flipped based on attack direction and vertically flipped on alternating strikes for visual variety. Uses a static scale multiplier that alternates between 1 and -1.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float xI: The horizontal attack direction (sign determines horizontal flip)
- float yI: The vertical attack direction (unused in implementation)
public static void CreateMeleeStrikeLargeEffect(float x, float y, float xI, float yI)
Creates a large melee weapon strike effect for heavy attacks. Functions identically to standard melee strikes but uses a larger prefab. Alternates vertical scale for variety.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float xI: The horizontal attack direction (sign determines horizontal flip)
- float yI: The vertical attack direction (unused in implementation)
public static void CreateMetalParticles(float x, float y, int count, float xOffsetRadius, float yOffsetRadius, float force, float xI, float yI, float angularVelocity)
Creates metal debris particles without rotation. Combines dirt dots at 1.4x force for dust effects with small metal particles at normal force for metallic debris. Splits the count evenly between the two particle types.
Parameters:
- float x: The x-coordinate of the debris origin
- float y: The y-coordinate of the debris origin
- int count: The total number of particles to create
- float offsetRadius: The spread radius for particle placement
- float force: The base force multiplier for particle velocity
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
public static void CreateMetalParticles(float x, float y, int count, float xOffsetRadius, float yOffsetRadius, float force, float xI, float yI, float angularVelocity)
Creates rotating metal particle effects with uniform spread. This convenience overload for the rotating version calls the full method with equal x and y offset radii for circular patterns.
Parameters:
- float x: The x-coordinate of the metal origin
- float y: The y-coordinate of the metal origin
- int count: The total number of particles to create
- float offsetRadius: The uniform spread radius for particle placement
- float force: The base force multiplier for particle velocity
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
- float angularVelocity: The rotational velocity for spinning metal pieces
public static void CreateMetalParticles(float x, float y, int count, float xOffsetRadius, float yOffsetRadius, float force, float xI, float yI, float angularVelocity)
Creates rotating metal particle effects with elliptical spread. Uses two metal emitters with the first getting 1 + count/2 particles at 1.2x force and the second getting count/2 at 1.1x force for standard metal destruction with rotation.
Parameters:
- float x: The x-coordinate of the metal origin
- float y: The y-coordinate of the metal origin
- int count: The total number of particles to create
- float xOffsetRadius: The horizontal spread radius for particle placement
- float yOffsetRadius: The vertical spread radius for particle placement
- float force: The base force multiplier for particle velocity
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
- float angularVelocity: The rotational velocity for spinning metal pieces
public static ExplosionGroundWave CreateMusicalShockWave(float x, float y, float range)
Creates a musical-themed shockwave effect with unique visuals. Likely includes note or sound-based visual elements. Returns the wave instance for customization.
Parameters:
- float x: The x-coordinate of the wave center
- float y: The y-coordinate of the wave center
- float range: The maximum expansion distance of the wave
Returns:
ExplosionGroundWave
: The created ExplosionGroundWave component
public static void CreateMuzzleFlashBigEffect(float x, float y, float z, float xI, float yI)
Creates a large muzzle flash effect for heavy weapons. Instantiates both the big flash animation and big glow effect. Unlike smaller flashes, this is not parented to any transform and remains stationary.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- float xI: The horizontal velocity component for orientation
- float yI: The vertical velocity component for orientation
public static void CreateMuzzleFlashEffect(float x, float y, float z, float xI, float yI, Transform parent)
Creates a standard muzzle flash effect for weapon firing. Instantiates both the main flash animation oriented by velocity and a separate glow effect. The main flash is parented to the provided transform for proper movement tracking.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- float xI: The horizontal velocity component for orientation
- float yI: The vertical velocity component for orientation
- Transform parent: The transform to parent the main flash effect to
public static void CreateMuzzleFlashMediumEffect(float x, float y, float z, float xI, float yI, Transform parent)
Creates a medium-sized muzzle flash effect for intermediate weapons. Instantiates both the medium flash animation and standard glow effect. The main flash is parented to the provided transform for proper tracking.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- float xI: The horizontal velocity component for orientation
- float yI: The vertical velocity component for orientation
- Transform parent: The transform to parent the main flash effect to
public static void CreateMuzzleFlashRoundEffect(float x, float y, float z, float xI, float yI, Transform parent)
Creates a round muzzle flash effect for circular barrel weapons. Instantiates both the round flash animation and standard glow effect. The main flash is parented to the provided transform for proper tracking.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- float xI: The horizontal velocity component for orientation
- float yI: The vertical velocity component for orientation
- Transform parent: The transform to parent the main flash effect to
public static void CreateMuzzleFlashRoundEffectBlue(float x, float y, float z, float xI, float yI, Transform parent)
Creates a blue-tinted round muzzle flash for energy weapons. Uses the specialized blue round flash prefab with standard glow effect. The main flash is parented to the provided transform for proper tracking.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- float xI: The horizontal velocity component for orientation
- float yI: The vertical velocity component for orientation
- Transform parent: The transform to parent the main flash effect to
public static void CreateMuzzleFlashTankCannonEffect(float x, float y, float z, float xI, float yI)
Creates a massive tank cannon muzzle flash effect. Uses the tank cannon flash prefab with huge glow effect. The flash is horizontally flipped based on firing direction (sign of xI) to ensure proper orientation.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- float xI: The horizontal velocity component (sign determines flip)
- float yI: The vertical velocity component for orientation
public static void CreateMuzzleFlashVomitEffect(float x, float y, float z, float xI, float yI, Transform parent)
Creates a vomit-style muzzle flash effect for acid/bile weapons. Instantiates the vomit flash animation oriented by velocity and parents it to the provided transform. Does not include a glow effect like standard muzzle flashes.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- float xI: The horizontal velocity component for orientation
- float yI: The vertical velocity component for orientation
- Transform parent: The transform to parent the effect to
public static void CreateNuclearExplosion(float x, float y, float z)
Creates a nuclear explosion particle effect. Instantiates the specialized nuclear explosion particle system at the specified position without additional effects or modifications.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
public static void CreateOilyFlameEffect(float x, float y, float delay, Vector3 velocity)
Creates oily flame particle effects with occasional fire sparks. Similar to standard flames but uses oily flame particles for darker, smokier appearance. Has 16.7% chance to spawn additional sparks.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float delay: The spawn delay for the flame particle
- Vector3 velocity: The initial velocity vector
public static void CreateOilyFlameParticle(float x, float y, float z)
Creates oil-based flame particles at default background depth. These darker, smokier flames are used for burning oil effects. Calls the z-parameter overload with z = -12.
Parameters:
- float x: The x-coordinate where the oily flame appears
- float y: The y-coordinate where the oily flame appears
public static void CreateOilyFlameParticle(float x, float y, float z)
Creates oil-based flame particles with custom z-depth. Uses the OilyFlameLicks particle emitter for darker, smokier fire effects typical of burning oil. Includes null checks for safety.
Parameters:
- float x: The x-coordinate where the oily flame appears
- float y: The y-coordinate where the oily flame appears
- float z: The z-coordinate (depth) of the oily flame particle
public static void CreatePinkPlumeParticle(float x, float y, float z, float force, float xI, float yI, float lifeM, float sizeM)
Creates pink-colored smoke plume particles with reduced opacity. Uses a pink smoke variant with 30% alpha multiplier (0.3) for whimsical or special effect smoke.
Parameters:
- float x: The x-coordinate where the plume originates
- float y: The y-coordinate where the plume originates
- float z: The z-coordinate (depth) of the plume
- float force: The initial force applied to the plume particle
- float xI: The initial x-velocity component
- float yI: The initial y-velocity component
- float lifeM: Life duration multiplier for the particle
- float sizeM: Size multiplier for the particle
public static void CreatePitchBlackPlumeParticle(float x, float y, float z, float force, float xI, float yI, float lifeM, float sizeM)
Creates extremely dark black smoke plume particles. Uses a pitch black variant with full alpha (1.0) for maximum opacity, suitable for heavy smoke or soot effects from intense fires.
Parameters:
- float x: The x-coordinate where the plume originates
- float y: The y-coordinate where the plume originates
- float z: The z-coordinate (depth) of the plume
- float force: The initial force applied to the plume particle
- float xI: The initial x-velocity component
- float yI: The initial y-velocity component
- float lifeM: Life duration multiplier for the particle
- float sizeM: Size multiplier for the particle
public static void CreatePlumeParticle(float x, float y, float z, float force, float xI, float yI, float lifeM, float sizeM)
Creates standard gray smoke plume particles at z-depth 0. This is a convenience overload that calls the full version with default z positioning for standard smoke effects.
Parameters:
- float x: The x-coordinate where the plume originates
- float y: The y-coordinate where the plume originates
- float force: The initial force applied to the plume particle
- float xI: The initial x-velocity component
- float yI: The initial y-velocity component
- float lifeM: Life duration multiplier for the particle
- float sizeM: Size multiplier for the particle
public static void CreatePlumeParticle(float x, float y, float z, float force, float xI, float yI, float lifeM, float sizeM)
Creates standard gray smoke plume particles with full control. Automatically selects between small and large plume variants based on size multiplier (threshold at 2). Randomly picks between two texture variations for each size category. Large plumes have their size halved for proper scaling.
Parameters:
- float x: The x-coordinate where the plume originates
- float y: The y-coordinate where the plume originates
- float z: The z-coordinate (depth) of the plume
- float force: The initial force applied to the plume particle
- float xI: The initial x-velocity component
- float yI: The initial y-velocity component
- float lifeM: Life duration multiplier for the particle
- float sizeM: Size multiplier (less than 2 uses small plumes, 2+ uses large plumes)
public static void CreatePlumes(float x, float y, int count, float radius, float force, float xI, float yI)
Creates multiple smoke plume shrapnel effects in a circular pattern. Uses CreateShrapnelCircle internally to distribute smoke plumes evenly around the origin point, useful for large explosions or smoke grenades.
Parameters:
- float x: The x-coordinate of the plume origin
- float y: The y-coordinate of the plume origin
- int count: The number of smoke plumes to create
- float radius: The radius of the circular spread pattern
- float force: The outward force applied to each plume
- float xI: The initial x-velocity added to all plumes
- float yI: The initial y-velocity added to all plumes
public static void CreatePredabroPlasmaPop(float x, float y)
Creates a Predator-style plasma explosion effect. Used for alien technology weapons and plasma-based projectile impacts with distinctive visual styling.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
public static ProjectileTrail CreatePredictionTrailEffect(float x, float y, float z, float life, Color color)
Creates a prediction trail effect for trajectory visualization. Instantiates the predictionTrail prefab and initializes it with the specified color and lifetime for showing predicted paths.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- float life: The lifetime of the trail in seconds
- Color color: The color of the trail effect
Returns:
ProjectileTrail
: The created ProjectileTrail component for further manipulation
public static void CreateProjectileLargePopEffect(float x, float y)
Creates a large projectile impact effect. Combines a larger pop animation (projectileLargeFlickPuff) with a glowing flash effect for visual feedback when heavy projectiles hit surfaces or expire.
Parameters:
- float x: The x-coordinate of the impact position
- float y: The y-coordinate of the impact position
public static void CreateProjectilePopEffect(float x, float y)
Creates a small projectile impact effect. Combines a pop animation (projectileFlickPuff) with a glowing flash effect for visual feedback when projectiles hit surfaces or expire.
Parameters:
- float x: The x-coordinate of the impact position
- float y: The y-coordinate of the impact position
public static void CreateProjectilePopWhiteEffect(float x, float y)
Creates a white-colored projectile impact effect. Combines a white pop animation (projectileWhiteFlickPuff) with a glowing flash effect for visual feedback when energy or special projectiles hit surfaces.
Parameters:
- float x: The x-coordinate of the impact position
- float y: The y-coordinate of the impact position
public static void CreateProjectilePuff(float x, float y)
Creates projectile impact effects combining a puff and glow. Spawns both a projectile flick puff and small muzzle flash glow at the impact position for bullet hits and similar projectile impacts.
Parameters:
- float x: The x-coordinate of impact in world space
- float y: The y-coordinate of impact in world space
public static void CreateProjectileTimeBroPopEffect(float x, float y)
Creates a special effect for projectile time (bullet time) activation. The effect ignores time scale to maintain visual consistency during slow-motion gameplay. Combines a white flicker puff with a small muzzle flash glow distortion for dramatic effect.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
public static void CreatePunchPopEffect(float x, float y, Vector3 velocity)
Creates a directional punch impact effect. The effect automatically orients itself based on the velocity vector, flipping horizontally when punching left (negative x velocity).
Parameters:
- float x: The x-coordinate of the impact
- float y: The y-coordinate of the impact
- Vector3 velocity: The punch velocity vector used to determine effect orientation
public static void CreatePurplePlumeParticle(float x, float y, float z, float force, float xI, float yI, float lifeM, float sizeM)
Creates purple-colored smoke plume particles with reduced opacity. Uses a purple smoke variant with 30% alpha multiplier (0.3) for magical or poisonous gas effects.
Parameters:
- float x: The x-coordinate where the plume originates
- float y: The y-coordinate where the plume originates
- float z: The z-coordinate (depth) of the plume
- float force: The initial force applied to the plume particle
- float xI: The initial x-velocity component
- float yI: The initial y-velocity component
- float lifeM: Life duration multiplier for the particle
- float sizeM: Size multiplier for the particle
public static void CreateRedWarningDiamondHuge(float x, float y, Transform parentedTransform)
Creates a huge diamond-shaped red warning effect. The effect is parented to the provided transform for movement tracking. Used for major threat indicators or boss attacks.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- Transform parentedTransform: The transform to parent the effect to
public static void CreateRedWarningDiamondLargege(float x, float y, Transform parentedTransform)
Creates a large diamond-shaped red warning effect. The effect is parented to the provided transform for movement tracking. Used for significant threat indicators. Note: Method name contains typo "Largege" instead of "Large".
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- Transform parentedTransform: The transform to parent the effect to
public static void CreateRedWarningEffect(float x, float y, Transform parentedTransform)
Creates a red warning pulse effect at the specified position. The effect is parented to the provided transform for movement tracking. Used to indicate danger zones or incoming attacks.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- Transform parentedTransform: The transform to parent the effect to
public static void CreateSandDots(float x, float y, int count, float offsetRadius, float force, float xI, float yI)
Creates only sand dot particles for simple sand puff effects. Uses 1.4x force multiplier for enhanced spread. Simpler than CreateSandParticles as it omits the small sand particles.
Parameters:
- float x: The x-coordinate of the sand origin
- float y: The y-coordinate of the sand origin
- int count: The number of sand dots to create
- float offsetRadius: The spread radius for particle placement
- float force: The base force multiplier for particle velocity
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
public static void CreateSandParticles(ParticleEmitter emitter, float x, float y, int count, float offsetRadius, float force, float xI, float yI)
Creates sandy debris particles for desert or beach environments. Combines sand dots at 1.4x force (full count) with small sand particles at normal force (one-third count) for a dusty sand effect.
Parameters:
- float x: The x-coordinate of the sand origin
- float y: The y-coordinate of the sand origin
- int count: The total number of particles to create
- float offsetRadius: The spread radius for particle placement
- float force: The base force multiplier for particle velocity
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
public static void CreateSandWhiteParticles(float x, float y, int count, float offsetRadius, float force, float xI, float yI, Color color1, Color color2)
Creates white-tinted sand particles with two color variations. Uses dirt dots at 1.4x force (full count) combined with small white dirt particles (one-third count) for light-colored sand or ash effects.
Parameters:
- float x: The x-coordinate of the particle origin
- float y: The y-coordinate of the particle origin
- int count: The total number of particles to create
- float offsetRadius: The spread radius for particle placement
- float force: The base force multiplier for particle velocity
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
- Color color1: The first color variation for the particles
- Color color2: The second color variation for the particles
public static void CreateScrapParticles(float x, float y, int count, float xOffsetRadius, float yOffsetRadius, float force, float xI, float yI, float angularVelocity)
Creates complex scrap metal destruction effects. The most detailed metal particle effect, combining: 5 scrap emitters with varying counts and forces, grey dirt dots at 1.4x force, 2 tiny scrap emitters at 1.6x force, and 2 metal emitters at 1.6x force. Second scrap emitter uses 1.5x angular velocity for varied rotation speeds.
Parameters:
- float x: The x-coordinate of the scrap origin
- float y: The y-coordinate of the scrap origin
- int count: The total number of particles to create
- float xOffsetRadius: The horizontal spread radius for particle placement
- float yOffsetRadius: The vertical spread radius for particle placement
- float force: The base force multiplier for particle velocity
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
- float angularVelocity: The base rotational velocity for spinning pieces
public static void CreateSemenParticles(BloodColor color, float x, float y, float z, int count, float offsetXRadius, float offsetYRadius, float force, float xI, float yI)
Creates semen particle effects using two particle sizes. Distributes particles between small particles (1/2 of count + 1) and dot particles (1/2 of count + 1). Each particle type uses reduced spawn radius (10% of provided). Note: The BloodColor parameter appears unused.
Parameters:
- BloodColor color: The blood color type (parameter appears unused in implementation)
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- int count: The total number of particles to create across both sizes
- float offsetXRadius: The horizontal spawn radius around the center position
- float offsetYRadius: The vertical spawn radius around the center position
- float force: The force multiplier for particle velocity
- float xI: The base horizontal velocity component
- float yI: The base vertical velocity component
public static void CreateSemenParticlesDots(BloodColor color, float x, float y, float z, int count, float offsetXRadius, float offsetYRadius, float force, float xI, float yI, float scaleM)
Creates semen dot particle effects at the specified position with z-coordinate of 1. This method delegates to CreateBloodParticlesDots, effectively treating semen dots as blood dot particles.
Parameters:
- BloodColor color: The blood color type (used for blood particle creation)
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- int count: The number of dot particles to create
- float offsetXRadius: The horizontal spawn radius around the center position
- float offsetYRadius: The vertical spawn radius around the center position
- float force: The force multiplier for particle velocity
- float xI: The base horizontal velocity component
- float yI: The base vertical velocity component
- float scaleM: The scale multiplier for particle size
public static void CreateSemenParticlesDots(BloodColor color, float x, float y, float z, int count, float offsetXRadius, float offsetYRadius, float force, float xI, float yI, float scaleM)
Creates semen dot particle effects with clustered spawning and size scaling. Uses dedicated semen dot emitter (or cutscene blood dots as fallback) with 50% chance to add extra particle. Implements clustering where 60% spawn near previous positions with semi-transparent color (70-110% alpha).
Parameters:
- BloodColor color: The blood color type (parameter appears unused in implementation)
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- int count: The number of dot particles to create
- float offsetXRadius: The horizontal spawn radius around the center position
- float offsetYRadius: The vertical spawn radius around the center position
- float force: The force multiplier for particle velocity
- float xI: The base horizontal velocity component
- float yI: The base vertical velocity component
- float scaleM: The scale multiplier for particle size
public static void CreateSemenParticlesSmall(BloodColor color, float x, float y, float z, int count, float offsetXRadius, float offsetYRadius, float force, float xI, float yI)
Creates small semen particle effects at the specified position with z-coordinate of
- This method delegates to CreateBloodParticlesSmall, effectively treating semen as a blood particle type.
Parameters:
- BloodColor color: The blood color type (used for blood particle creation)
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- int count: The number of particles to create
- float offsetXRadius: The horizontal spawn radius around the center position
- float offsetYRadius: The vertical spawn radius around the center position
- float force: The force multiplier for particle velocity
- float xI: The base horizontal velocity component
- float yI: The base vertical velocity component
public static void CreateSemenParticlesSmall(BloodColor color, float x, float y, float z, int count, float offsetXRadius, float offsetYRadius, float force, float xI, float yI)
Creates small semen particle effects with clustered spawning pattern. Uses dedicated semen particle emitter and implements clustering where 60% of particles spawn near previous positions. Particles emit with velocity based on spawn position plus base velocity, with brightness varying 80-100%.
Parameters:
- BloodColor color: The blood color type (parameter appears unused in implementation)
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- int count: The number of particles to create
- float offsetXRadius: The horizontal spawn radius around the center position
- float offsetYRadius: The vertical spawn radius around the center position
- float force: The force multiplier for particle velocity
- float xI: The base horizontal velocity component
- float yI: The base vertical velocity component
public static void CreateShaderExplosion(EffectsController.ExplosionSize size, Vector3 position, float delay = 0f)
Creates shader-based particle explosions of specified size. Supports various explosion scales from Tiny to Massive, with optional white flash suppression (LargeNoWhite). All particle systems respect the delay parameter for synchronized effects.
Parameters:
- ExplosionSize size: The explosion size enum (Tiny, Small, Medium, Large, Massive, LargeNoWhite)
- Vector3 position: The world position for the explosion center
- float delay: The delay in seconds before particles start emitting
public static Puff CreateShellSpeedTrail(float x, float y, float z, float angleZ, Vector3 velocity)
Creates speed trail effects for fast-moving projectiles like shells. The trail is oriented using the angleZ parameter to match projectile rotation. Returns the Puff component for attachment to moving objects.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- float angleZ: The rotation angle in degrees for trail orientation
- Vector3 velocity: The initial velocity vector
Returns:
Puff
: The created Puff component for the speed trail
public static void CreateShinyMetalParticles(float x, float y, int count, float xOffsetRadius, float yOffsetRadius, float force, float xI, float yI, float angularVelocity)
Creates shiny metallic particle effects with rotation. Uses two shiny metal emitters, each receiving 1 + count/2 particles at 1.2x force for polished metal destruction effects with realistic spinning.
Parameters:
- float x: The x-coordinate of the metal origin
- float y: The y-coordinate of the metal origin
- int count: The total number of particles to create
- float xOffsetRadius: The horizontal spread radius for particle placement
- float yOffsetRadius: The vertical spread radius for particle placement
- float force: The base force multiplier for particle velocity
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
- float angularVelocity: The rotational velocity for spinning metal pieces
public static ExplosionGroundWave CreateShockWave(float x, float y, float range)
Creates a standard shockwave effect with visual distortion. Returns the wave instance for additional customization. Used for medium-scale explosions and impacts.
Parameters:
- float x: The x-coordinate of the wave center
- float y: The y-coordinate of the wave center
- float range: The maximum expansion distance of the wave
Returns:
ExplosionGroundWave
: The created ExplosionGroundWave component
public static void CreateShrapnel(Shrapnel shrapnelPrefab, Material sharedMaterial, float x, float y, float radius, float force, float count, float xI, float yI)
Creates shrapnel debris with initial velocity inheritance. This basic overload creates white-colored shrapnel pieces that spread randomly within the radius and inherit the specified initial velocity.
Parameters:
- Shrapnel shrapnelPrefab: The shrapnel prefab template to instantiate
- float x: The x-coordinate of the shrapnel origin
- float y: The y-coordinate of the shrapnel origin
- float radius: The maximum spread radius for shrapnel pieces
- float force: The launch force multiplier for shrapnel velocity
- float count: The number of shrapnel pieces to create
- float xI: The initial x-velocity to add to each piece
- float yI: The initial y-velocity to add to each piece
public static void CreateShrapnel(Shrapnel shrapnelPrefab, Material sharedMaterial, float x, float y, float radius, float force, float count, float xI, float yI)
Creates colored shrapnel debris with initial velocity inheritance. Spreads pieces randomly within the radius, applies the specified color tint (if not white), and launches with force proportional to distance from origin plus the inherited velocity.
Parameters:
- Shrapnel shrapnelPrefab: The shrapnel prefab template to instantiate
- float x: The x-coordinate of the shrapnel origin
- float y: The y-coordinate of the shrapnel origin
- float radius: The maximum spread radius for shrapnel pieces
- float force: The launch force multiplier for shrapnel velocity
- float count: The number of shrapnel pieces to create
- float xI: The initial x-velocity to add to each piece
- float yI: The initial y-velocity to add to each piece
- Color shrapnelColor: The color tint to apply to the shrapnel pieces
public static void CreateShrapnel(Shrapnel shrapnelPrefab, Material sharedMaterial, float x, float y, float radius, float force, float count, float xI, float yI)
Creates shrapnel debris with a custom material override. Spreads pieces randomly within the radius and applies the specified shared material to each piece's renderer before launching.
Parameters:
- Shrapnel shrapnelPrefab: The shrapnel prefab template to instantiate
- Material sharedMaterial: The material to apply to all shrapnel pieces
- float x: The x-coordinate of the shrapnel origin
- float y: The y-coordinate of the shrapnel origin
- float radius: The maximum spread radius for shrapnel pieces
- float force: The launch force multiplier for shrapnel velocity
- float count: The number of shrapnel pieces to create
- float xI: The initial x-velocity to add to each piece
- float yI: The initial y-velocity to add to each piece
public static void CreateShrapnelBlindStar(float x, float y, float radius, float force, float count, float xI, float yI, Transform unitTransform)
Creates stunning star effects that attach to and follow a unit. Uses PuffTwoLayer effects cycling through 3 star variants. Each star is parented to the unit transform so it moves with the stunned character. Increments the global stunned stars counter for effect management.
Parameters:
- float x: The x-coordinate for star creation (before parenting)
- float y: The y-coordinate for star creation (before parenting)
- float radius: The spread radius for star positioning
- float force: The initial force for star movement (before parenting)
- float count: The number of star effects to create
- float xI: The initial x-velocity component
- float yI: The initial y-velocity component
- Transform unitTransform: The transform to parent the stars to (usually the stunned unit)
public static void CreateShrapnelCircle(Shrapnel shrapnelPrefab, float x, float y, float radius, float force, float count, float xI, float yI)
Creates shrapnel debris in a circular arc pattern. Distributes pieces evenly along an arc (size based on count), launching each outward from its position on the circle. Arc size ranges from 0.1 to 2π radians.
Parameters:
- Shrapnel shrapnelPrefab: The shrapnel prefab template to instantiate
- float x: The x-coordinate of the circle center
- float y: The y-coordinate of the circle center
- float radius: The radius of the circular pattern
- float force: The launch force multiplier for shrapnel velocity
- float count: The number of shrapnel pieces to create along the arc
- float xI: The initial x-velocity to add to each piece
- float yI: The initial y-velocity to add to each piece
public static void CreateSlimeExplosion(float x, float y, float offsetXRadius, float offsetYRadius, float disturbRange, float delayM, float puffSpeed, float shakeM, float volume, int extraExplosionsCount, int shrapnelCount, float shrapnelForce, float flashEffectM, Vector3 normal, BloodColor bloodColor = BloodColor.Green)
Creates a full-scale slime or blood explosion based on color. Includes main explosion, extra blood gushes, slime particles, camera shake, sound, wildlife disturbance, screen flash, 360-degree blood spray, and muzzle flash glow. The most comprehensive organic explosion effect.
Parameters:
- float x: The x-coordinate of explosion center
- float y: The y-coordinate of explosion center
- float offsetXRadius: The horizontal spread for extra effects
- float offsetYRadius: The vertical spread for extra effects
- float disturbRange: The radius for disturbing wildlife
- float delayM: The delay multiplier (unused)
- float puffSpeed: The particle speed multiplier (unused)
- float shakeM: The camera shake intensity multiplier
- float volume: The explosion sound volume
- int extraExplosionsCount: Number of additional blood gush effects
- int shrapnelCount: Number of slime particles to create
- float shrapnelForce: The velocity force for particles
- float flashEffectM: The screen flash effect intensity
- Vector3 normal: The surface normal direction (unused)
- BloodColor bloodColor: The blood color type (Green or Red supported)
public static void CreateSlimeExplosionSmall(float x, float y, float offsetXRadius, float offsetYRadius, float disturbRange, float delayM, float puffSpeed, float shakeM, float volume, int shrapnelCount, float shrapnelForce, Vector3 normal)
Creates a small slime/organic explosion effect. Spawns green slime particles, creates visual splatter, shakes camera, plays wet explosion sound, and disturbs nearby wildlife. The normal parameter is accepted but not used in the current implementation.
Parameters:
- float x: The x-coordinate of explosion center
- float y: The y-coordinate of explosion center
- float offsetXRadius: The horizontal spawn radius (unused)
- float offsetYRadius: The vertical spawn radius (unused)
- float disturbRange: The radius for disturbing wildlife
- float delayM: The delay multiplier (unused)
- float puffSpeed: The particle speed multiplier (unused)
- float shakeM: The camera shake intensity multiplier
- float volume: The explosion sound volume
- int shrapnelCount: Number of slime particles to create
- float shrapnelForce: The velocity force for slime particles
- Vector3 normal: The surface normal direction (unused)
public static void CreateSlimeParticles(Color color, float x, float y, float z, int count, float offsetXRadius, float offsetYRadius, float force, float xI, float yI)
Creates slime particle effects with the specified color and parameters. Delegates to the color-based overload after converting the BloodColor enum to its corresponding Unity Color, reducing the particle count by half.
Parameters:
- BloodColor color: The blood color type to use for slime particles
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- int count: The number of particles to create (will be halved internally)
- float offsetXRadius: The horizontal spawn radius around the center position
- float offsetYRadius: The vertical spawn radius around the center position
- float force: The force multiplier for particle velocity
- float xI: The base horizontal velocity component
- float yI: The base vertical velocity component
public static void CreateSlimeParticles(Color color, float x, float y, float z, int count, float offsetXRadius, float offsetYRadius, float force, float xI, float yI)
Creates slime particle effects with a specific Unity Color. Uses a clustered spawning pattern where 60% of particles spawn near previous positions to create more organic slime trails. Particles emit with velocity based on their spawn position relative to the center plus base velocity components.
Parameters:
- Color color: The Unity Color for the slime particles
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- int count: The number of particles to create
- float offsetXRadius: The horizontal spawn radius around the center position
- float offsetYRadius: The vertical spawn radius around the center position
- float force: The force multiplier for particle velocity
- float xI: The base horizontal velocity component
- float yI: The base vertical velocity component
public static void CreateSmallExplosion(float x, float y, float z, float shakeM, float volume)
Creates small-scale explosion effects with shader particles and optional flames. Uses random shader explosion size (Small, Medium, or Large) and spawns 0-3 flame effects in various patterns. Includes camera shake, sound, and accident ticker reset.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- float shakeM: The camera shake intensity multiplier
- float volume: The explosion sound volume
public static ParticleSystem CreateSmallFireTrail(Transform parent, Vector3 localOffset)
Creates a smaller fire trail particle system attached to a parent transform. Similar to standard fire trail but with reduced particle count and size. Used for smaller burning projectiles or effects.
Parameters:
- Transform parent: The transform to attach the fire trail to
- Vector3 localOffset: The local position offset from the parent
Returns:
ParticleSystem
: The created ParticleSystem component for further manipulation
public static void CreateSmallWhiteParticles(float x, float y, int count, float offsetRadius, float force, float xI, float yI, Color color1, Color color2)
Creates small white particles with two color variations. Combines smaller white particles (one-quarter count) with dirt dots at 1.1x force (three-quarters count) for fine powder or dust effects.
Parameters:
- float x: The x-coordinate of the particle origin
- float y: The y-coordinate of the particle origin
- int count: The total number of particles to create
- float offsetRadius: The spread radius for particle placement
- float force: The base force multiplier for particle velocity
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
- Color color1: The first color variation for the particles
- Color color2: The second color variation for the particles
public static void CreateSparkParticle(float x, float y, float z, float offsetRadius, float force, float xI, float yI, Color color, float lifeM)
Creates a single spark particle with default lifetime. Color interpolates from yellow (1,1,0.3) to red (1,0,0) based on the redM parameter for temperature-based coloring.
Parameters:
- float x: The x-coordinate for the spark
- float y: The y-coordinate for the spark
- float z: The z-coordinate for the spark
- float offsetRadius: The random position offset radius
- float force: The force multiplier for spark velocity
- float xI: The initial x-velocity component
- float yI: The initial y-velocity component
- float redM: The red color multiplier (0=yellow hot, 1=red hot)
public static void CreateSparkParticle(float x, float y, float z, float offsetRadius, float force, float xI, float yI, Color color, float lifeM)
Creates a single spark particle with custom lifetime multiplier. Allows control over how long the spark remains visible while maintaining temperature-based color interpolation.
Parameters:
- float x: The x-coordinate for the spark
- float y: The y-coordinate for the spark
- float z: The z-coordinate for the spark
- float offsetRadius: The random position offset radius
- float force: The force multiplier for spark velocity
- float xI: The initial x-velocity component
- float yI: The initial y-velocity component
- float redM: The red color multiplier (0=yellow hot, 1=red hot)
- float lifeM: The lifetime multiplier for the spark
public static void CreateSparkParticle(float x, float y, float z, float offsetRadius, float force, float xI, float yI, Color color, float lifeM)
Creates a single spark particle with explicit color and lifetime control. Bypasses temperature interpolation for direct color specification, useful for non-fire spark effects.
Parameters:
- float x: The x-coordinate for the spark
- float y: The y-coordinate for the spark
- float z: The z-coordinate for the spark
- float offsetRadius: The random position offset radius
- float force: The force multiplier for spark velocity
- float xI: The initial x-velocity component
- float yI: The initial y-velocity component
- Color color: The explicit color for the spark
- float lifeM: The lifetime multiplier for the spark
public static void CreateSparkParticles(ParticleEmitter emitter, float x, float y, int count, float offsetRadius, float force, float xI, float yI, float redM, float lifeM)
Creates multiple spark particles with 3D positioning and lifetime control. Each spark gets temperature-based coloring and the specified lifetime multiplier.
Parameters:
- float x: The x-coordinate for spark origin
- float y: The y-coordinate for spark origin
- float z: The z-coordinate for spark origin
- int count: The number of sparks to create
- float offsetRadius: The spread radius for spark placement
- float force: The force multiplier for spark velocity
- float xI: The initial x-velocity added to all sparks
- float yI: The initial y-velocity added to all sparks
- float redM: The red color multiplier (0=yellow hot, 1=red hot)
- float lifeM: The lifetime multiplier for all sparks
public static void CreateSparkParticles(ParticleEmitter emitter, float x, float y, int count, float offsetRadius, float force, float xI, float yI, float redM, float lifeM)
Creates multiple spark particles at z=0 with lifetime control. This 2D convenience method forwards to the 3D version for standard spark effects on the main gameplay plane.
Parameters:
- float x: The x-coordinate for spark origin
- float y: The y-coordinate for spark origin
- int count: The number of sparks to create
- float offsetRadius: The spread radius for spark placement
- float force: The force multiplier for spark velocity
- float xI: The initial x-velocity added to all sparks
- float yI: The initial y-velocity added to all sparks
- float redM: The red color multiplier (0=yellow hot, 1=red hot)
- float lifeM: The lifetime multiplier for all sparks
public static void CreateSparkParticles(ParticleEmitter emitter, float x, float y, int count, float offsetRadius, float force, float xI, float yI, float redM, float lifeM)
Creates spark particles using a specific emitter with default lifetime. Allows customization of the spark type while maintaining standard spark behavior and coloring.
Parameters:
- ParticleEmitter emitter: The particle emitter to use for sparks
- float x: The x-coordinate for spark origin
- float y: The y-coordinate for spark origin
- int count: The number of sparks to create
- float offsetRadius: The spread radius for spark placement
- float force: The force multiplier for spark velocity
- float xI: The initial x-velocity added to all sparks
- float yI: The initial y-velocity added to all sparks
- float redM: The red color multiplier (0=yellow hot, 1=red hot)
public static void CreateSparkParticles(ParticleEmitter emitter, float x, float y, int count, float offsetRadius, float force, float xI, float yI, float redM, float lifeM)
Creates spark particles using a specific emitter with lifetime control. Provides full control over spark type, duration, and temperature-based coloring for specialized spark effects.
Parameters:
- ParticleEmitter emitter: The particle emitter to use for sparks
- float x: The x-coordinate for spark origin
- float y: The y-coordinate for spark origin
- int count: The number of sparks to create
- float offsetRadius: The spread radius for spark placement
- float force: The force multiplier for spark velocity
- float xI: The initial x-velocity added to all sparks
- float yI: The initial y-velocity added to all sparks
- float redM: The red color multiplier (0=yellow hot, 1=red hot)
- float lifeM: The lifetime multiplier for all sparks
public static void CreateSparkShower(float x, float y, int count, float offsetRadius, float force, float xI, float yI, float redM, float particlesFloatM)
Creates a mixed spark shower with both shower and floating particles. The particlesFloatM parameter controls the ratio between shower sparks (falling) and floating sparks (drifting), allowing for customized spark behavior combinations.
Parameters:
- float x: The x-coordinate where sparks originate
- float y: The y-coordinate where sparks originate
- int count: The total number of sparks to create
- float offsetRadius: The spread radius for spark placement
- float force: The force multiplier for spark velocity
- float xI: The initial x-velocity added to all sparks
- float yI: The initial y-velocity added to all sparks
- float redM: The red color multiplier (0=yellow, 1=red)
- float particlesFloatM: The ratio of floating particles (0=all shower, 1=all float)
public static void CreateStoneShrapnel(float x, float y, float radius, float count)
Creates multiple stone debris pieces that fly outward from an impact point. Each piece is randomly positioned within the specified radius and launched with velocity proportional to its distance from center.
Parameters:
- float x: The x-coordinate of the shrapnel origin
- float y: The y-coordinate of the shrapnel origin
- float radius: The maximum spread radius for shrapnel pieces
- float count: The number of stone shrapnel pieces to create
public static void CreateSuddenSparkShower(float x, float y, int count, float offsetRadius, float force, float xI, float yI, float redM)
Creates a sudden burst of short-lived floating spark particles. Uses floating spark emitter with 20-40% lifetime for quick burst effects like impacts, electrical shorts, or sudden friction.
Parameters:
- float x: The x-coordinate where sparks originate
- float y: The y-coordinate where sparks originate
- int count: The number of sparks in the burst
- float offsetRadius: The spread radius for spark placement
- float force: The force multiplier for spark velocity
- float xI: The initial x-velocity added to all sparks
- float yI: The initial y-velocity added to all sparks
- float redM: The red color multiplier (0=yellow, 1=red)
public static void CreateSummonMagicParticle(float x, float y, float xI, float yI)
Creates magical summoning particles with initial velocity. Used for spell casting and magical summoning effects, allowing the particles to move in a specified direction upon creation.
Parameters:
- float x: The x-coordinate where the magic particle appears
- float y: The y-coordinate where the magic particle appears
- float xI: The initial x-velocity of the particle
- float yI: The initial y-velocity of the particle
public static void CreateTimeBroMuzzleFlashEffect(float x, float y, float z, float xI, float yI, Transform parent)
Creates a time-manipulation muzzle flash that ignores time scaling. Used for Time Bro's weapons to ensure effects play at normal speed during slow motion. Creates both flash and glow effects with ignoreTimeScale enabled.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- float xI: The horizontal velocity component for orientation
- float yI: The vertical velocity component for orientation
- Transform parent: The transform to parent the main flash effect to
public static void CreateTravellingExplosion(float x, float y, float z, Vector2 velocity, float life)
Placeholder for creating moving explosion effects. Currently not implemented and performs no action. Parameters are accepted but unused.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- Vector2 velocity: The intended movement velocity
- float life: The intended lifetime
public static void CreateWaterDrip(float x, float y, float offsetXRadius, float offsetYRadius, float xI, float yI, float scaleM, BloodColor color)
Creates a water drip particle effect at the specified position. The particle emits with zero velocity and randomized size/lifetime. Note: All offset and color parameters appear unused.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float offsetXRadius: The horizontal offset (unused in implementation)
- float offsetYRadius: The vertical offset (unused in implementation)
- float scaleM: The scale multiplier for particle size
- BloodColor color: The blood color (unused in implementation)
public static void CreateWaterDrip(float x, float y, float offsetXRadius, float offsetYRadius, float xI, float yI, float scaleM, BloodColor color)
Creates a water drip particle effect with position offset and initial velocity. Spawns particle at a random position within the offset radius with specified velocity and scaled size/lifetime.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float offsetXRadius: The horizontal spawn radius around the center position
- float offsetYRadius: The vertical spawn radius around the center position
- float xI: The initial horizontal velocity
- float yI: The initial vertical velocity
- float scaleM: The scale multiplier for particle size
- BloodColor color: The blood color (unused in implementation)
public static void CreateWhiteFlashPop(float x, float y)
Creates a bright white flash explosion effect. Used for energy-based explosions and special weapon impacts that need a clean, bright visual burst.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
public static void CreateWhiteFlashPopSmall(float x, float y)
Creates a smaller version of the white flash explosion effect. Used for minor energy impacts and smaller special weapon effects that need a bright but less prominent visual burst.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
public static void CreateWoodDarkParticles(float x, float y, int count, float xOffsetRadius, float yOffsetRadius, float force, float xI, float yI, float angularVelocity)
Creates dark wood particle effects with uniform spread radius. This convenience overload calls the full version with equal x and y offset radii for circular spread patterns.
Parameters:
- float x: The x-coordinate of the dark wood origin
- float y: The y-coordinate of the dark wood origin
- int count: The total number of particles to create
- float offsetRadius: The uniform spread radius for particle placement
- float force: The base force multiplier for particle velocity
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
- float angularVelocity: The rotational velocity for spinning wood pieces
public static void CreateWoodDarkParticles(float x, float y, int count, float xOffsetRadius, float yOffsetRadius, float force, float xI, float yI, float angularVelocity)
Creates dark wood particle effects with elliptical spread. Uses four dark wood emitters with counts of half, half, third, and third of the total, with varying forces (1.2x, 1.1x, 1.0x, 1.0x) for burnt or aged wood destruction effects.
Parameters:
- float x: The x-coordinate of the dark wood origin
- float y: The y-coordinate of the dark wood origin
- int count: The total number of particles to create
- float xOffsetRadius: The horizontal spread radius for particle placement
- float yOffsetRadius: The vertical spread radius for particle placement
- float force: The base force multiplier for particle velocity
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
- float angularVelocity: The rotational velocity for spinning wood pieces
public static void CreateWoodParticles(float x, float y, int count, float xOffsetRadius, float yOffsetRadius, float force, float xI, float yI, float angularVelocity)
Creates rotating wood particle effects with uniform spread radius. This convenience overload calls the full version with equal x and y offset radii for circular spread patterns.
Parameters:
- float x: The x-coordinate of the wood debris origin
- float y: The y-coordinate of the wood debris origin
- int count: The total number of particles to create
- float offsetRadius: The uniform spread radius for particle placement
- float force: The base force multiplier for particle velocity
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
- float angularVelocity: The rotational velocity for spinning wood pieces
public static void CreateWoodParticles(float x, float y, int count, float xOffsetRadius, float yOffsetRadius, float force, float xI, float yI, float angularVelocity)
Creates rotating wood particle effects with elliptical spread. Uses three wood particle emitters with varying forces (1.2x, 1.1x, 1.0x) plus wood dots at high force (40 + 1.6x). Wood dots use random wood colors from the theme for realistic variety.
Parameters:
- float x: The x-coordinate of the wood debris origin
- float y: The y-coordinate of the wood debris origin
- int count: The total number of particles to create
- float xOffsetRadius: The horizontal spread radius for particle placement
- float yOffsetRadius: The vertical spread radius for particle placement
- float force: The base force multiplier for particle velocity
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
- float angularVelocity: The rotational velocity for spinning wood pieces
public static void SpawnExplosion(Vector3 position, float size, bool spawnExtras, out Vector3[] positions, out float[] sizes)
Spawns an explosion effect at the specified 2D position using the ExplosionSpawner system.
Parameters:
- Vector2 position: The 2D position where the explosion should occur.
- float size: The size or intensity of the explosion effect.
- bool spawnExtras: Whether to spawn additional explosion effects like debris or secondary explosions.
public static void SpawnExplosion(Vector3 position, float size, bool spawnExtras, out Vector3[] positions, out float[] sizes)
Spawns an explosion effect at the specified 3D position using the ExplosionSpawner system.
Parameters:
- Vector3 position: The 3D position where the explosion should occur.
- float size: The size or intensity of the explosion effect.
- bool spawnExtras: Whether to spawn additional explosion effects like debris or secondary explosions.
public static void SpawnExplosion(Vector3 position, float size, bool spawnExtras, out Vector3[] positions, out float[] sizes)
Spawns an explosion effect at the specified 2D position and returns information about the explosion components created.
Parameters:
- Vector2 position: The 2D position where the explosion should occur.
- float size: The size or intensity of the explosion effect.
- bool spawnExtras: Whether to spawn additional explosion effects like debris or secondary explosions.
- out Vector3[] positions: Output array containing the positions of all explosion components created.
- out float[] sizes: Output array containing the sizes of all explosion components created.
public static void SpawnExplosion(Vector3 position, float size, bool spawnExtras, out Vector3[] positions, out float[] sizes)
Spawns an explosion effect at the specified 3D position and returns information about the explosion components created.
Parameters:
- Vector3 position: The 3D position where the explosion should occur.
- float size: The size or intensity of the explosion effect.
- bool spawnExtras: Whether to spawn additional explosion effects like debris or secondary explosions.
- out Vector3[] positions: Output array containing the positions of all explosion components created.
- out float[] sizes: Output array containing the sizes of all explosion components created.
public static void SprayBlood(BloodColor bloodColor, int rays, float x, float y, float range)
Sprays blood onto surrounding terrain using raycasts. Casts rays in a circular pattern and applies blood to any blocks hit within range. Red blood additionally bloodies nearby doodads. Used to create persistent blood decals on the environment.
Parameters:
- BloodColor bloodColor: The type of blood to spray
- int rays: The number of raycast directions to check
- float x: The x-coordinate of spray origin
- float y: The y-coordinate of spray origin
- float range: The maximum spray distance
Fields
public GameObject acidMeltBigDog
Melting animation prefab instantiated when living big dog mook units dissolve from acid damage after their acid melt timer expires, sized for large canines.
public GameObject acidMeltDeadBigDog
Melting animation prefab instantiated when dead big dog mook units dissolve from acid damage, creating a dissolving effect for large canine corpses.
public GameObject acidMeltDeadDog
Melting animation prefab instantiated when dead dog mook units dissolve from acid damage, creating a dissolving effect for canine corpses.
public GameObject acidMeltDog
Melting animation prefab instantiated when living dog mook units dissolve from acid damage after their acid melt timer expires, creating a canine-specific dissolving effect.
public GameObject acidMeltGrenadier
Melting animation prefab instantiated when living grenadier units dissolve from acid damage after their acid melt timer expires, creating a grenadier-specific dissolving effect.
public BackgroundBloodSpray backgroundBloodSprayPrefab
Background blood spray prefab (BackgroundBloodSpray) used by CreateBackgroundBloodSpray() to generate animated blood spray effects with velocity, creating dynamic blood visuals on background surfaces.
public GibHolder bigDogSkeletonPrefab
Skeleton visual effect prefab (GibHolder) instantiated when living big dog mook units are covered in acid, creating an exposed skeleton appearance for large canines.
public GameObject bigMookMeltingPrefab
Melting animation prefab instantiated when living big mook units dissolve from acid damage after their acid melt timer expires, sized for larger units.
public GibHolder bigMookSkeletonPrefab
Skeleton visual effect prefab (GibHolder) instantiated when living big mook units are covered in acid, creating an exposed skeleton appearance specific to their larger size.
public DoodadPiece blankDoodadGibPrefab
Blank doodad piece prefab template for creating custom environmental debris.
public Gib blankGibPrefab
Blank gib prefab template for creating custom body part debris.
public Puff bloodArtery1Prefab
First arterial blood spray effect prefab, creates directional pulsing blood stream for severe wounds.
public Puff bloodArtery2Prefab
Second arterial blood spray effect prefab variant, creates alternative pulsing blood stream for arterial wounds.
public SpriteSM[] bloodBlockOverlayPrefabs
Array of blood overlay sprite prefabs (SpriteSM) used to randomly select and apply blood splatter overlays to blocks, creating variety in blood-covered surface appearances.
public Puff bloodExplosion
Blood explosion effect prefab that creates red blood burst for extreme gore effects.
public Puff bloodGush1Prefab
First blood gush effect prefab, creates a medium blood spray when units are severely damaged.
public Puff bloodGush2Prefab
Second blood gush effect prefab variant for medium blood spray effects.
public Puff bloodGush3Prefab
Third blood gush effect prefab variant, adds variety to medium blood spray visuals.
public Puff bloodGushGreen1Prefab
First green blood gush effect prefab for alien blood effects. Not currently used but available for green-blooded enemies.
public Puff bloodGushGreen2Prefab
Second green blood gush effect prefab variant for alien blood. Not currently used but available for variety.
public Puff bloodGushGreen3Prefab
Third green blood gush effect prefab variant for alien blood variety. Not currently used but available for effects.
public Puff bloodLargeGush1Prefab
First large blood gush effect prefab, creates massive blood spray for extreme damage or large units.
public Puff bloodLargeGush2Prefab
Second large blood gush effect prefab variant for massive blood spray effects.
public Puff bloodLargeGush3Prefab
Third large blood gush effect prefab variant, adds variety to extreme blood effects.
public Puff bloodSmallSplash1Prefab
First small blood splash effect prefab, used for minor damage or smaller units.
public Puff bloodSmallSplash2Prefab
Second small blood splash effect prefab variant for minor blood effects.
public Puff bloodSplash1Prefab
First blood splash effect prefab variant, creates standard blood splatter when units take damage.
public Puff bloodSplash2Prefab
Second blood splash effect prefab variant, provides visual variety for blood splatter effects.
public GameObject bloodSplatDecalSmallPrefab
Small blood splat decal prefab used by CreateBackgroundBloodSplat() to place stationary blood splatter effects on surfaces, creating persistent blood visuals from damage.
public Puff bloodSprayExplode1Prefab
First blood spray explosion effect prefab, creates radial blood burst from explosive damage.
public Puff bloodSprayExplode2Prefab
Second blood spray explosion effect prefab variant for explosive blood burst effects.
public Puff bloodSpurt1Prefab
First blood spurt effect prefab, creates directional blood jets accompanying gush effects.
public Puff bloodSpurt2Prefab
Second blood spurt effect prefab variant for directional blood jet effects.
public Puff bloodSpurt3Prefab
Third blood spurt effect prefab variant, provides variety for blood spurt visuals.
public Puff bloodTinySplash1Prefab
First tiny blood splash effect prefab, used for minimal damage or very small blood droplets.
public Puff bloodTinySplash2Prefab
Second tiny blood splash effect prefab variant for minimal blood effects.
public Puff blueMuzzleFlashRoundPrefab
Blue-colored round muzzle flash puff effect for energy weapons.
private Puff boulderRollPoof
Cached instance of the boulder rolling poof effect, created from boulderRollPoofPrefab when needed.
private GameObjectReference boulderRollPoofPrefab
Reference to the boulder rolling poof effect prefab, loaded on demand for rolling boulder dust trails.
public FlickerFader bulletPoofPrefab
Bullet impact poof effect that creates small dust cloud when bullets hit surfaces.
public ProjectileTrail chakramTrail
Projectile trail prefab for chakram weapons, creating a spinning visual trail effect behind thrown chakrams.
public GibHolder corpseSkeletonPrefab
Skeleton visual effect prefab (GibHolder) instantiated when dead regular units are covered in acid, creating an exposed skeleton appearance on corpses.
public GibHolder deadBigDogSkeletonPrefab
Skeleton visual effect prefab (GibHolder) instantiated when dead big dog mook units are covered in acid, creating an exposed skeleton appearance on large canine corpses.
public GibHolder deadBigMookSkeletonPrefab
Skeleton visual effect prefab (GibHolder) instantiated when dead big mook units are covered in acid, creating an exposed skeleton appearance on large corpses.
public GibHolder deadDogSkeletonPrefab
Skeleton visual effect prefab (GibHolder) instantiated when dead dog mook units are covered in acid, creating an exposed skeleton appearance on canine corpses.
public GibHolder deadGrenadierSkeletonPrefab
Skeleton visual effect prefab (GibHolder) instantiated when dead grenadier mook units are covered in acid, creating an exposed skeleton appearance on grenadier corpses.
public GibHolder dogSkeletonPrefab
Skeleton visual effect prefab (GibHolder) instantiated when living dog mook units are covered in acid, creating an exposed skeleton appearance specific to canine units.
public ParticleSystem ExplodeParticle
Particle system for general explosion particle effects.
public ParticleSystem Explosion
Particle system for standard-sized explosion effects, the default explosion size.
public Puff explosion
Generic explosion puff effect used in various explosion methods for creating blast visuals.
public Puff explosionBig
Big explosion puff effect prefab for larger blast visuals. Not currently used but available for medium-sized explosions.
public ExplosionGroundWave explosionGroundWavePrefab
Ground wave explosion effect prefab for terrain-following blast waves. Not currently used but available for ground impacts.
public Puff explosionHuge
Huge explosion puff effect prefab for massive blast visuals. Not currently used but available for large explosions.
public ParticleSystem ExplosionLarge
Particle system for large explosion effects, used for powerful explosives.
public ParticleSystem ExplosionLargeNoWhite
Particle system for large explosions without white flash, for darker explosion visuals.
public ParticleSystem ExplosionMassive
Particle system for massive explosion effects, used for extreme destructive blasts.
public Puff explosionMassive
Massive explosion puff effect prefab for extreme blast visuals. Not currently used but available for devastating explosions.
public ExplosionGroundWave explosionMusicalShockWavePrefab
Musical shockwave explosion effect prefab for special sound-based attacks. Not currently used but available for sonic weapons.
public ParticleSystem ExplosionNuclear
Particle system for nuclear-scale explosion effects, the largest explosion type.
public ExplosionRangePop explosionRangePrefab
Prefab for the explosion range indicator effect that shows the area of effect for explosions.
public ExplosionGroundWave explosionShockWaveHugePrefab
Huge shockwave explosion effect prefab for massive radial blasts. Not currently used but available for extreme explosions.
public ExplosionGroundWave explosionShockWavePrefab
Shockwave explosion effect prefab for radial blast waves. Not currently used but available for concussive blasts.
public ParticleSystem ExplosionSmall
Particle system for small explosion effects, standard grenade-sized blasts.
public Shrapnel explosionSparkShrapnel
Spark shrapnel prefab for explosion effects. Also used by CutsceneEffectsController for cinematic explosions.
public Explosion ExplosionSpawner
Main explosion prefab (Explosion) used by all SpawnExplosion() methods as the template for creating explosions of various sizes and types throughout the game.
public ParticleSystem ExplosionTiny
Particle system for tiny explosion effects, used for very small blasts and impacts.
public ParticleSystem ExplosionTravelling
Particle system for travelling explosion effects that move through space.
public DoodadPiece fileCabinetGibPrefab
File cabinet debris piece for office environment destruction effects.
public ParticleSystem FireTrail
Particle system for standard fire trail effects following projectiles or movement.
public ParticleSystem FireTrailSmall
Particle system for small fire trail effects for lighter projectiles.
public ParticleSystem FlameLicks
Particle system for standard flame licking effects on burning objects.
public ParticleEmitter flameSheetBackgroundParticle1
First background flame sheet particle emitter for large area fire effects.
public ParticleEmitter flameSheetBackgroundParticle2
Second background flame sheet particle variant for visual diversity in fires.
public ParticleEmitter flameSheetBackgroundParticle3
Third background flame sheet particle variant for complex fire visual effects.
public ParticleEmitter flameSheetBackgroundParticle4
Fourth background flame sheet particle variant for maximum fire effect variety.
public Puff freezeDamageEffect
Freeze damage visual effect prefab that shows ice crystals and freezing on damaged units.
public ProjectileTrail grenadeTrail
Projectile trail prefab for grenades, creating a visible path that follows grenade projectiles through the air.
public GibHolder grenadierSkeletonPrefab
Skeleton visual effect prefab (GibHolder) instantiated when living grenadier mook units are covered in acid, creating an exposed skeleton appearance specific to grenadiers.
public Puff groundExplodePoofPrefab
Ground explosion poof effect for terrain-based explosions, used by CreateGroundExplodePoofEffect method.
public PuffLaserBurn laserBurnSprite
Laser burn mark puff effect for laser weapon impact visuals.
public FlameWallExplosion liftOffBlastFlameWall
Flame wall explosion prefab (FlameWallExplosion) used by various units (BroBase, BroshipTrooper, DoubleBroSeven, MookArmouredGuy) when performing lift-off moves, creating fiery blast effects during aerial maneuvers.
public GibHolder lostSoulSkeletonPrefab
Skeleton visual effect prefab (GibHolder) instantiated when HellLostSoul units are covered in acid, creating an exposed skeleton appearance for demonic entities.
public Puff meleeStrikePrefab1
Standard melee strike impact effect prefab, creates visual feedback when melee attacks connect.
public Puff meleeStrikePrefabLarge
Large melee strike impact effect prefab for heavy melee attacks or powered strikes.
protected static int meleeStrikeYScale = 1
Protected static Y-scale multiplier (default 1) used to alternate the vertical orientation of melee strike effects, flipping between 1 and -1 after each strike to create visual variety.
public GameObject meltingBigMookCorpsePrefab
Melting animation prefab instantiated when dead big mook units dissolve from acid damage, creating a dissolving effect for large corpses.
public GameObject meltingCorpsePrefab
Melting animation prefab instantiated when dead regular units dissolve from acid damage, creating a dissolving effect for corpses.
public GameObject meltingGrenadierCorpsePrefab
Melting animation prefab instantiated when dead grenadier units dissolve from acid damage, creating a dissolving effect for grenadier corpses.
public DoodadPiece metalDoodadGibPrefab
Metal debris piece for metallic object destruction effects.
public DistortionGrow muzzleFlashBigGlowPrefab
Large distortion glow effect prefab for heavy weapon muzzle flashes, creating a more intense heat distortion visual.
public Puff muzzleFlashBigPrefab
Large muzzle flash puff effect for heavy weapons.
public DistortionGrow muzzleFlashGlowPrefab
Standard distortion glow effect prefab that accompanies muzzle flashes from small firearms, creating a heat distortion visual.
public DistortionGrow muzzleFlashHugeGlowPrefab
Massive distortion glow effect prefab for tank cannons and extreme weapons, creating maximum heat distortion.
public Puff muzzleFlashMediumPrefab
Medium-sized muzzle flash puff effect for larger weapons.
public Puff muzzleFlashPrefab
Standard muzzle flash puff effect for small firearms.
public Puff muzzleFlashRoundPrefab
Round-shaped muzzle flash puff effect for specific weapon types.
public DistortionGrow muzzleFlashSmallGlowPrefab
Small distortion glow effect prefab for light weapons and pistols, creating subtle heat distortion.
public Puff muzzleFlashTankCannonPrefab
Tank cannon muzzle flash puff effect for vehicle weaponry.
public Puff muzzleFlashVomitPrefab
Vomit-style muzzle flash puff effect for acid or bile weapons.
public ParticleSystem OilyFlameLicks
Particle system for oily flame effects with different visual properties than standard flames.
public ParticleEmitter particlesGlassShards
Particle emitter for glass shard effects when windows or glass objects break.
public Puff predabroPlasmaPop
Plasma pop effect prefab specifically for Predabro plasma weapon impacts, creates energy burst visual.
public ProjectileTrail predictionTrail
Projectile trail prefab for trajectory prediction, used to show predicted paths for projectiles.
public FlickerFader projectileFlickPuff
Standard projectile impact flicker effect prefab. Not currently used but available for bullet hits.
public FlickerFader projectileLargeFlickPuff
Large projectile impact flicker effect prefab for heavy weapon impacts and explosions.
public FlickerFader projectileWhiteFlickPuff
White projectile impact flicker effect prefab. Not currently used but available for energy weapon hits.
public Puff redWarningDiamondHugePrefab
Huge red diamond warning indicator prefab for extreme danger warnings, used by CreateRedWarningDiamondHuge method.
public Puff redWarningDiamondLargePrefab
Large red diamond warning indicator prefab for major threats, used by CreateRedWarningDiamondLarge method.
public Puff redWarningPulsePrefab
Red warning pulse effect prefab for danger indicators, used by CreateRedWarningEffect method.
public Puff shellSpeedTrailPrefab
Speed trail puff effect prefab (Puff) used to create motion blur trail effects behind fast-moving projectiles like shells and bullets, enhancing the visual sense of speed.
public Puff shockWaveExplodePoofPrefab
Shockwave explosion poof effect for radial blast visuals. Not currently used but available for shockwave effects.
public Shrapnel shrapnelStonePrefab
Prefab for stone shrapnel particles created by explosions or impacts on stone surfaces.
public Puff slimeExplosion
Slime explosion effect prefab that creates green slime burst visuals for alien or acid explosions.
public Puff slimeExplosionSmall
Small slime explosion effect prefab for minor alien or acid burst visuals.
public Puff smokeSmall1Prefab
First small smoke puff effect variant, used for minor smoke effects from impacts or fires.
public Puff smokeSmall2Prefab
Second small smoke puff effect variant, provides visual variety for smoke effects.
public Puff smokeSmall3Prefab
Third small smoke puff effect variant, adds additional variety to smoke visuals.
public ParticleSystem SmokeTrail
Particle system for smoke trail effects from rockets or smoking objects.
public ParticleEmitter sparkParticleFire
Particle emitter for fire sparks used in CreateFireSparks method for burning effects.
public ParticleEmitter sparkParticleFloat
Particle emitter for floating spark effects that drift through the air.
public ParticleEmitter sparkParticleShower
Particle emitter for sudden spark shower effects from impacts or explosions.
public Puff tinyPopPrefab
Tiny pop effect prefab used for minimal visual feedback on light impacts or small events.
public GameObject unitMeltingPrefab
Melting animation prefab instantiated when regular units dissolve from acid damage after their acid melt timer expires, creating a dissolving visual effect.
public GibHolder unitSkeletonPrefab
Skeleton visual effect prefab (GibHolder) instantiated when regular units are covered in acid, creating an exposed skeleton appearance while the unit melts.
public Puff whiteFlashPopPrefab
White flash pop effect prefab for bright impact flashes, used by CreateWhiteFlashPop method.
public Puff whiteFlashPopSmallPrefab
Small white flash pop effect prefab for subtle bright flashes, used by CreateWhiteFlashPopSmall method.
public DoodadPiece woodDoodadGibPiece
Wood debris piece for wooden object destruction effects.
Position & Physics
Methods
public static void CreateAirDashPoofEffect(float x, float y, Vector3 velocity)
Creates an air dash trail effect with automatic orientation based on dash direction. Flips horizontally for left/right dashes and rotates 90 degrees for vertical dashes to match the movement direction.
Parameters:
- float x: The x-coordinate where the dash effect appears
- float y: The y-coordinate where the dash effect appears
- Vector3 velocity: The dash velocity used to determine effect orientation
public static void CreateBoulderRollPoof_Local(float x, float y, int direction)
Creates a dust poof effect for rolling boulders or heavy objects. The effect orientation is based on the rolling direction, flipping horizontally when rolling left. Uses the BoulderRollPoof prefab cached property.
Parameters:
- float x: The x-coordinate where the boulder poof appears
- float y: The y-coordinate where the boulder poof appears
- int direction: The rolling direction (-1 for left, 1 for right)
public static void CreateDashPoofEffect_Local(float x, float y, int direction)
Creates a local dash poof effect visible only on the current client. Used internally by the networked version or directly for local-only effects. The effect is horizontally flipped when dashing left (direction less than 0).
Parameters:
- float x: The x-coordinate where the dash effect appears
- float y: The y-coordinate where the dash effect appears
- int direction: The facing direction (-1 for left, 1 for right) that determines effect orientation
public static void CreateDashPoofEffect_Networked(float x, float y, int direction)
Creates a dash poof effect synchronized across all network clients. This networked version ensures all players see the same dash visual effect when a character performs a dash move. Internally uses RPC to call CreateDashPoofEffect_Local on all clients.
Parameters:
- float x: The x-coordinate where the dash effect appears
- float y: The y-coordinate where the dash effect appears
- int direction: The facing direction (-1 for left, 1 for right) that determines effect orientation
public static void CreateFallPoofEffect(float x, float y, int direction, BloodColor color = BloodColor.None)
Creates a dust trail effect when a character is falling or wall-sliding. Randomly selects between two fall poof variations and orients based on direction. Used for visual feedback during aerial movement and wall interactions.
Parameters:
- float x: The x-coordinate of the effect
- float y: The y-coordinate of the effect
- int direction: The facing direction (-1 for left, 1 for right)
- BloodColor color: The effect color type (default is None for regular dust)
public static void CreateFootPoofEffect(float x, float y, float delay, Vector3 velocity, BloodColor bloodColor = BloodColor.None)
Creates dust or blood effects from footsteps during movement. Randomly selects from three foot poof variations for visual variety. Supports different colored effects for walking through blood or other liquids.
Parameters:
- float x: The x-coordinate of the footstep
- float y: The y-coordinate of the footstep
- float delay: The delay before the effect appears
- Vector3 velocity: The movement velocity (currently unused but part of signature)
- BloodColor bloodColor: The color type for bloody footprints (default is None for dust)
public static Puff CreateGroundExplodePoofEffect(Puff poofPrefab, float x, float y, int direction)
Creates a ground explosion poof effect using the default ground explode prefab. This is a convenience overload that calls the prefab-specific version with the standard ground explosion effect.
Parameters:
- float x: The x-coordinate of the ground explosion
- float y: The y-coordinate of the ground explosion
- int direction: The explosion direction (-1 for left, 1 for right)
public static Puff CreateGroundExplodePoofEffect(Puff poofPrefab, float x, float y, int direction)
Creates a ground explosion poof effect with a custom puff prefab. Allows specifying different puff types for varied ground explosion visuals. Returns the created Puff instance for additional customization.
Parameters:
- Puff poofPrefab: The custom puff prefab to use for the explosion
- float x: The x-coordinate of the ground explosion
- float y: The y-coordinate of the ground explosion
- int direction: The explosion direction (-1 for left, 1 for right)
Returns:
Puff
: The created Puff instance for further configuration
public static void CreateJumpPoofEffect(float x, float y, int direction, BloodColor color)
Creates a dust cloud effect when a character jumps. Randomly selects between two jump poof variations and flips the effect based on the character's facing direction. Supports colored effects for jumping from bloody or liquid surfaces.
Parameters:
- float x: The x-coordinate of the jump origin
- float y: The y-coordinate of the jump origin
- int direction: The facing direction (-1 for left, 1 for right)
- BloodColor color: The effect color type (default is None for regular dust)
public static void CreateLandPoofEffect(float x, float y, int direction, BloodColor color = BloodColor.None)
Creates a dust cloud impact effect when a character lands on solid ground. Randomly selects between two landing variations and orients based on direction. The effect scales with landing force for more dramatic impacts from higher falls.
Parameters:
- float x: The x-coordinate of the landing point
- float y: The y-coordinate of the landing point
- int direction: The facing direction (-1 for left, 1 for right)
- BloodColor color: The effect color type (default is None for regular dust)
public static void CreateLandSplashEffect(float x, float y, int direction, BloodColor color = BloodColor.None)
Creates a liquid splash effect when a character lands in water or other liquids. Randomly selects between two splash variations and orients based on direction. The blood color parameter allows for different liquid types (water, blood, oil).
Parameters:
- float x: The x-coordinate of the splash point
- float y: The y-coordinate of the splash point
- int direction: The facing direction (-1 for left, 1 for right)
- BloodColor color: The liquid type color (None for water, or specific blood colors)
Fields
public Puff airDashPoofPrefab
Air dash poof effect prefab that creates cloud effect when performing aerial dash moves.
public Puff dashPoof1Prefab
Dash movement poof effect that creates dust cloud during rapid dash movements.
public Puff fallPoof1Prefab
First falling poof effect, creates air disturbance visuals during falls.
public Puff fallPoof2Prefab
Second falling poof effect variant for variety in fall visuals.
public Puff footPoof1Prefab
First footstep poof effect variant, creates dust clouds when characters run or walk.
public Puff footPoof2Prefab
Second footstep poof effect variant, provides visual variety for movement dust.
public Puff footPoof3Prefab
Third footstep poof effect variant, adds additional variety to footstep effects.
public Puff jumpPoof1Prefab
First jump takeoff poof effect, creates dust cloud when characters jump.
public Puff jumpPoof2Prefab
Second jump takeoff poof effect variant for visual variety when jumping.
public Puff landPoof1Prefab
First landing poof effect, creates dust cloud when characters land from jumps.
public Puff landPoof2Prefab
Second landing poof effect variant for landing impact variety.
public Puff landSplash1Prefab
First water landing splash effect when landing in water or liquid surfaces.
public Puff landSplash2Prefab
Second water landing splash effect variant for liquid impact variety.
public Puff whitePunchPopPrefab
White punch pop effect prefab for powerful punch impacts, creates bright flash on contact.
Animation & Sprite Systems
Methods
public static PuffLaserBurn CreateEffect(PuffLaserBurn puffPrefab, float x, float y, float z, float delay, Vector3 velocity)
Creates a basic FlickerFader effect at the specified 2D position. This is the simplest effect creation method for FlickerFader-based visual effects with default z-depth of 0.
Parameters:
- FlickerFader flickerFaderPrefab: The FlickerFader effect prefab to instantiate
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
public static PuffLaserBurn CreateEffect(PuffLaserBurn puffPrefab, float x, float y, float z, float delay, Vector3 velocity)
Creates a scaled Puff effect with optional blood coloring. Supports different blood types (red, green, oil, frozen, quicksand) and allows independent x/y scaling for stretched effects. Returns the created Puff instance for additional customization.
Parameters:
- Puff puffPrefab: The Puff effect prefab to instantiate
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- int xScale: The horizontal scale factor (1 for normal, -1 for flipped)
- int yScale: The vertical scale factor
- BloodColor bloodColor: The blood color type to apply (None for no coloring)
Returns:
PuffLaserBurn
: The created Puff instance for further configuration
public static PuffLaserBurn CreateEffect(PuffLaserBurn puffPrefab, float x, float y, float z, float delay, Vector3 velocity)
Creates a delayed Puff effect with initial velocity and scaling. The effect appears after the specified delay and moves according to the velocity vector. Useful for timed or physics-based particle effects.
Parameters:
- Puff puffPrefab: The Puff effect prefab to instantiate
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- float delay: The delay in seconds before the effect appears
- int xScale: The horizontal scale factor
- int yScale: The vertical scale factor
- Vector3 velocity: The initial velocity vector for the effect
public static PuffLaserBurn CreateEffect(PuffLaserBurn puffPrefab, float x, float y, float z, float delay, Vector3 velocity)
Creates a delayed FlickerFader effect with initial velocity and scaling. Similar to the Puff version but for FlickerFader-type effects. The effect appears after the delay and moves with the specified velocity.
Parameters:
- FlickerFader flickerFaderPrefab: The FlickerFader effect prefab to instantiate
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- float delay: The delay in seconds before the effect appears
- int xScale: The horizontal scale factor
- int yScale: The vertical scale factor
- Vector3 velocity: The initial velocity vector for the effect
public static PuffLaserBurn CreateEffect(PuffLaserBurn puffPrefab, float x, float y, float z, float delay, Vector3 velocity)
Creates a FlickerFader effect at a specific 3D position. Provides full control over the z-depth for layering effects in the scene. Returns the created instance for additional configuration.
Parameters:
- FlickerFader flickerFaderPrefab: The FlickerFader effect prefab to instantiate
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
Returns:
PuffLaserBurn
: The created FlickerFader instance for further customization
public static PuffLaserBurn CreateEffect(PuffLaserBurn puffPrefab, float x, float y, float z, float delay, Vector3 velocity)
Creates a FlickerFader effect at the specified position. This is a convenience overload that delegates to the full version with z-coordinate of 0 for standard 2D positioning.
Parameters:
- FlickerFader flickerFaderPrefab: The FlickerFader prefab to instantiate
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float delay: The delay before the effect starts
- Vector3 velocity: The initial velocity vector for the effect
Returns:
PuffLaserBurn
: The created FlickerFader component
public static PuffLaserBurn CreateEffect(PuffLaserBurn puffPrefab, float x, float y, float z, float delay, Vector3 velocity)
Creates a FlickerFader effect with full 3D positioning. Instantiates the prefab and configures its delay and velocity settings. FlickerFader effects are used for various fading animations throughout the game.
Parameters:
- FlickerFader flickerFaderPrefab: The FlickerFader prefab to instantiate
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- float delay: The delay before the effect starts
- Vector3 velocity: The initial velocity vector for the effect
Returns:
PuffLaserBurn
: The created FlickerFader component
public static PuffLaserBurn CreateEffect(PuffLaserBurn puffPrefab, float x, float y, float z, float delay, Vector3 velocity)
Creates a DistortionGrow effect for visual distortion animations. Instantiates the distortion prefab and sets its delay. Used for heat haze, explosion distortions, and other warping visual effects.
Parameters:
- DistortionGrow distortionPrefab: The DistortionGrow prefab to instantiate
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float delay: The delay before the distortion starts
- float z: The z-coordinate in world space (default 0)
Returns:
PuffLaserBurn
: The created DistortionGrow component
public static PuffLaserBurn CreateEffect(PuffLaserBurn puffPrefab, float x, float y, float z, float delay, Vector3 velocity)
Creates a Puff effect with blood color tinting and scale variations. Supports horizontal flipping for xScale parameter values and applies blood coloring. Configures delay and velocity for the puff animation.
Parameters:
- Puff puffPrefab: The Puff prefab to instantiate
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- float delay: The delay before the puff starts (converted to xScale if not 0)
- Vector3 velocity: The initial velocity (y component used as yScale if delay is not 0)
- BloodColor bloodColor: The blood color for tinting the effect
Returns:
PuffLaserBurn
: The created Puff component
public static PuffLaserBurn CreateEffect(PuffLaserBurn puffPrefab, float x, float y, float z, float delay, Vector3 velocity)
Creates a two-layer Puff effect with blood color support. Instantiates the prefab and applies blood coloring to both layers. Used for more complex puff animations with foreground and background elements.
Parameters:
- PuffTwoLayer puffPrefab: The PuffTwoLayer prefab to instantiate
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float delay: The delay before the effect starts (interpreted as xScale)
- Vector3 velocity: The initial velocity (y component used as yScale)
- BloodColor bloodColor: The blood color for tinting both layers
Returns:
PuffLaserBurn
: The created PuffTwoLayer component
public static PuffLaserBurn CreateEffect(PuffLaserBurn puffPrefab, float x, float y, float z, float delay, Vector3 velocity)
Creates a FaderSprite effect at the specified position. Simple instantiation method for fading sprite effects without additional configuration. Used for basic fade-out animations.
Parameters:
- FaderSprite prefab: The FaderSprite prefab to instantiate
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
Returns:
PuffLaserBurn
: The created FaderSprite component
public static PuffLaserBurn CreateEffect(PuffLaserBurn puffPrefab, float x, float y, float z, float delay, Vector3 velocity)
Creates a Puff effect with optional parent transform attachment. Configures scale based on delay parameter and can parent the effect to a moving object. Used for effects that need to follow characters or projectiles.
Parameters:
- Puff puffPrefab: The Puff prefab to instantiate
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- float delay: The delay (used as xScale when not 0)
- Vector3 velocity: The velocity (y component used as yScale when delay is not 0)
- Transform parentTransform: Optional transform to parent the effect to
Returns:
PuffLaserBurn
: The created Puff component
public static PuffLaserBurn CreateEffect(PuffLaserBurn puffPrefab, float x, float y, float z, float delay, Vector3 velocity)
Creates a laser burn Puff effect with specialized behavior. Instantiates the laser burn prefab and configures its timing and scale properties. Used for scorching and burning visual effects from laser weapons.
Parameters:
- PuffLaserBurn puffPrefab: The PuffLaserBurn prefab to instantiate
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- float delay: The delay before the burn effect starts
- Vector3 velocity: The initial velocity vector
Returns:
PuffLaserBurn
: The created PuffLaserBurn component
public static MuscleTempleFlexEffect CreateFlexEffectAir(Transform followTransform)
Creates an air flex effect that follows the specified transform. This visual effect indicates air/wind-based status from muscle temple power-ups.
Parameters:
- Transform followTransform: The transform that the flex effect should follow and be parented to.
Returns:
MuscleTempleFlexEffect
: The created MuscleTempleFlexEffect instance attached to the transform.
public static MuscleTempleFlexEffect CreateFlexEffectGolden(Transform followTransform)
Creates a golden flex effect that follows the specified transform. This visual effect indicates golden/powered-up status from muscle temple power-ups.
Parameters:
- Transform followTransform: The transform that the flex effect should follow and be parented to.
Returns:
MuscleTempleFlexEffect
: The created MuscleTempleFlexEffect instance attached to the transform.
public static MuscleTempleFlexEffect CreateFlexEffectInvulnerable(Transform followTransform)
Creates an invulnerability flex effect that follows the specified transform. This visual effect indicates invulnerability status from muscle temple power-ups.
Parameters:
- Transform followTransform: The transform that the flex effect should follow and be parented to.
Returns:
MuscleTempleFlexEffect
: The created MuscleTempleFlexEffect instance attached to the transform.
public static void CreateSmoke(float x, float y, float delay, Vector3 velocity)
Creates a smoke particle effect with random variation. Randomly selects from three different smoke prefabs to add visual variety. The smoke can be delayed and given initial velocity for dynamic smoke trails.
Parameters:
- float x: The x-coordinate where smoke originates
- float y: The y-coordinate where smoke originates
- float delay: The delay before smoke appears
- Vector3 velocity: The initial velocity for smoke movement
public static AnimatedTexture CreateTeleportFlexExplosion(Vector3 pos)
Creates a teleportation explosion effect at the specified position. This animated effect plays when teleporting with muscle temple powers.
Parameters:
- Vector3 pos: The position where the teleport explosion effect should appear.
Returns:
AnimatedTexture
: The created AnimatedTexture effect instance.
public static AnimatedTexture CreateTeleportFlexOut(Vector3 pos)
Creates a teleportation exit effect at the specified position. This animated effect plays at the destination when teleporting with muscle temple powers.
Parameters:
- Vector3 pos: The position where the teleport exit effect should appear.
Returns:
AnimatedTexture
: The created AnimatedTexture effect instance.
public static void SpawnMuscleTempleAvatar(Vector3 position)
Spawns the muscle temple avatar effect at the specified position. This is an animated visual effect related to the muscle temple power-up system.
Parameters:
- Vector3 position: The position where the avatar effect should appear.
public static void SpawnSparklePuff(Vector3 position, float speed)
Creates a sparkle puff effect that moves outward from the spawn position with random direction.
Parameters:
- Vector3 position: The position where the sparkle puff originates.
- float speed: The speed at which the sparkle particles move outward in random directions.
Fields
public Puff boomerangWindPrefab
Wind trail puff effect for boomerang weapon movement visuals.
public Puff electricity1Prefab
First electricity spark puff effect variant for electrical damage visuals.
public Puff electricity2Prefab
Second electricity spark puff effect variant for visual diversity in electrical effects.
public Puff electricity3Prefab
Third electricity spark puff effect used in CreateElectricityEffect method.
public Shrapnel fireSpark1Prefab
First fire spark shrapnel prefab that creates sparks ejected from fires and explosions.
public Shrapnel fireSpark2Prefab
Second fire spark shrapnel prefab variant for varied spark effects from fires.
public FlickerFader flame1Prefab
First flame effect prefab variant used for fire and burning visual effects.
public FlickerFader flame2Prefab
Second flame effect prefab variant used for fire and burning visual effects.
public FlickerFader flame3Prefab
Third flame effect prefab variant used for fire and burning visual effects.
public Puff flameCandle1Prefab
First candle flame puff effect prefab for small persistent fire effects.
public Puff flameCandle2Prefab
Second candle flame puff effect variant for visual variety in small fires.
public Puff flameCandle3Prefab
Third candle flame puff effect variant for diverse small fire visuals.
public Puff flameCandle4Prefab
Fourth candle flame puff effect variant for maximum variety in small fire effects.
public Shrapnel leaf1Prefab
First leaf shrapnel prefab used in CreateLeafBurst for foliage destruction effects.
public Shrapnel leaf2Prefab
Second leaf shrapnel prefab variant for varied foliage destruction effects.
public Puff puffDisappearPrefab
Standard disappearing puff effect for object removal or teleportation.
public Puff puffDisappearRingPrefab
Ring-shaped disappearing puff effect for enhanced teleportation visuals.
public Puff puffNinjaSmokePrefab
Ninja smoke puff effect for stealth abilities and smoke bomb visuals.
public Puff puffPeckShinePrefab
Peck shine puff effect for impact or special ability visual feedback.
public Puff sparkleDisappearPrefab
Sparkle effect for magical or special disappearing animations.
Character State & Effects
Methods
public static void CreateAmmoBubble(float x, float y)
Displays an ammunition indicator bubble at the specified position. Reuses the singleton bubble instance by restarting and repositioning it. Shown when players collect special ammunition.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
public static void CreateBloodTrailParticle(float x, float y, float z, float force, float xI, float yI, float lifeM, float sizeM)
Creates blood trail particle effects at z-depth 0. This convenience overload calls the full 3D version with default z positioning for standard blood trail effects.
Parameters:
- float x: The x-coordinate where the blood trail originates
- float y: The y-coordinate where the blood trail originates
- float force: The initial force applied to the particle
- float xI: The initial x-velocity component
- float yI: The initial y-velocity component
- float lifeM: Life duration multiplier for the particle
- float sizeM: Size multiplier (less than 2 uses 2 variants, 2+ uses 3 variants)
public static void CreateBloodTrailParticle(float x, float y, float z, float force, float xI, float yI, float lifeM, float sizeM)
Creates blood trail particle effects with full control. Uses identical logic to slime trails but with blood-specific particle emitters. Small particles use 2 variations, large particles use 3 variations with size halving for proper scaling.
Parameters:
- float x: The x-coordinate where the blood trail originates
- float y: The y-coordinate where the blood trail originates
- float z: The z-coordinate (depth) of the particle
- float force: The initial force applied to the particle
- float xI: The initial x-velocity component
- float yI: The initial y-velocity component
- float lifeM: Life duration multiplier for the particle
- float sizeM: Size multiplier (less than 2 uses small variants, 2+ uses large variants)
public static void CreateEvilFloatParticle(float x, float y, float force, float xI, float yI)
Creates a single dark floating particle for evil or supernatural effects. Randomly selects from four dark color variations ranging from pure black to dark gray (0.231, 0.231, 0.231). Uses special evil float particles for ominous atmospheric effects.
Parameters:
- float x: The x-coordinate where the particle appears
- float y: The y-coordinate where the particle appears
- float force: The force applied to the floating particle
- float xI: The initial x-velocity of the particle
- float yI: The initial y-velocity of the particle
public static void CreateFleshParticles(float x, float y, int count, float offsetRadius, float force, float xI, float yI)
Creates a complex mix of flesh particle effects for gore and gibbing. Combines multiple particle types: flesh dust dots at 1.4x force, medium flesh chunks at reduced force and offset, and three types of small flesh particles with the third type using 1.1x force. The most detailed gore effect available.
Parameters:
- float x: The x-coordinate of the flesh origin
- float y: The y-coordinate of the flesh origin
- int count: The total number of particles to distribute among types
- float offsetRadius: The spread radius for particle placement
- float force: The base force multiplier for particle velocity
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
public static void CreateFreeLifeBubble(float x, float y)
Displays a free life indicator bubble at the specified position. Reuses the singleton bubble instance by restarting and repositioning it. Shown when players collect extra life pickups.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
public static void CreateHeroIndicator(Unit unit)
Creates a colored visual indicator above a unit to identify the player. The indicator is colored based on the unit's player number and follows the unit's position.
Parameters:
- Unit unit: The unit to attach the hero indicator to. The indicator will be parented to this unit's transform.
public static ReactionBubble CreateKickPlayerBubble(float x, float y)
Creates a new kick player reaction bubble at the specified position. Unlike other bubbles, this creates a new instance each time rather than reusing a singleton. Returns the bubble for further configuration.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
Returns:
ReactionBubble
: The created ReactionBubble instance for additional customization
public static void CreatePromotedBubble(float x, float y)
Displays a promotion indicator bubble at the specified position. Reuses the singleton bubble instance by restarting and repositioning it. Shown when players achieve promotion milestones.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
public static ParticleSpawner CreateSlimeDrip()
Creates a slime drip particle spawner effect. Instantiates a new spawner from the prefab that can be configured to emit slime droplet particles. Returns null if the effects controller instance is not available.
Returns:
ParticleSpawner
: A ParticleSpawner configured for slime drips, or null if creation fails
public static void CreateSlimeParticles(Color color, float x, float y, float z, int count, float offsetXRadius, float offsetYRadius, float force, float xI, float yI)
Creates clustered slime particles with drift behavior. Complex positioning algorithm with 60% chance to create new cluster and 40% to continue from previous position. Particles drift inward based on force parameter. Creates half the requested count plus one, with 0.1x multiplier on offset radii for tighter clustering.
Parameters:
- BloodColor color: The blood color type for the slime
- float x: The x-coordinate of the particle origin
- float y: The y-coordinate of the particle origin
- int count: The base count (actual is count/2 + 1)
- float offsetXRadius: The horizontal spread (multiplied by 0.1)
- float offsetYRadius: The vertical spread (multiplied by 0.1)
- float force: The inward drift force
- float xI: The initial x-velocity
- float yI: The initial y-velocity
public static void CreateSlimeParticlesSpray(Color color, float x, float y, float z, int count, float offsetXRadius, float offsetYRadius, float force, float xI, float yI, float forceVariance)
Creates a directional spray of slime particles based on blood color type. Particles emit in a circular pattern with force variance controlling the spread angle. Converts BloodColor enum to appropriate color before creating the spray effect.
Parameters:
- BloodColor color: The blood color type for the slime
- float x: The x-coordinate of the spray origin
- float y: The y-coordinate of the spray origin
- float z: The z-coordinate of the spray origin
- int count: The number of slime particles to spray
- float offsetXRadius: The horizontal offset for spray origin
- float offsetYRadius: The vertical offset for spray origin
- float force: The base force for particle velocity
- float xI: The initial x-velocity direction
- float yI: The initial y-velocity direction
- float forceVariance: The spread control (1.0 = full variance)
public static void CreateSlimeParticlesSpray(Color color, float x, float y, float z, int count, float offsetXRadius, float offsetYRadius, float force, float xI, float yI, float forceVariance)
Creates a directional spray of slime particles with explicit color. Emits particles in a circular pattern using Math.Point3OnCircle for even distribution. Force variance parameter controls how much the particles spread from the main direction.
Parameters:
- Color color: The explicit color for the slime particles
- float x: The x-coordinate of the spray origin
- float y: The y-coordinate of the spray origin
- float z: The z-coordinate of the spray origin
- int count: The number of slime particles to spray
- float offsetXRadius: The horizontal offset for spray origin
- float offsetYRadius: The vertical offset for spray origin
- float force: The base force for particle velocity
- float xI: The initial x-velocity direction
- float yI: The initial y-velocity direction
- float forceVariance: The spread control (1.0 = full variance)
public static void CreateSlimeTrailParticle(float x, float y, float z, float force, float xI, float yI, float lifeM, float sizeM)
Creates slime trail particle effects at z-depth 0. This convenience overload calls the full 3D version with default z positioning for standard slime trail effects.
Parameters:
- float x: The x-coordinate where the slime trail originates
- float y: The y-coordinate where the slime trail originates
- float force: The initial force applied to the particle
- float xI: The initial x-velocity component
- float yI: The initial y-velocity component
- float lifeM: Life duration multiplier for the particle
- float sizeM: Size multiplier (less than 2 uses 2 variants, 2+ uses 3 variants)
public static void CreateSlimeTrailParticle(float x, float y, float z, float force, float xI, float yI, float lifeM, float sizeM)
Creates slime trail particle effects with full control. Automatically selects between small and large variants based on size multiplier (threshold at 2). Small particles randomly pick from 2 variations, large particles from 3 variations. Large particles have their size halved for proper scaling.
Parameters:
- float x: The x-coordinate where the slime trail originates
- float y: The y-coordinate where the slime trail originates
- float z: The z-coordinate (depth) of the particle
- float force: The initial force applied to the particle
- float xI: The initial x-velocity component
- float yI: The initial y-velocity component
- float lifeM: Life duration multiplier for the particle
- float sizeM: Size multiplier (less than 2 uses small variants, 2+ uses large variants)
public static void CreateWaterDrip(float x, float y, float offsetXRadius, float offsetYRadius, float xI, float yI, float scaleM, BloodColor color)
Creates a water drip particle spawner effect. Instantiates a new spawner from the prefab that can be configured to emit water droplet particles. Returns null if the effects controller instance is not available.
Returns:
void
: A ParticleSpawner configured for water drips, or null if creation fails
public static Color GetBloodColor(BloodColor color)
Converts a BloodColor enum value to its corresponding Unity Color. Returns preset color values for different blood types: red (default), green (alien), oil (mechanical), or frozen (ice blue).
Parameters:
- BloodColor color: The blood color type to convert
Returns:
Color
: The Unity Color corresponding to the specified blood type
Fields
public AnimatedTexture AlienEggPop
Alien egg hatching animation effect used when alien eggs burst open to release facehuggers.
public ReactionBubble ammoBubble
Ammunition reaction bubble effect shown when players collect ammo. Not currently used in codebase.
public ParticleEmitter BlackBloodParticlesBig
Large black blood particle emitter for major oil or mechanical fluid splatter.
public ParticleEmitter BlackBloodParticlesDots
Dot-sized black blood particle emitter used when BloodColor is Oil.
public ParticleEmitter BlackBloodParticlesSmall
Small black blood particle emitter for minor oil or mechanical leaks.
public ParticleEmitter bloodParticlesDripsBlack
Black blood drip particle emitter for oil leaking effects from mechanical units.
public ParticleEmitter bloodParticlesDripsGreen
Green blood drip particle emitter for alien bleeding effects.
public ParticleEmitter bloodParticlesDripsRed
Red blood drip particle emitter for continuous bleeding effects from wounds.
public Material broCoveredInAcidMaterial
Material applied to bros when they are covered in acid damage effects. Not currently used in codebase.
public ParticleEmitter bubbleParticles
Particle emitter for underwater bubble effects, emits rising bubbles with varying sizes.
public ReactionBubble freeLifeBubble
Free life reaction bubble effect shown when players gain extra lives. Not currently used in codebase.
public Color FrozenBloodColor = new Color(0.19f, 0.7f, 1f)
The color used for frozen or ice blood effects. Default is light blue (0.19, 0.7, 1.0).
public Color GreenBloodColor = Color.green
The color used for alien or acid blood effects. Default is pure green.
public ParticleEmitter GreenBloodParticlesBig
Large green blood particle emitter for major alien blood splatter effects.
public ParticleEmitter GreenBloodParticlesDots
Dot-sized green blood particle emitter used when BloodColor is Green.
public ParticleEmitter GreenBloodParticlesSmall
Small green blood particle emitter for minor alien blood effects.
public SpriteSM heroIndicator
Hero indicator sprite prefab (SpriteSM) used by CreateHeroIndicator() to display player-colored visual indicators above hero units for identification.
public ReactionBubble kickBubble
Kick reaction bubble template used to create kick indicator bubbles above players.
public Material kickConfirmedMaterial
Material for kick indicator bubbles when kick is confirmed, used by TestVanDammeAnim for visual feedback.
public Material kickConfirmMaterial
Material for kick indicator bubbles during confirmation phase. Not currently used in codebase.
public Material kickdDefaultMaterial
Default material for kick indicator bubbles in normal state. Not currently used in codebase.
public Material mookCoveredInAcidMaterial
Material applied to mooks when they are covered in acid damage effects. Not currently used in codebase.
public AnimatedTexture muscleTempleAvatarEffect
Animated texture prefab used by CreateMuscleTempleAvatar() to create visual effects related to muscle temple power-ups and avatar transformations.
public MuscleTempleFlexEffect muscleTempleFlexEffectAir
Air flex visual effect prefab (MuscleTempleFlexEffect) that follows units with air/floating muscle temple power-ups, indicating enhanced aerial abilities.
public MuscleTempleFlexEffect muscleTempleFlexEffectGolden
Golden flex visual effect prefab (MuscleTempleFlexEffect) that follows units with golden muscle temple power-ups, creating a golden aura around powered-up characters.
public MuscleTempleFlexEffect muscleTempleFlexEffectInvulnerable
Invulnerability flex visual effect prefab (MuscleTempleFlexEffect) that follows units with invulnerability muscle temple power-ups, indicating temporary damage immunity.
public AnimatedTexture muscleTempleFlexTeleportExplosion
Animated texture prefab for the explosion effect that plays when a unit arrives at their destination after muscle temple teleportation.
public AnimatedTexture muscleTempleFlexTeleportOut
Animated texture prefab for the departure effect that plays when a unit begins muscle temple teleportation, indicating the start of the teleport sequence.
public Color OilBloodColor = new Color(0.1f, 0.1f, 0.1f)
The color used for oil or mechanical blood effects. Default is dark gray (0.1, 0.1, 0.1).
public ParticleEmitter PoopBloodParticlesDots
Dot-sized sewerage particle emitter used when BloodColor is Sewerage.
public ParticleEmitter PoopParticlesBig
Large sewerage particle emitter for major waste splatter effects.
public ParticleEmitter PoopParticlesSmall
Small sewerage particle emitter for minor waste effects.
public ReactionBubble promotedBubble
Promotion reaction bubble effect shown when players are promoted or level up.
public Color QuicksandBloodColor = new Color(0.7f, 0.5f, 0.3f)
The color used for sand or dust blood effects. Default is a brown/tan color (0.7, 0.5, 0.3).
public Color RedBloodColor = Color.red
The color used for standard red blood effects. Default is pure red.
public ParticleEmitter RedBloodParticlesBig
Large red blood particle emitter for major blood splatter effects from standard enemies.
public ParticleEmitter RedBloodParticlesDots
Dot-sized red blood particle emitter used when BloodColor is Red or unspecified.
public ParticleEmitter RedBloodParticlesSmall
Small red blood particle emitter for minor blood effects and wounds.
public ParticleEmitter semenParticlesDots
Dot-sized particle emitter for specialized white fluid effects.
public ParticleEmitter semenParticlesSmall
Small particle emitter for specialized white fluid spray effects.
public Puff sparklePuff
Sparkle particle effect prefab (Puff) used by CreateSparklePuff() to generate sparkle effects with customizable lifetime for various magical or special visual feedback.
public ParticleEmitter waterParticlesDrip
Water drip particle emitter for water leaking and dripping effects.
Environmental Interaction
Methods
public static void CreateSlimeCover(int damage, float x, float y, float radius, bool onlyDownward = false)
Creates a slime cover on nearby terrain surfaces within a specified radius. Casts rays from the center point to grid positions and adds slime to surfaces hit.
Parameters:
- int damage: The damage value or intensity of the slime cover to apply.
- float x: The X coordinate of the center position for slime coverage.
- float y: The Y coordinate of the center position for slime coverage.
- float radius: The radius from the center point to check for surfaces to cover with slime.
- bool onlyDownward: If true, only applies slime to surfaces below the center Y position. Default is false.
public void DeregisterTickingBillboard(OilAccidentTicker ticker)
Removes an oil accident ticker billboard from the tracking system. Typically called when the billboard is destroyed or no longer needs updates.
Parameters:
- OilAccidentTicker ticker: The oil accident ticker billboard to deregister
public void RegisterTickingBillboard(OilAccidentTicker ticker)
Registers an oil accident ticker billboard to the tracking system. Sets the ticker's initial counter value to match the current accident timer. Used for "days since last accident" warning signs that reset when explosions occur nearby.
Parameters:
- OilAccidentTicker ticker: The oil accident ticker billboard to register
public void ResetAccidentTicker()
Resets the global accident timer to zero and updates all registered oil accident ticker displays. Called when an explosion or accident occurs to reset all "days since last accident" counters in the level.
public void StartRainAndLightning()
Activates weather effects including rain particles and lightning. Enables the LightningController component, activates rain visual effects that follow the camera, and adjusts fog positioning based on level theme (City/America or Hell) and game mode. In deathmatch modes, raises fog to y=70 for better visibility.
Properties
public Puff BoulderRollPoof { get; set; }
Gets the puff effect used when boulders roll. Lazy-loads the Puff component from the prefab reference on first access and caches it for subsequent use. Used for dust/debris effects from rolling objects.
Fields
private List<OilAccidentTicker> _oilAccidentTickers
Private list tracking all registered OilAccidentTicker objects in the scene, used to update oil accident counter displays when accidents occur.
private float _timeSinceAccident
Private timer tracking elapsed time since the last oil-related accident, incremented in Update() and reset to zero when ResetAccidentTicker() is called.
public Transform ashHolder
Transform container for ash particle effects that follows the camera in burning environments.
public Shrapnel backgroundWoodShrapnel1
First wood shrapnel variant for background wooden object destruction effects.
public Shrapnel backgroundWoodShrapnel2
Second wood shrapnel variant for background wooden object destruction variety.
public Shrapnel backgroundWoodShrapnel3
Third wood shrapnel variant for background wooden object destruction diversity.
public Shrapnel backgroundWoodShrapnel4
Fourth wood shrapnel variant for background wooden object destruction effects.
public ParticleEmitter bloodTrailPuffBigParticle1
First large blood trail particle emitter for heavy bleeding effects.
public ParticleEmitter bloodTrailPuffBigParticle2
Second large blood trail particle variant for major blood splatter trails.
public ParticleEmitter bloodTrailPuffBigParticle3
Third large blood trail particle variant for extreme bleeding visual effects.
public ParticleEmitter bloodTrailPuffParticle1
First blood trail particle emitter used randomly for blood trail variety.
public ParticleEmitter bloodTrailPuffParticle2
Second blood trail particle emitter alternated with first for visual diversity.
public ParticleEmitter dustParticles
Particle emitter for dust cloud effects from impacts, falls, and environmental disturbances.
public ParticleEmitter evilFloatParticles
Particle emitter for evil floating ambient particles in dark environments.
public bool fireAndAsh
Flag indicating whether fire and ash environmental effects are active, used in BurningJungle theme.
public VictoryFireWork[] fireWorks
Array of victory firework effect prefabs launched when levels are completed in campaign mode.
protected int fireWorksCount
Counter tracking number of fireworks launched, used to vary launch positions and prefab selection.
protected float fireWorksCounter
Timer that controls the interval between launching victory fireworks.
public static bool fireworksOn
Static flag controlling whether victory fireworks should be displayed on level completion.
public FullScreenFlashEffect flashEffect
Full screen flash effect component for bright flashes from explosions and other intense effects.
public Transform fogObject
Transform for standard fog visual effect used in City and America themes.
public bool forceFireworksOn
Instance flag to force fireworks display regardless of game state, useful for testing or special events.
public float gustFrequency
Frequency value that determines how often wind gusts occur, used by the wind system to create periodic wind variations on affected objects.
public float gustM
Gust magnitude multiplier that controls the intensity of individual wind gusts when they occur, amplifying the wind effect during gust periods.
public Transform hellFogObject
Transform for hell-themed red fog effect used in Hell levels.
protected LightningController lightningController
Component that manages lightning strike effects during rain weather conditions.
public GameObject lightObject
GameObject reference for global lighting control in the scene.
public float offsetM = 1f
Position offset multiplier (default 1.0) used in wind calculations to determine spatial variations in wind effects across different positions.
public Transform oilParticleParent
Parent transform used by oil-related objects (OilTankBlock, DoodadOilParticle, DoodadOilSpawner) to organize and manage oil particle effects in the scene hierarchy.
public ParticleEmitter plumePuffBigParticle1
First large smoke plume particle emitter for bigger explosion dust effects.
public ParticleEmitter plumePuffBigParticle2
Second large smoke plume particle variant for massive dust clouds.
public ParticleEmitter plumePuffParticle1
First smoke plume particle emitter for dust and smoke puff effects.
public ParticleEmitter plumePuffParticle2
Second smoke plume particle variant for visual variety in dust clouds.
public ParticleEmitter plumePuffParticleBlack1
First black smoke plume particle emitter for dark smoke effects.
public ParticleEmitter plumePuffParticleBlack2
Second black smoke plume particle variant for visual diversity.
public ParticleEmitter plumePuffParticleHell
Hell-themed smoke plume particle emitter for infernal visual effects.
public ParticleEmitter plumePuffParticlePink
Pink smoke plume particle emitter for special visual effects.
public ParticleEmitter plumePuffParticlePitchBlack
Pitch black smoke plume particle emitter for the darkest smoke effects.
public ParticleEmitter plumePuffParticlePurple
Purple smoke plume particle emitter for magical or alien effects.
public Shrapnel plumeShrapnelPrefab
Shrapnel prefab for smoke plume particle effects from explosions.
protected bool rainAndLightning
Flag indicating whether rain and lightning weather effects are currently active.
protected Transform rainFollowTransform
Cached transform reference for camera following used by rain and ash effects.
public Transform rainHolder
Transform container for rain particle effects that follows the camera position.
public SlimeGroundCover slimeCoverPrefab
Slime ground cover prefab for upward-facing surfaces, used in CreateSlimeCover method.
public SlimeGroundCover slimeCoverSidesPrefab
Slime ground cover prefab for side surfaces (walls), used in CreateSlimeCover method.
public ParticleSpawner slimeDripSpawner
Particle spawner prefab (ParticleSpawner) used by CreateSlimeDrip() to generate slime dripping particle effects from surfaces, creating environmental slime interactions.
public ParticleEmitter slimeParticles
Particle emitter for slime-related environmental effects and acid splashes.
public ParticleEmitter slimeTrailPuffBigParticle1
First large slime trail particle emitter for heavy slime disturbance effects.
public ParticleEmitter slimeTrailPuffBigParticle2
Second large slime trail particle variant for major slime impacts.
public ParticleEmitter slimeTrailPuffBigParticle3
Third large slime trail particle variant for maximum visual variety in slime effects.
public ParticleEmitter slimeTrailPuffParticle1
First slime trail particle emitter for movement through slime effects.
public ParticleEmitter slimeTrailPuffParticle2
Second slime trail particle variant for diverse slime movement visuals.
public ParticleEmitter summonMagicParticle
Particle emitter for magical summoning effects used by warlock portals.
public Transform sunObject
Transform for sun lighting effect object used in City theme environments.
public Transform thickFogObject
Transform for thick fog visual effect for enhanced atmospheric density.
public ParticleSpawner waterDripSpawner
Particle spawner prefab (ParticleSpawner) used by CreateWaterDrip() to generate water dripping particle effects from surfaces, creating environmental water interactions.
public AnimationCurve windGustPattern
Animation curve that defines the wind gust intensity pattern over time, used by the wind system to create realistic non-linear wind variations.
public float windStrength
Overall wind intensity multiplier that controls the strength of wind effects applied to physics-enabled objects like JigglyBit components.
Status Effects
Methods
public static void CreateBlindedEffect(float x, float y, float delay, Vector3 velocity)
Creates rotating star effects for stunned or blinded units. Uses a cycling counter to alternate between three different star prefab variations for visual variety. Each call increments the global stunned stars counter to ensure variation across multiple uses.
Parameters:
- float x: The x-coordinate for the stars
- float y: The y-coordinate for the stars
- float delay: The delay before stars appear
- Vector3 velocity: The velocity parameter (currently unused in implementation)
public static void CreateCreateTinyPop(float x, float y)
Creates a tiny popping effect for minor impacts or UI feedback. Produces a small burst animation at the specified position. Note: Method name contains redundant "Create".
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
public static DistortionGrow CreateDistortionHeatWaveEffect(float x, float y, float z)
Creates a heat wave distortion effect and returns the DistortionGrow component for custom configuration. Allows fine-tuning of the distortion parameters after creation for specific heat shimmer effects.
Parameters:
- float x: The x-coordinate of the heat source
- float y: The y-coordinate of the heat source
- float z: The z-coordinate (depth) of the effect
Returns:
DistortionGrow
: The DistortionGrow component for additional configuration
public static void CreateDistortionWobbleLargeRingEffect(float x, float y, float delay)
Creates a large heat distortion ring effect. Used for major explosions and intense heat sources to create dramatic expanding air ripples visible across a wide area.
Parameters:
- float x: The x-coordinate of the distortion center
- float y: The y-coordinate of the distortion center
- float delay: The delay before the distortion appears
public static void CreateDistortionWobbleLargeRingFullScreenEffect(float x, float y, float delay)
Creates a massive screen-filling distortion effect with extreme parameters. Sets alpha to 9 for maximum intensity, growth rate to 1355 for rapid expansion, and growth lerp decrease to 0.1. Used for nuclear explosions or other catastrophic events that affect the entire screen.
Parameters:
- float x: The x-coordinate of the distortion center
- float y: The y-coordinate of the distortion center
- float delay: The delay before the distortion appears
public static void CreateDistortionWobblePinchEffect(float x, float y, float delay)
Creates a pinch-style distortion effect that pulls inward rather than expanding. Used for implosion effects, black holes, or vacuum-based attacks where the visual effect should appear to suck inward.
Parameters:
- float x: The x-coordinate of the distortion center
- float y: The y-coordinate of the distortion center
- float delay: The delay before the distortion appears
public static void CreateDistortionWobbleRingEffect(float x, float y, float delay)
Creates a medium-sized heat distortion ring effect. Used for standard explosions and moderate heat effects to create visible air ripples that expand from the impact point.
Parameters:
- float x: The x-coordinate of the distortion center
- float y: The y-coordinate of the distortion center
- float delay: The delay before the distortion appears
public static void CreateDistortionWobbleSmallRingEffect(float x, float y, float delay)
Creates a small heat distortion ring effect. Used for minor explosions and heat-based attacks to create a rippling air distortion that expands outward from the origin point.
Parameters:
- float x: The x-coordinate of the distortion center
- float y: The y-coordinate of the distortion center
- float delay: The delay before the distortion appears
public static Puff CreateElectricShock(float x, float y, float z, float delay, Vector3 velocity)
Creates electrical shock visual effects with random variations. Randomly selects from three electricity prefabs with equal probability. Used for electrical damage, stun effects, and power-related visuals.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- float delay: The delay before the shock effect starts
- Vector3 velocity: The initial velocity vector for the effect
Returns:
Puff
: The created Puff component for the electrical effect
public static ExplosionRangePop CreateExplosionRangePop(float x, float y, float z, float range)
Creates an explosion range indicator that expands to show blast radius. Instantiates the range pop prefab and sets its size based on the explosion range. Also resets the accident ticker for oil spill signs.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- float range: The explosion radius to visualize
Returns:
ExplosionRangePop
: The created ExplosionRangePop component for further manipulation
public static void CreateFreezeDamageEffect(float x, float y, Transform parentTransform)
Creates a freeze damage visual effect that can optionally attach to a parent transform. Used to show ice crystals or frost effects on frozen units. The effect is created at z-depth -10 for proper layering.
Parameters:
- float x: The x-coordinate of the freeze effect
- float y: The y-coordinate of the freeze effect
- Transform parentTransform: Optional transform to parent the effect to (null for world space)
public static void CreateNinjaSmokeEffect(float x, float y, float xI, float yI)
Creates a ninja smoke bomb effect for stealth abilities. Produces a cloud of smoke at the specified position. Note: Velocity parameters are accepted but unused in the current implementation.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float xI: The horizontal velocity (unused in implementation)
- float yI: The vertical velocity (unused in implementation)
public static void CreatePuffDisappearEffect(float x, float y, float xI, float yI)
Creates a disappearance puff effect with accompanying ring. Spawns both a main puff cloud and a ring effect with 0.25 unit vertical offset. Used for teleportation and vanishing abilities.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float xI: The horizontal velocity (unused in implementation)
- float yI: The vertical velocity (unused in implementation)
public static Puff CreatePuffDisappearRingEffect(float x, float y, float xI, float yI)
Creates just the ring portion of a disappearance effect. Returns the Puff component for further manipulation. Note: Velocity parameters are accepted but unused.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float xI: The horizontal velocity (unused in implementation)
- float yI: The vertical velocity (unused in implementation)
Returns:
Puff
: The created Puff component for the ring effect
public static Puff CreatePuffPeckShineEffect(float x, float y, float xI, float yI)
Creates a shining effect typically used for peck attacks or impacts. Returns the Puff component for further manipulation. Note: Velocity parameters are accepted but unused.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float xI: The horizontal velocity (unused in implementation)
- float yI: The vertical velocity (unused in implementation)
Returns:
Puff
: The created Puff component for the shine effect
public static void CreateRevivedZombiePassiveEffect(float x, float y, float z, Transform parentedTransform)
Creates a persistent effect for revived zombie units. The effect is parented to the zombie transform to provide continuous visual indication of undead status. Typically shows as a subtle aura or particle effect.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
- Transform parentedTransform: The transform to parent the effect to
public static void CreateReviveZombieEffect(float x, float y, Transform parentedTransform)
Creates a zombie revival effect at the specified position. The effect is parented to the provided transform to follow the reviving unit. Used when necromancer abilities raise the undead.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- Transform parentedTransform: The transform to parent the effect to
public static void CreateSparkleDisappearEffect(float x, float y, float xI, float yI)
Creates a sparkly disappearance effect for magical vanishing. Produces a glittering particle effect at the specified position. Note: Velocity parameters are accepted but unused in the current implementation.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float xI: The horizontal velocity (unused in implementation)
- float yI: The vertical velocity (unused in implementation)
public static void CreateUndeadSelfReviveEffect(float x, float y, float z)
Creates a self-revival effect for undead units coming back to life. Unlike other revival effects, this is not parented and plays as a one-shot animation at the revival location.
Parameters:
- float x: The x-coordinate in world space
- float y: The y-coordinate in world space
- float z: The z-coordinate in world space
Fields
public Material bigDogCoveredInAcidMaterial
Material applied to big dog mook units (mega MookDog) when they are covered in acid, creating a visual acid effect on their sprite renderer.
public Material bigMookCoveredInAcidMaterial
Material applied to big mook units (MookBigGuy and large MookSuicide) when they are covered in acid, creating a visual acid effect on their sprite renderer.
public DistortionGrow distortionHeatWavePrefab
Heat wave distortion effect prefab for thermal shimmer effects. Not currently used but available for heat-based visuals.
public DistortionGrow distortionPinchGrowPrefab
Pinching distortion effect prefab that creates a warping pinch visual, used by CreateDistortionPinch method.
public DistortionGrow distortionWobbleGrowPrefab
Standard wobbling distortion effect prefab for medium reality distortion visuals, used by CreateDistortionWobble method.
public DistortionGrow distortionWobbleLargeGrowPrefab
Large wobbling distortion effect prefab for major reality warping, used by CreateDistortionWobbleLarge and extreme distortion methods.
public DistortionGrow distortionWobbleSmallGrowPrefab
Small wobbling distortion effect prefab for minor reality warping visuals, used by CreateDistortionWobbleSmall method.
public Material dogCoveredInAcidMaterial
Material applied to regular dog mook units (MookDog) when they are covered in acid, creating a visual acid effect on their sprite renderer.
public Material grenadierMookCoveredInAcidMaterial
Material applied to grenadier mook units (MookGrenadier) when they are covered in acid, creating a visual acid effect on their sprite renderer.
public Material hellBoomerCoveredInAcidMaterial
Material applied to hell boomer mook units (MookHellBoomer) when they are covered in acid, creating a visual acid effect on their sprite renderer.
public Puff revivedZombiePassivePrefab
Passive effect prefab for active revived zombies, used by CreateRevivedZombiePassiveEffect method.
public Puff reviveZombiePrefab
Zombie revival effect prefab for necromancy or undead resurrection visuals, used by CreateReviveZombieEffect method.
public PuffTwoLayer stunnedStars1Prefab
First stunned stars effect variant, rotating stars shown above stunned units.
public PuffTwoLayer stunnedStars2Prefab
Second stunned stars effect variant, provides visual variety for stun effects.
public PuffTwoLayer stunnedStars3Prefab
Third stunned stars effect variant, adds additional variety to stun visuals.
protected static int stunnedStarsCount
Static counter used to cycle through stunned star variants for visual variety.
public Puff undeadSelfRevivePrefab
Undead self-revival effect prefab that creates visual feedback when undead units resurrect themselves.
Audio System
Methods
protected static void PlayBloodSquirtSound(float x, float y, float volume)
Plays blood squirt sound effect from the effort sounds collection. Protected method for blood spray and arterial bleeding audio. Does not return the AudioSource.
Parameters:
- float x: The x-coordinate of the sound source
- float y: The y-coordinate of the sound source
- float volume: The playback volume
protected static AudioSource PlayExplosionHugeSound(float x, float y, float volume, bool ignoreFilters)
Plays huge explosion sound effect from the death sounds collection. Protected method used for major explosive events. Returns the AudioSource for further audio processing.
Parameters:
- float x: The x-coordinate of the sound source
- float y: The y-coordinate of the sound source
- float volume: The playback volume
- bool ignoreFilters: Whether to bypass audio filters
Returns:
AudioSource
: The AudioSource playing the sound
protected static AudioSource PlayExplosionMassiveSound(float x, float y, float volume, bool ignoreFilters)
Plays massive explosion sound effect from the death sounds collection. Protected method for the largest explosive events. Returns the AudioSource for audio manipulation.
Parameters:
- float x: The x-coordinate of the sound source
- float y: The y-coordinate of the sound source
- float volume: The playback volume
- bool ignoreFilters: Whether to bypass audio filters
Returns:
AudioSource
: The AudioSource playing the sound
protected static void PlayExplosionSound(float x, float y, float volume)
Plays standard explosion sound effect from the death sounds collection. Protected method for regular explosive audio feedback. Does not return the AudioSource.
Parameters:
- float x: The x-coordinate of the sound source
- float y: The y-coordinate of the sound source
- float volume: The playback volume
protected static void PlayGlassShatterSound(float x, float y, float volume)
Plays glass shattering sound effect from the death sounds collection. Protected method for glass breaking audio feedback. Does not return the AudioSource.
Parameters:
- float x: The x-coordinate of the sound source
- float y: The y-coordinate of the sound source
- float volume: The playback volume
protected static AudioSource PlaySlimeExplosionSound(float x, float y, float volume, bool ignoreFilters)
Plays slime explosion sound effect from the death sounds collection. Protected method that returns the AudioSource for further manipulation. Used for wet, organic explosion audio feedback.
Parameters:
- float x: The x-coordinate of the sound source
- float y: The y-coordinate of the sound source
- float volume: The playback volume
- bool ignoreFilters: Whether to bypass audio filters
Returns:
AudioSource
: The AudioSource playing the sound
protected static void PlaySmallExplosionSound(float x, float y, float volume)
Plays small explosion sound using attack2 sounds collection. Protected method for minor explosive effects. Does not return the AudioSource.
Parameters:
- float x: The x-coordinate of the sound source
- float y: The y-coordinate of the sound source
- float volume: The playback volume
protected static AudioSource PlaySmallSlimeExplosionSound(float x, float y, float volume, bool ignoreFilters)
Plays small slime explosion sound using greeting sounds at 0.7 pitch. Protected method that creates a lower-pitched variant for smaller slime effects. Returns the AudioSource for manipulation.
Parameters:
- float x: The x-coordinate of the sound source
- float y: The y-coordinate of the sound source
- float volume: The playback volume
- bool ignoreFilters: Whether to bypass audio filters
Returns:
AudioSource
: The AudioSource playing the sound
Fields
public SoundHolder bloodSoundHolder
Sound holder containing blood-related audio effects played when blood effects are created.
public SoundHolder explosionHugeSoundHolder
Sound holder containing huge explosion audio effects for massive blast sounds.
public SoundHolder explosionMassiveSoundHolder
Sound holder containing massive explosion audio effects for extreme blast sounds.
public SoundHolder explosionSlimeSoundHolder
Sound holder containing slime explosion audio effects for alien/acid burst sounds.
public SoundHolder explosionSoundHolder
Sound holder containing standard explosion audio effects for blast sounds.
public SoundHolder glassSoundHolder
Sound holder containing glass breaking sound effects played when glass shatters.
Helper & Utility
Methods
public static void AttachLight(Unit unit)
Attaches a light source to a unit for illumination effects. Creates the light object 6 units above the unit's position and parents it for movement tracking. Used for character lighting or special effects.
Parameters:
- Unit unit: The unit to attach the light to
public static void CreateBoneParticles(ParticleEmitter emitter, float x, float y, int count, float offsetRadius, float force, float xI, float yI)
Creates bone-colored particles using a specified emitter. Randomly selects bone colors from the theme for skeletal or ashen debris effects with appropriate pale color variations.
Parameters:
- ParticleEmitter emitter: The particle emitter to use for particle creation
- float x: The x-coordinate of the particle origin
- float y: The y-coordinate of the particle origin
- int count: The number of particles to create
- float offsetRadius: The spread radius for particle placement
- float force: The force multiplier for particle velocity
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
public static void CreateDustParticles(ParticleEmitter emitter, float x, float y, int count, float offsetRadius, float force, float xI, float yI, Color color)
Creates dirt-colored dust particles using a specified emitter. Randomly selects dirt colors from the theme for each particle. Uses the same distribution pattern as flesh dust but with theme-appropriate dirt coloring.
Parameters:
- ParticleEmitter emitter: The particle emitter to use for particle creation
- float x: The x-coordinate of the particle origin
- float y: The y-coordinate of the particle origin
- int count: The number of particles to create
- float offsetRadius: The spread radius for particle placement
- float force: The force multiplier for particle velocity
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
public static void CreateDustParticles(ParticleEmitter emitter, float x, float y, int count, float offsetRadius, float force, float xI, float yI, Color color)
Creates dust particles with a specified color using a custom emitter. Overrides the emitter's default coloring to apply the provided color uniformly to all created particles.
Parameters:
- ParticleEmitter emitter: The particle emitter to use for particle creation
- float x: The x-coordinate of the particle origin
- float y: The y-coordinate of the particle origin
- int count: The number of particles to create
- float offsetRadius: The spread radius for particle placement
- float force: The force multiplier for particle velocity
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
- Color color: The color to apply to all particles
public static void CreateDustParticlesRow(ParticleEmitter emitter, float x, float y, int count, float offsetXRadius, float xForce, float yForce, float xI, float yI, Color color)
Creates particles in a horizontal row pattern using a specified emitter. Particles are distributed only along the x-axis while maintaining a constant y-position, creating a line effect. Supports separate x and y force components for directional control.
Parameters:
- ParticleEmitter emitter: The particle emitter to use for particle creation
- float x: The x-coordinate of the row center
- float y: The y-coordinate of the row (remains constant)
- int count: The number of particles to create in the row
- float offsetXRadius: The horizontal spread radius for the row
- float xForce: The horizontal force component for particles
- float yForce: The vertical force component for particles
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
- Color color: The color to apply to all particles
public static void CreateFleshDustParticles(ParticleEmitter emitter, float x, float y, int count, float offsetRadius, float force, float xI, float yI)
Creates flesh-colored dust particles using a specified emitter. Randomly selects flesh colors from the theme for each particle. Distributes particles within the offset radius with randomized size and energy values between the emitter's configured minimums and maximums.
Parameters:
- ParticleEmitter emitter: The particle emitter to use for particle creation
- float x: The x-coordinate of the particle origin
- float y: The y-coordinate of the particle origin
- int count: The number of particles to create
- float offsetRadius: The spread radius for particle placement
- float force: The force multiplier for particle velocity
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
public static void CreateParticle(ParticleEmitter emitter, float x, float y, float z, float force, float xI, float yI, float zI, float lifeM, float sizeM)
Creates a single particle at the specified 3D position. The most basic particle creation method that simply emits one particle at the exact coordinates provided.
Parameters:
- ParticleEmitter emitter: The particle emitter to use
- float x: The x-coordinate for the particle
- float y: The y-coordinate for the particle
- float z: The z-coordinate for the particle
public static void CreateParticle(ParticleEmitter emitter, float x, float y, float z, float force, float xI, float yI, float zI, float lifeM, float sizeM)
Creates a single particle using the modern ParticleSystem. This wrapper converts coordinates to a Vector3 and calls the vector-based overload for ParticleSystem compatibility.
Parameters:
- ParticleSystem emitter: The ParticleSystem to emit from
- float x: The x-coordinate for the particle
- float y: The y-coordinate for the particle
- float z: The z-coordinate for the particle
public static void CreateParticle(ParticleEmitter emitter, float x, float y, float z, float force, float xI, float yI, float zI, float lifeM, float sizeM)
Creates a single particle using ParticleSystem at a vector position. Uses EmitParams for modern particle system control with default parameters.
Parameters:
- ParticleSystem emitter: The ParticleSystem to emit from
- Vector3 position: The 3D position for the particle
public static void CreateParticle(ParticleEmitter emitter, float x, float y, float z, float force, float xI, float yI, float zI, float lifeM, float sizeM)
Creates a single particle with position randomization and initial velocity. The particle appears randomly within the specified radius of the position and launches with the given velocity.
Parameters:
- ParticleSystem emitter: The ParticleSystem to emit from
- Vector3 position: The center position for particle placement
- float radius: The randomization radius around the position
- Vector3 velocity: The initial velocity vector for the particle
public static void CreateParticle(ParticleEmitter emitter, float x, float y, float z, float force, float xI, float yI, float zI, float lifeM, float sizeM)
Creates a single colored particle at the specified position. Temporarily overrides the emitter's renderer color to apply the specified color to the emitted particle.
Parameters:
- ParticleEmitter emitter: The particle emitter to use
- float x: The x-coordinate for the particle
- float y: The y-coordinate for the particle
- float z: The z-coordinate for the particle
- Color color: The color to apply to the particle
public static void CreateParticle(ParticleEmitter emitter, float x, float y, float z, float force, float xI, float yI, float zI, float lifeM, float sizeM)
Creates a single particle with force-based random velocity. The particle's initial velocity is randomized within a unit circle and scaled by the force parameter, then combined with the specified initial velocity components.
Parameters:
- ParticleEmitter emitter: The particle emitter to use
- float x: The x-coordinate for the particle
- float y: The y-coordinate for the particle
- float force: The force multiplier for random velocity
- float xI: The initial x-velocity to add
- float yI: The initial y-velocity to add
public static void CreateParticle(ParticleEmitter emitter, float x, float y, float z, float force, float xI, float yI, float zI, float lifeM, float sizeM)
Creates a single colored particle with force-based velocity. Combines color override with velocity randomization for colored particles with dynamic movement.
Parameters:
- ParticleEmitter emitter: The particle emitter to use
- float x: The x-coordinate for the particle
- float y: The y-coordinate for the particle
- float force: The force multiplier for random velocity
- float xI: The initial x-velocity to add
- float yI: The initial y-velocity to add
- Color color: The color to apply to the particle
public static void CreateParticle(ParticleEmitter emitter, float x, float y, float z, float force, float xI, float yI, float zI, float lifeM, float sizeM)
Creates a particle with life and size multipliers at z=1. This wrapper adds default z-position and zero z-velocity, calling the full 3D version for particles with customized lifetime and size.
Parameters:
- ParticleEmitter emitter: The particle emitter to use
- float x: The x-coordinate for the particle
- float y: The y-coordinate for the particle
- float force: The force multiplier for random velocity
- float xI: The initial x-velocity to add
- float yI: The initial y-velocity to add
- float lifeM: Lifetime multiplier for the particle
- float sizeM: Size multiplier for the particle
public static void CreateParticle(ParticleEmitter emitter, float x, float y, float z, float force, float xI, float yI, float zI, float lifeM, float sizeM)
Creates a particle with custom z-position, life, and size multipliers. Adds zero z-velocity as a default, forwarding to the full implementation with complete 3D control.
Parameters:
- ParticleEmitter emitter: The particle emitter to use
- float x: The x-coordinate for the particle
- float y: The y-coordinate for the particle
- float z: The z-coordinate for the particle
- float force: The force multiplier for random velocity
- float xI: The initial x-velocity to add
- float yI: The initial y-velocity to add
- float lifeM: Lifetime multiplier for the particle
- float sizeM: Size multiplier for the particle
public static void CreateParticle(ParticleEmitter emitter, float x, float y, float z, float force, float xI, float yI, float zI, float lifeM, float sizeM)
Creates a fully customized particle with 3D position and velocity. The most comprehensive single particle creation method, supporting custom lifetime and size multipliers along with full 3D velocity control including z-axis movement.
Parameters:
- ParticleEmitter emitter: The particle emitter to use
- float x: The x-coordinate for the particle
- float y: The y-coordinate for the particle
- float z: The z-coordinate for the particle
- float force: The force multiplier for random velocity
- float xI: The initial x-velocity to add
- float yI: The initial y-velocity to add
- float zI: The initial z-velocity to add
- float lifeM: Lifetime multiplier for the particle
- float sizeM: Size multiplier for the particle
public static void CreateParticles(ParticleEmitter emitter, float x, float y, float z, int count, float xOffsetRadius, float yOffsetRadius, float force, float xI, float yI, Color color1, Color color2, float angularVelocityMin, float angularVelocityMax)
Creates white particles using a specified emitter. The generic particle creation method that uses white color for all particles. Provides the base implementation for themed particle methods.
Parameters:
- ParticleEmitter emitter: The particle emitter to use for particle creation
- float x: The x-coordinate of the particle origin
- float y: The y-coordinate of the particle origin
- int count: The number of particles to create
- float offsetRadius: The spread radius for particle placement
- float force: The force multiplier for particle velocity
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
public static void CreateParticles(ParticleEmitter emitter, float x, float y, float z, int count, float xOffsetRadius, float yOffsetRadius, float force, float xI, float yI, Color color1, Color color2, float angularVelocityMin, float angularVelocityMax)
Creates multiple rotating particles with uniform spread. This wrapper uses equal x and y offset radii for circular distribution patterns when creating spinning particles.
Parameters:
- ParticleEmitter emitter: The particle emitter to use
- float x: The x-coordinate of the particle origin
- float y: The y-coordinate of the particle origin
- int count: The number of particles to create
- float offsetRadius: The uniform spread radius for particles
- float force: The force multiplier for particle velocity
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
- Color color: The color to apply to all particles
- float angularVelocityMin: The minimum rotation speed
- float angularVelocityMax: The maximum rotation speed
public static void CreateParticles(ParticleEmitter emitter, float x, float y, float z, int count, float xOffsetRadius, float yOffsetRadius, float force, float xI, float yI, Color color1, Color color2, float angularVelocityMin, float angularVelocityMax)
Creates multiple rotating particles at z=0 with elliptical spread. This wrapper adds default z-position for 2D particle effects with rotation and custom distribution patterns.
Parameters:
- ParticleEmitter emitter: The particle emitter to use
- float x: The x-coordinate of the particle origin
- float y: The y-coordinate of the particle origin
- int count: The number of particles to create
- float xOffsetRadius: The horizontal spread radius
- float yOffsetRadius: The vertical spread radius
- float force: The force multiplier for particle velocity
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
- Color color: The color to apply to all particles
- float angularVelocityMin: The minimum rotation speed
- float angularVelocityMax: The maximum rotation speed
public static void CreateParticles(ParticleEmitter emitter, float x, float y, float z, int count, float xOffsetRadius, float yOffsetRadius, float force, float xI, float yI, Color color1, Color color2, float angularVelocityMin, float angularVelocityMax)
Creates multiple rotating particles with full 3D control. The comprehensive particle creation method supporting elliptical distribution, custom colors, and randomized angular velocity for realistic spinning debris effects. Each particle gets a random rotation speed between min and max.
Parameters:
- ParticleEmitter emitter: The particle emitter to use
- float x: The x-coordinate of the particle origin
- float y: The y-coordinate of the particle origin
- float z: The z-coordinate of the particle origin
- int count: The number of particles to create
- float xOffsetRadius: The horizontal spread radius
- float yOffsetRadius: The vertical spread radius
- float force: The force multiplier for particle velocity
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
- Color color: The color to apply to all particles
- float angularVelocityMin: The minimum rotation speed for particles
- float angularVelocityMax: The maximum rotation speed for particles
public static void CreateParticles(ParticleEmitter emitter, float x, float y, float z, int count, float xOffsetRadius, float yOffsetRadius, float force, float xI, float yI, Color color1, Color color2, float angularVelocityMin, float angularVelocityMax)
Creates multiple particles with color interpolation between two colors. Each particle gets a random color between color1 and color2, creating gradient effects. Supports full 3D positioning, elliptical distribution, and randomized angular velocity for realistic multi-colored particle effects.
Parameters:
- ParticleEmitter emitter: The particle emitter to use
- float x: The x-coordinate of the particle origin
- float y: The y-coordinate of the particle origin
- float z: The z-coordinate of the particle origin
- int count: The number of particles to create
- float xOffsetRadius: The horizontal spread radius
- float yOffsetRadius: The vertical spread radius
- float force: The force multiplier for particle velocity
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
- Color color1: The first color for interpolation
- Color color2: The second color for interpolation
- float angularVelocityMin: The minimum rotation speed for particles
- float angularVelocityMax: The maximum rotation speed for particles
public static void CreateSandParticles(ParticleEmitter emitter, float x, float y, int count, float offsetRadius, float force, float xI, float yI)
Creates sand-colored particles using a specified emitter. Randomly selects sand colors from the theme for desert or beach-appropriate particle effects with natural sand color variations.
Parameters:
- ParticleEmitter emitter: The particle emitter to use for particle creation
- float x: The x-coordinate of the particle origin
- float y: The y-coordinate of the particle origin
- int count: The number of particles to create
- float offsetRadius: The spread radius for particle placement
- float force: The force multiplier for particle velocity
- float xI: The initial x-velocity added to all particles
- float yI: The initial y-velocity added to all particles
public static Transform GetBloodOverlay()
Returns a random blood overlay sprite for terrain decoration. Selects randomly from the bloodBlockOverlayPrefabs array and instantiates it. Used to add blood decals to blocks and surfaces.
Returns:
Transform
: The transform of the instantiated blood overlay sprite
public static UnityEngine.Object InstantiateEffect(UnityEngine.Object prefab, Vector3 pos, Quaternion rot)
Instantiates an effect object at the origin with default rotation. Supports object pooling for IPoolableEffect types.
Parameters:
- object prefab: The effect prefab to instantiate. Can be any Unity Object type.
Returns:
object
: The instantiated effect object, either from the pool or newly created.
public static UnityEngine.Object InstantiateEffect(UnityEngine.Object prefab, Vector3 pos, Quaternion rot)
Instantiates an effect object at the specified position and rotation. Supports object pooling for IPoolableEffect types to improve performance.
Parameters:
- object prefab: The effect prefab to instantiate. Can be any Unity Object type.
- Vector3 pos: The position where the effect should be instantiated.
- Quaternion rot: The rotation of the instantiated effect.
Returns:
object
: The instantiated effect object, either from the pool or newly created.
private void OnDestroy()
Unity lifecycle method called when the EffectsController is destroyed. Clears the static instance reference.
Fields
protected static LayerMask groundLayer
Static layer mask used for ground collision detection in various effect placement calculations.
protected static Vector3 tempOffset
Protected static temporary Vector3 storage used internally by shrapnel creation methods to calculate random or circular offset positions without allocating new Vector3 objects each time.