Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
ScreenEffect Class Reference
Inheritance diagram for ScreenEffect:
EMono

Static Public Member Functions

static void Play (string id)
 
- Static Public Member Functions inherited from EMono
static int rnd (int a)
 

Public Attributes

bool worldParticle
 
float killDuration
 
float stopParticleTime
 

Private Member Functions

void Awake ()
 
void Update ()
 

Private Attributes

GameObject goParent
 
float time
 
bool particleStopped
 

Additional Inherited Members

- Static Public Attributes inherited from EMono
static Core core
 
- Properties inherited from EMono
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static FactionBranch Branch [get]
 
static FactionBranch BranchOrHomeBranch [get]
 
static Faction Home [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SoundManager Sound [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static CoreDebug debug [get]
 

Detailed Description

Definition at line 3 of file ScreenEffect.cs.

Member Function Documentation

◆ Awake()

void ScreenEffect.Awake ( )
inlineprivate

Definition at line 22 of file ScreenEffect.cs.

23 {
24 if ((bool)base.transform.parent)
25 {
26 goParent = base.transform.parent.gameObject;
27 }
28 base.transform.SetParent(Camera.main.transform, worldPositionStays: false);
29 if (worldParticle)
30 {
31 ParticleSystem[] componentsInChildren = GetComponentsInChildren<ParticleSystem>();
32 for (int i = 0; i < componentsInChildren.Length; i++)
33 {
34 ParticleSystem.MainModule main = componentsInChildren[i].main;
35 main.simulationSpace = ParticleSystemSimulationSpace.World;
36 }
37 }
38 }
GameObject goParent
Definition: ScreenEffect.cs:11
bool worldParticle
Definition: ScreenEffect.cs:5

References goParent, and worldParticle.

◆ Play()

static void ScreenEffect.Play ( string  id)
inlinestatic

Definition at line 17 of file ScreenEffect.cs.

18 {
19 Util.Instantiate<ScreenEffect>("Media/Effect/ScreenEffect/" + id, Camera.main.transform);
20 }
Definition: Util.cs:10
static Transform Instantiate(string path, Component parent=null)
Definition: Util.cs:67

References Util.

Referenced by Quest.Complete().

◆ Update()

void ScreenEffect.Update ( )
inlineprivate

Definition at line 40 of file ScreenEffect.cs.

41 {
42 if ((bool)goParent)
43 {
44 return;
45 }
46 time += Time.unscaledDeltaTime;
48 {
49 ParticleSystem[] componentsInChildren = GetComponentsInChildren<ParticleSystem>();
50 foreach (ParticleSystem particleSystem in componentsInChildren)
51 {
52 if (particleSystem.transform.tag.Contains("ParticleEmitter"))
53 {
54 ParticleSystem.MainModule main = particleSystem.main;
55 main.loop = false;
56 ParticleSystem.EmissionModule emission = particleSystem.emission;
57 emission.enabled = false;
58 }
59 }
60 SoundEmitter[] componentsInChildren2 = GetComponentsInChildren<SoundEmitter>();
61 foreach (SoundEmitter soundEmitter in componentsInChildren2)
62 {
63 if ((bool)soundEmitter.source)
64 {
65 soundEmitter.source.Stop(2f);
66 soundEmitter.source = null;
67 }
68 }
69 particleStopped = true;
70 }
71 if (time > killDuration)
72 {
73 Object.Destroy(base.gameObject);
74 }
75 }
float killDuration
Definition: ScreenEffect.cs:7
float stopParticleTime
Definition: ScreenEffect.cs:9
bool particleStopped
Definition: ScreenEffect.cs:15

References goParent, killDuration, particleStopped, stopParticleTime, and time.

Member Data Documentation

◆ goParent

GameObject ScreenEffect.goParent
private

Definition at line 11 of file ScreenEffect.cs.

Referenced by Awake(), and Update().

◆ killDuration

float ScreenEffect.killDuration

Definition at line 7 of file ScreenEffect.cs.

Referenced by Update().

◆ particleStopped

bool ScreenEffect.particleStopped
private

Definition at line 15 of file ScreenEffect.cs.

Referenced by Update().

◆ stopParticleTime

float ScreenEffect.stopParticleTime

Definition at line 9 of file ScreenEffect.cs.

Referenced by Update().

◆ time

float ScreenEffect.time
private

Definition at line 13 of file ScreenEffect.cs.

Referenced by Update().

◆ worldParticle

bool ScreenEffect.worldParticle

Definition at line 5 of file ScreenEffect.cs.

Referenced by Awake().


The documentation for this class was generated from the following file: