Elin Decompiled Documentation EA 23.343.5 Nightly
Loading...
Searching...
No Matches
CustomGunEffectData.cs
Go to the documentation of this file.
1using Newtonsoft.Json;
2using UnityEngine;
3
4public class CustomGunEffectData : GameSetting.EffectData
5{
6 public static readonly JsonSerializerSettings JsonSettings = new JsonSerializerSettings
7 {
8 NullValueHandling = NullValueHandling.Ignore,
9 ContractResolver = new GameIOContext.WritablePropertiesOnlyResolver()
10 };
11
13 {
14 num = 1;
15 delay = 0.1f;
16 eject = true;
17 firePos = new Vector2(0.23f, 0.04f);
18 idSprite = "ranged_gun";
19 idSoundEject = "bullet_drop";
20 }
21
22 public void ResolveSprite()
23 {
24 if (!idSprite.IsEmpty())
25 {
26 string spritePath = idSprite;
27 string name = idSprite;
28 sprite = ModUtil.LoadSprite(spritePath, null, name) ?? Resources.Load<Sprite>("Media/Effect/General/" + idSprite) ?? Resources.Load<Sprite>(idSprite) ?? Resources.Load<Sprite>("Media/Effect/General/ranged_gun");
29 }
30 }
31}
static readonly JsonSerializerSettings JsonSettings