Elin Modding Docs Doc
Loading...
Searching...
No Matches
LiquidProfile.cs
1using System;
2using System.Runtime.CompilerServices;
3using UnityEngine;
4
5// Token: 0x0200016D RID: 365
7{
8 // Token: 0x06000AB4 RID: 2740 RVA: 0x00042365 File Offset: 0x00040565
9 public static LiquidProfile Get(string id)
10 {
11 return Resources.Load<LiquidProfile>("Scene/Profile/Liquid/" + id);
12 }
13
14 // Token: 0x06000AB5 RID: 2741 RVA: 0x00042378 File Offset: 0x00040578
15 public static void Apply(string id)
16 {
17 LiquidProfile.Get(id).Apply(null);
18 }
19
20 // Token: 0x06000AB6 RID: 2742 RVA: 0x0004239C File Offset: 0x0004059C
21 public void Apply(Color? previewColor = null)
22 {
23 LiquidProfile.<>c__DisplayClass6_0 CS$<>8__locals1;
24 CS$<>8__locals1.<>4__this = this;
25 CS$<>8__locals1.previewColor = previewColor;
26 BaseTileMap tileMap = EClass.scene.screenElin.tileMap;
27 this.<Apply>g__Set|6_0(tileMap.passLiquid.mat, ref CS$<>8__locals1);
28 this.<Apply>g__Set|6_0(tileMap.passFloorWater.mat, ref CS$<>8__locals1);
29 this.<Apply>g__Set|6_0(tileMap.passAutoTileWater.mat, ref CS$<>8__locals1);
30 }
31
32 // Token: 0x06000AB7 RID: 2743 RVA: 0x00042402 File Offset: 0x00040602
33 public void ApplyColor()
34 {
35 this.modColor = EClass._map.config.colorLiquid.Get();
36 }
37
38 // Token: 0x06000AB9 RID: 2745 RVA: 0x00042428 File Offset: 0x00040628
39 [CompilerGenerated]
40 private void <Apply>g__Set|6_0(Material mat, ref LiquidProfile.<>c__DisplayClass6_0 A_2)
41 {
42 mat.SetFloat("_Transparency", this.transparency);
43 string name = "_ModColor";
44 Color? previewColor = A_2.previewColor;
45 Color value;
46 if (previewColor == null)
47 {
48 SerializableColor colorLiquid = EClass._map.config.colorLiquid;
49 value = ((colorLiquid != null) ? colorLiquid.Get() : this.modColor);
50 }
51 else
52 {
53 value = previewColor.GetValueOrDefault();
54 }
55 mat.SetColor(name, value);
56 mat.SetVector("_SurfaceAnime", this.surfaceAnime);
57 mat.SetTexture("_SurfaceTex", this.surface);
58 }
59
60 // Token: 0x040009C2 RID: 2498
61 public Color modColor;
62
63 // Token: 0x040009C3 RID: 2499
64 public float transparency;
65
66 // Token: 0x040009C4 RID: 2500
67 public Texture2D surface;
68
69 // Token: 0x040009C5 RID: 2501
70 public Vector4 surfaceAnime;
71}