Elin Modding Docs Doc
Loading...
Searching...
No Matches
EffectText.cs
1using System;
2using UnityEngine;
3using UnityEngine.UI;
4
5// Token: 0x02000121 RID: 289
6public class EffectText : Effect
7{
8 // Token: 0x060007D2 RID: 2002 RVA: 0x00032950 File Offset: 0x00030B50
9 public EffectText Play(Vector3 _pos, string text, float _duration = 0f)
10 {
11 base.transform.SetParent(EffectText.transRoot, false);
12 this.pos = _pos + this.posFix + this.randomRange.Random();
13 if (this.addBrackets)
14 {
15 text = "* " + text + " *";
16 }
17 this.textMain.text = text;
18 this.LateUpdate();
19 return this;
20 }
21
22 // Token: 0x060007D3 RID: 2003 RVA: 0x000329BD File Offset: 0x00030BBD
23 public EffectText SetColor(Color c)
24 {
25 this.textMain.color = c;
26 return this;
27 }
28
29 // Token: 0x060007D4 RID: 2004 RVA: 0x000329CC File Offset: 0x00030BCC
30 public EffectText SetSize(float a)
31 {
32 this.textMain.fontSize = (int)(a * (float)this.textMain.fontSize);
33 return this;
34 }
35
36 // Token: 0x060007D5 RID: 2005 RVA: 0x000329E9 File Offset: 0x00030BE9
37 public void LateUpdate()
38 {
39 this.rect.localPosition = Util.WorldToUIPos(this.pos, this.rect.parent as RectTransform);
40 }
41
42 // Token: 0x040007E0 RID: 2016
43 public static RectTransform transRoot;
44
45 // Token: 0x040007E1 RID: 2017
46 public Text textMain;
47
48 // Token: 0x040007E2 RID: 2018
49 public RectTransform rect;
50
51 // Token: 0x040007E3 RID: 2019
52 public RectTransform body;
53
54 // Token: 0x040007E4 RID: 2020
55 public bool addBrackets;
56
57 // Token: 0x040007E5 RID: 2021
58 [NonSerialized]
59 public Vector3 pos;
60}