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

Public Member Functions

override void OnPlay ()
 
- Public Member Functions inherited from Effect
void Play (float delay, Point from, float fixY=0f, Point to=null, Sprite sprite=null)
 
Effect Play (Point from, float fixY=0f, Point to=null, Sprite sprite=null)
 
Effect _Play (Point from, Vector3 fromV, float fixY=0f, Point to=null, Sprite sprite=null)
 
Effect Play (Vector3 v)
 
Effect Flip (bool x=false, bool y=false)
 
Effect SetStartDelay (float a)
 
virtual void OnPlay ()
 
virtual void OnUpdate ()
 
void Kill ()
 
virtual void OnKill ()
 
void OnDisable ()
 
void OnDestroy ()
 
Effect Emit (int num)
 
Effect SetParticleColor (Color c)
 
Effect SetParticleColor (Color color, bool changeMaterial=false, string idCol="_Color")
 
Effect SetScale (float a)
 

Static Public Member Functions

static void Create (Point center, int radius, int count, Action< int, Point > onComplete)
 
- Static Public Member Functions inherited from Effect
static Effect Get (Effect original)
 
static Effect Get (string id)
 
static T Get< T > (string id)
 
- Static Public Member Functions inherited from EMono
static int rnd (int a)
 

Public Attributes

Animator aniExplosion
 
Vector3 startPos
 
float time
 
- Public Attributes inherited from Effect
Type type
 
float duration = 1f
 
float speed
 
float startDelay
 
bool lookAtTarget
 
bool rotate
 
bool pool
 
SpriteRenderer sr
 
ParticleSystem[] systems
 
Vector3[] dirs
 
Ease ease
 
Vector3 posFix
 
Vector3 randomRange
 
Tween moveTween
 
Sprite[] sprites
 
bool randomFlip
 
bool randomSpeed
 
bool test
 
bool setColor = true
 
Action onComplete
 
int spriteIndex
 
float timer
 
Vector3 fromV
 
Vector3 destV
 
bool pooled
 
Transform poolParent
 
List< MaterialmaterialsToDestroy
 
Point destPos
 
Tween killTimer
 

Additional Inherited Members

- Public Types inherited from Effect
enum  Type { Default , Firework }
 
- Static Public Attributes inherited from EMono
static Core core
 
- Protected Member Functions inherited from Effect
void Activate ()
 
- Protected Attributes inherited from Effect
bool killed
 
- Properties inherited from Effect
static EffectManager manager [get]
 
- 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 6 of file EffectMeteor.cs.

Member Function Documentation

◆ Create()

static void EffectMeteor.Create ( Point  center,
int  radius,
int  count,
Action< int, Point onComplete 
)
inlinestatic

Definition at line 33 of file EffectMeteor.cs.

34 {
35 List<Point> list = new List<Point>();
36 for (int i = 0; i < count; i++)
37 {
38 Point p = center.Copy();
39 Effect effect = Effect.Get("meteor");
40 effect.startDelay = Rand.Range(0f, 0.5f);
41 if (radius > 0)
42 {
43 int num = 0;
44 if (num < 1000)
45 {
46 Point randomSurface = EMono._map.GetRandomSurface(center.x, center.z, radius);
47 foreach (Point item in list)
48 {
49 randomSurface.Equals(item);
50 }
51 p.Set(randomSurface);
52 list.Add(randomSurface);
53 }
54 }
55 int _i = i;
56 effect.onComplete = delegate
57 {
58 onComplete(_i, p);
59 };
60 effect.Play(p);
61 }
62 }
Definition: EMono.cs:4
static Map _map
Definition: EMono.cs:17
Definition: Effect.cs:7
static Effect Get(Effect original)
Definition: Effect.cs:85
void Play(float delay, Point from, float fixY=0f, Point to=null, Sprite sprite=null)
Definition: Effect.cs:100
Action onComplete
Definition: Effect.cs:52
Point GetRandomSurface(int x, int z, int radius, bool walkable=true, bool allowWater=false)
Definition: MapBounds.cs:182
Definition: Point.cs:9
Point Copy()
Definition: Point.cs:467
Point Set(int _x, int _z)
Definition: Point.cs:479
int x
Definition: Point.cs:36
int z
Definition: Point.cs:39
bool Equals(int _x, int _z)
Definition: Point.cs:924
Definition: Rand.cs:4
static int Range(int min, int max)
Definition: Rand.cs:42

References EMono._map, Point.Copy(), Point.Equals(), Effect.Get(), MapBounds.GetRandomSurface(), item, Effect.onComplete, Effect.Play(), Rand.Range(), Point.Set(), Point.x, and Point.z.

Referenced by ActEffect.ProcAt().

◆ OnPlay()

override void EffectMeteor.OnPlay ( )
inlinevirtual

Reimplemented from Effect.

Definition at line 14 of file EffectMeteor.cs.

15 {
16 sr.enabled = true;
17 aniExplosion.SetActive(enable: false);
18 destV = fromV;
19 fromV += startPos + startPos.Random() * 0.2f;
20 base.transform.position = fromV;
21 moveTween = base.transform.DOMove(destV, time).SetEase(Ease.Linear).SetDelay(startDelay)
22 .OnComplete(delegate
23 {
24 sr.enabled = false;
25 aniExplosion.SetActive(enable: true);
26 destPos.Animate(AnimeID.Dig, animeBlock: true);
27 onComplete?.Invoke();
28 EMono.Sound.Play("explode", destV);
29 Shaker.ShakeCam("meteor");
30 });
31 }
AnimeID
Definition: AnimeID.cs:2
static SoundManager Sound
Definition: EMono.cs:39
Vector3 startPos
Definition: EffectMeteor.cs:10
Animator aniExplosion
Definition: EffectMeteor.cs:8
Point destPos
Definition: Effect.cs:76
float startDelay
Definition: Effect.cs:20
Vector3 fromV
Definition: Effect.cs:61
Tween moveTween
Definition: Effect.cs:40
Vector3 destV
Definition: Effect.cs:64
void Animate(AnimeID id, bool animeBlock=false)
Definition: Point.cs:1266
Definition: Shaker.cs:5
static void ShakeCam(string id="default", float magnitude=1f)
Definition: Shaker.cs:25

References aniExplosion, Point.Animate(), Effect.destPos, Effect.destV, Effect.fromV, Effect.moveTween, Effect.onComplete, Shaker.ShakeCam(), EMono.Sound, Effect.startDelay, startPos, and time.

Member Data Documentation

◆ aniExplosion

Animator EffectMeteor.aniExplosion

Definition at line 8 of file EffectMeteor.cs.

Referenced by OnPlay().

◆ startPos

Vector3 EffectMeteor.startPos

Definition at line 10 of file EffectMeteor.cs.

Referenced by OnPlay().

◆ time

float EffectMeteor.time

Definition at line 12 of file EffectMeteor.cs.

Referenced by OnPlay().


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