Table of Contents

Class SpecialEffectManager

Namespace
VoxelPlayground.VFX
Assembly
GamePlay.dll
public class SpecialEffectManager : Singleton<SpecialEffectManager>
Inheritance
object
SpecialEffectManager
Inherited Members
Extension Methods

Fields

acidTexture

public Texture2D acidTexture

Field Value

Texture2D

blastMarkTexture

public Texture2D blastMarkTexture

Field Value

Texture2D

bloodTextures

public Texture2D[] bloodTextures

Field Value

Texture2D[]

FxNameToTrsSettings

[ShowInInspector]
public static Dictionary<string, SpecialEffectManager.FxTrsSetting> FxNameToTrsSettings

Field Value

Dictionary<string, SpecialEffectManager.FxTrsSetting>

gunShotFlashLight

public Light gunShotFlashLight

Field Value

Light

gunShotFlashLightTime

public float gunShotFlashLightTime

Field Value

float

highlightMaterial

public Material highlightMaterial

Field Value

Material

PreviewMaterial

public Material PreviewMaterial

Field Value

Material

ProjectileFxName

public static Dictionary<ProjectileType, string> ProjectileFxName

Field Value

Dictionary<ProjectileType, string>

Properties

AcidTextureData

public NativeArray<Color32> AcidTextureData { get; }

Property Value

NativeArray<Color32>

AcidTextureHeight

public int AcidTextureHeight { get; }

Property Value

int

BlaskMarkTextureHeight

public int BlaskMarkTextureHeight { get; }

Property Value

int

BlastMarkTextureData

public NativeArray<Color32> BlastMarkTextureData { get; }

Property Value

NativeArray<Color32>

BloodTextureData

public NativeArray<Color32> BloodTextureData { get; }

Property Value

NativeArray<Color32>

BloodTextureHeight

public int BloodTextureHeight { get; }

Property Value

int

highlightColor

public Color highlightColor { get; set; }

Property Value

Color

Methods

DestroyWorkaround(GameObject)

public void DestroyWorkaround(GameObject particleGameobject)

Parameters

particleGameobject GameObject

FlashAt(Vector3)

public void FlashAt(Vector3 pos)

Parameters

pos Vector3

GetBulletHoleColor(float, float, float, out float3)

[BurstCompile]
public static void GetBulletHoleColor(float i, float j, float k, out float3 outColor)

Parameters

i float
j float
k float
outColor float3

GetBulletHoleColor(float3, out float3)

[BurstCompile]
public static void GetBulletHoleColor(float3 p, out float3 outColor)

Parameters

p float3
outColor float3

GetPool(string)

public Pool GetPool(string name)

Parameters

name string

Returns

Pool

Play(string, Vector3, float, bool)

Play an Fx by name. This method will use fx pool and setup default scale and duration.

public GameObject Play(string name, Vector3 position, float duration = -1, bool activeOnPlay = true)

Parameters

name string

Fx prefab name

position Vector3

Fx play position

duration float

Fx play duration, if fx name is in SpecialEffectManager.FxNameToTrsSettings record, this param will be ignored

activeOnPlay bool

Returns

GameObject

PlayByMaterialId(uint, Vector3, VisualEffectType)

public GameObject PlayByMaterialId(uint Id, Vector3 position, VisualEffectType type = VisualEffectType.Destruct)

Parameters

Id uint
position Vector3
type VisualEffectType

Returns

GameObject

ProjectSplatter(Vector3, Vector3, float, int, NativeArray<Color32>, int, SplatType)

public void ProjectSplatter(Vector3 hitPt, Vector3 hitDirection, float radius, int textureHeight, NativeArray<Color32> projectTexture, int layerMask, SplatType splatType = SplatType.Blood)

Parameters

hitPt Vector3
hitDirection Vector3
radius float
textureHeight int
projectTexture NativeArray<Color32>
layerMask int
splatType SplatType

Recycle(GameObject)

public void Recycle(GameObject gameObject)

Parameters

gameObject GameObject

SetPoolSize(string, int)

public void SetPoolSize(string name, int size)

Parameters

name string
size int

SetPreviewColor(Color)

public void SetPreviewColor(Color color)

Parameters

color Color