-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathPlasmaEffects.cs
87 lines (78 loc) · 3.26 KB
/
PlasmaEffects.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
using System.Linq;
using Il2CppAssets.Scripts.Models.Towers;
using Il2CppAssets.Scripts.Unity.Display;
using BTD_Mod_Helper.Api.Display;
using BTD_Mod_Helper.Extensions;
using UnityEngine;
using Il2CppAssets.Scripts.Unity;
using Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.Behaviors;
using System.Collections.Generic;
namespace PlasmaEffects
{
public class LightningDisplay : ModDisplay
{
public override string BaseDisplay => Game.instance.model.GetTowerFromId(TowerType.SuperMonkey + "-050").GetDescendant<CreateEffectOnAbilityModel>().effectModel.assetId.GUID;
public Dictionary<string, Color> psColor = new()
{
{ "Glow", new Color(0.7f, 0.1f, 1f, 0.409f) },
{ "Lightning", new Color(0.7f, 0.1f, 1f) },
{ "Pulse", new Color(0.5f, 0.1f, 1f, 0.518f) },
{ "PulseBig", new Color(0.5f, 0.1f, 1f, 0.518f) }
};
public override void ModifyDisplayNode(UnityDisplayNode node)
{
#if DEBUG
node.PrintInfo();
#endif
foreach (ParticleSystem ps in node.GetComponentsInChildren<ParticleSystem>())
{
ps.startSize *= 0.1f;
if (psColor.ContainsKey(ps.gameObject.name)) ps.startColor = psColor[ps.gameObject.name];
}
}
}
public class WpnPlasmaDisplay : ModDisplay
{
public override string BaseDisplay => Game.instance.model.GetTowerFromId(TowerType.SuperMonkey + "-040").GetDescendant<CreateEffectOnAbilityModel>().effectModel.assetId.GUID;
public Dictionary<string, Color> psColor = new()
{
//{ "Glow", new Color(0.7f, 0.1f, 1f, 0.409f) },
//{ "Lightning", new Color(0.7f, 0.1f, 1f) },
//{ "Pulse", new Color(0.5f, 0.1f, 1f, 0.518f) },
//{ "PulseBig", new Color(0.5f, 0.1f, 1f, 0.518f) }
};
public override void ModifyDisplayNode(UnityDisplayNode node)
{
#if DEBUG
node.PrintInfo();
#endif
foreach (ParticleSystem ps in node.GetComponentsInChildren<ParticleSystem>())
{
ps.startSize *= 0.75f;
if (psColor.ContainsKey(ps.gameObject.name)) ps.startColor = psColor[ps.gameObject.name];
}
}
}
public class WpnNovaDisplay : ModDisplay
{
public override string BaseDisplay => Game.instance.model.GetTowerFromId(TowerType.SuperMonkey + "-050").GetDescendant<CreateEffectOnAbilityModel>().effectModel.assetId.GUID;
public Dictionary<string, Color> psColor = new()
{
//{ "Glow", new Color(0.7f, 0.1f, 1f, 0.409f) },
//{ "Lightning", new Color(0.7f, 0.1f, 1f) },
//{ "Pulse", new Color(0.5f, 0.1f, 1f, 0.518f) },
//{ "PulseBig", new Color(0.5f, 0.1f, 1f, 0.518f) }
};
public override void ModifyDisplayNode(UnityDisplayNode node)
{
#if DEBUG
node.PrintInfo();
#endif
foreach (ParticleSystem ps in node.GetComponentsInChildren<ParticleSystem>())
{
ps.startSize *= 0.75f;
if (psColor.ContainsKey(ps.gameObject.name)) ps.startColor = psColor[ps.gameObject.name];
}
}
}
}