net.dreditor.triggers 0.1.6 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.attestation.p7m +0 -0
- package/Actuator.cs +46 -46
- package/Actuator.cs.meta +11 -11
- package/ActuatorBehaviourBase.cs +61 -61
- package/ActuatorBehaviourBase.cs.meta +11 -11
- package/DREditor.Triggers.asmdef +17 -17
- package/DREditor.Triggers.asmdef.meta +7 -7
- package/DialogueSubsequent.cs +112 -112
- package/DialogueSubsequent.cs.meta +11 -11
- package/EventTrigger.cs +48 -48
- package/EventTrigger.cs.meta +11 -11
- package/FlagActuatorData.cs +59 -59
- package/FlagActuatorData.cs.meta +11 -11
- package/GenericActuator.cs +47 -47
- package/GenericActuator.cs.meta +11 -11
- package/GenericSubsequent.cs +23 -23
- package/GenericSubsequent.cs.meta +11 -11
- package/GenericTriggerBase.cs +52 -52
- package/GenericTriggerBase.cs.meta +11 -11
- package/HitboxActuator.cs +81 -81
- package/HitboxActuator.cs.meta +11 -11
- package/HitboxActuatorData.cs +45 -45
- package/HitboxActuatorData.cs.meta +11 -11
- package/IActuatorBehaviour.cs +20 -20
- package/IActuatorBehaviour.cs.meta +11 -11
- package/IActuatorConvert.cs +22 -22
- package/IActuatorConvert.cs.meta +11 -11
- package/IEventTriggerSaver.cs +21 -21
- package/IEventTriggerSaver.cs.meta +11 -11
- package/ISubsequentBehaviour.cs +14 -14
- package/ISubsequentBehaviour.cs.meta +11 -11
- package/ISubsequentConvert.cs +24 -24
- package/ISubsequentConvert.cs.meta +11 -11
- package/LDialogueSubsequent.cs +87 -87
- package/LDialogueSubsequent.cs.meta +11 -11
- package/LocalDialogueSubsequentData.cs +54 -54
- package/LocalDialogueSubsequentData.cs.meta +11 -11
- package/MovePlayerSubsequent.cs +141 -141
- package/MovePlayerSubsequent.cs.meta +11 -11
- package/OLFlagActuator.cs +66 -66
- package/OLFlagActuator.cs.meta +11 -11
- package/OnLoadActuator.cs +65 -65
- package/OnLoadActuator.cs.meta +11 -11
- package/PositionEventSubsequentData.cs +84 -84
- package/PositionEventSubsequentData.cs.meta +11 -11
- package/{Samples → Samples~}/Transition_Finished_Subscriber.prefab +137 -137
- package/{Samples → Samples~}/Transition_Finished_Subscriber.prefab.meta +7 -7
- package/ScriptableObjectsSubsequentData.cs +57 -57
- package/ScriptableObjectsSubsequentData.cs.meta +11 -11
- package/SimpleActuatorData.cs +28 -28
- package/SimpleActuatorData.cs.meta +11 -11
- package/Subsequent.cs +43 -43
- package/Subsequent.cs.meta +11 -11
- package/TransitionFinishedSubscriber.cs +39 -39
- package/TransitionFinishedSubscriber.cs.meta +11 -11
- package/package.json +41 -36
- package/package.json.meta +7 -7
- package/Samples.meta +0 -8
package/EventTrigger.cs.meta
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 23715b6ee4ec80b4680c227f737d2a80
|
|
3
|
-
MonoImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
serializedVersion: 2
|
|
6
|
-
defaultReferences: []
|
|
7
|
-
executionOrder: 0
|
|
8
|
-
icon: {instanceID: 0}
|
|
9
|
-
userData:
|
|
10
|
-
assetBundleName:
|
|
11
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 23715b6ee4ec80b4680c227f737d2a80
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
package/FlagActuatorData.cs
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using System;
|
|
3
|
-
using System.Collections.Generic;
|
|
4
|
-
using UnityEngine;
|
|
5
|
-
|
|
6
|
-
namespace DREditor.Triggers
|
|
7
|
-
{
|
|
8
|
-
/// <summary>
|
|
9
|
-
///
|
|
10
|
-
/// </summary>
|
|
11
|
-
[Serializable]
|
|
12
|
-
public class FlagActuatorData : GenericActuator, IActuatorConvert
|
|
13
|
-
{
|
|
14
|
-
/// <summary>
|
|
15
|
-
///
|
|
16
|
-
/// </summary>
|
|
17
|
-
[Tooltip("")]
|
|
18
|
-
public bool callIfFlagsAre = true;
|
|
19
|
-
|
|
20
|
-
/// <summary>
|
|
21
|
-
///
|
|
22
|
-
/// </summary>
|
|
23
|
-
[Tooltip("")]
|
|
24
|
-
public List<string> flags = new();
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
/// <summary>
|
|
28
|
-
///
|
|
29
|
-
/// </summary>
|
|
30
|
-
/// <param name="flags"></param>
|
|
31
|
-
public virtual void SetStringList(List<string> flags) => this.flags = flags;
|
|
32
|
-
|
|
33
|
-
/// <summary>
|
|
34
|
-
///
|
|
35
|
-
/// </summary>
|
|
36
|
-
/// <param name="callIfFlagsAre"></param>
|
|
37
|
-
public virtual void SetBoolValue(bool callIfFlagsAre) => this.callIfFlagsAre = callIfFlagsAre;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
/// <inheritdoc/>
|
|
41
|
-
public virtual bool CanConvert(GenericActuator oldActuator) => ((Actuator)oldActuator).strings.Count > 0;
|
|
42
|
-
|
|
43
|
-
/// <inheritdoc/>
|
|
44
|
-
public virtual void Convert(ref GenericActuator genericActuator, GenericActuator oldActuator)
|
|
45
|
-
{
|
|
46
|
-
var newData = new FlagActuatorData(oldActuator.Type, oldActuator.Triggered, oldActuator.position)
|
|
47
|
-
{
|
|
48
|
-
flags = ((Actuator)oldActuator).strings,
|
|
49
|
-
callIfFlagsAre = ((Actuator)oldActuator).boolValue
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
genericActuator = newData;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
public FlagActuatorData() { }
|
|
57
|
-
|
|
58
|
-
public FlagActuatorData(string Type, bool Triggered, Vector3 position) : base(Type, Triggered, position) { }
|
|
59
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using System;
|
|
3
|
+
using System.Collections.Generic;
|
|
4
|
+
using UnityEngine;
|
|
5
|
+
|
|
6
|
+
namespace DREditor.Triggers
|
|
7
|
+
{
|
|
8
|
+
/// <summary>
|
|
9
|
+
///
|
|
10
|
+
/// </summary>
|
|
11
|
+
[Serializable]
|
|
12
|
+
public class FlagActuatorData : GenericActuator, IActuatorConvert
|
|
13
|
+
{
|
|
14
|
+
/// <summary>
|
|
15
|
+
///
|
|
16
|
+
/// </summary>
|
|
17
|
+
[Tooltip("")]
|
|
18
|
+
public bool callIfFlagsAre = true;
|
|
19
|
+
|
|
20
|
+
/// <summary>
|
|
21
|
+
///
|
|
22
|
+
/// </summary>
|
|
23
|
+
[Tooltip("")]
|
|
24
|
+
public List<string> flags = new();
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
/// <summary>
|
|
28
|
+
///
|
|
29
|
+
/// </summary>
|
|
30
|
+
/// <param name="flags"></param>
|
|
31
|
+
public virtual void SetStringList(List<string> flags) => this.flags = flags;
|
|
32
|
+
|
|
33
|
+
/// <summary>
|
|
34
|
+
///
|
|
35
|
+
/// </summary>
|
|
36
|
+
/// <param name="callIfFlagsAre"></param>
|
|
37
|
+
public virtual void SetBoolValue(bool callIfFlagsAre) => this.callIfFlagsAre = callIfFlagsAre;
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
/// <inheritdoc/>
|
|
41
|
+
public virtual bool CanConvert(GenericActuator oldActuator) => ((Actuator)oldActuator).strings.Count > 0;
|
|
42
|
+
|
|
43
|
+
/// <inheritdoc/>
|
|
44
|
+
public virtual void Convert(ref GenericActuator genericActuator, GenericActuator oldActuator)
|
|
45
|
+
{
|
|
46
|
+
var newData = new FlagActuatorData(oldActuator.Type, oldActuator.Triggered, oldActuator.position)
|
|
47
|
+
{
|
|
48
|
+
flags = ((Actuator)oldActuator).strings,
|
|
49
|
+
callIfFlagsAre = ((Actuator)oldActuator).boolValue
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
genericActuator = newData;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
public FlagActuatorData() { }
|
|
57
|
+
|
|
58
|
+
public FlagActuatorData(string Type, bool Triggered, Vector3 position) : base(Type, Triggered, position) { }
|
|
59
|
+
}
|
|
60
60
|
}
|
package/FlagActuatorData.cs.meta
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 6b067ae32c58fae4393061997f1b5fe1
|
|
3
|
-
MonoImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
serializedVersion: 2
|
|
6
|
-
defaultReferences: []
|
|
7
|
-
executionOrder: 0
|
|
8
|
-
icon: {instanceID: 0}
|
|
9
|
-
userData:
|
|
10
|
-
assetBundleName:
|
|
11
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 6b067ae32c58fae4393061997f1b5fe1
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
package/GenericActuator.cs
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using System;
|
|
3
|
-
using UnityEngine;
|
|
4
|
-
|
|
5
|
-
namespace DREditor.Triggers
|
|
6
|
-
{
|
|
7
|
-
/// <summary>
|
|
8
|
-
///
|
|
9
|
-
/// </summary>
|
|
10
|
-
[Serializable]
|
|
11
|
-
public abstract class GenericActuator : GenericTriggerBase
|
|
12
|
-
{
|
|
13
|
-
/// <summary>
|
|
14
|
-
///
|
|
15
|
-
/// </summary>
|
|
16
|
-
[Tooltip("")]
|
|
17
|
-
public bool Triggered = false;
|
|
18
|
-
|
|
19
|
-
/// <summary>
|
|
20
|
-
///
|
|
21
|
-
/// </summary>
|
|
22
|
-
[Tooltip("")]
|
|
23
|
-
public Vector3 position;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
/// <summary>
|
|
27
|
-
///
|
|
28
|
-
/// </summary>
|
|
29
|
-
/// <param name="Triggered"></param>
|
|
30
|
-
public virtual void SetTriggered(bool Triggered) => this.Triggered = Triggered;
|
|
31
|
-
|
|
32
|
-
/// <summary>
|
|
33
|
-
///
|
|
34
|
-
/// </summary>
|
|
35
|
-
/// <param name="position"></param>
|
|
36
|
-
public virtual void SetPosition(Vector3 position) => this.position = position;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
protected GenericActuator() { }
|
|
40
|
-
|
|
41
|
-
protected GenericActuator(string Type, bool Triggered, Vector3 position) : base(Type)
|
|
42
|
-
{
|
|
43
|
-
this.Triggered = Triggered;
|
|
44
|
-
|
|
45
|
-
this.position = position;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using System;
|
|
3
|
+
using UnityEngine;
|
|
4
|
+
|
|
5
|
+
namespace DREditor.Triggers
|
|
6
|
+
{
|
|
7
|
+
/// <summary>
|
|
8
|
+
///
|
|
9
|
+
/// </summary>
|
|
10
|
+
[Serializable]
|
|
11
|
+
public abstract class GenericActuator : GenericTriggerBase
|
|
12
|
+
{
|
|
13
|
+
/// <summary>
|
|
14
|
+
///
|
|
15
|
+
/// </summary>
|
|
16
|
+
[Tooltip("")]
|
|
17
|
+
public bool Triggered = false;
|
|
18
|
+
|
|
19
|
+
/// <summary>
|
|
20
|
+
///
|
|
21
|
+
/// </summary>
|
|
22
|
+
[Tooltip("")]
|
|
23
|
+
public Vector3 position;
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
/// <summary>
|
|
27
|
+
///
|
|
28
|
+
/// </summary>
|
|
29
|
+
/// <param name="Triggered"></param>
|
|
30
|
+
public virtual void SetTriggered(bool Triggered) => this.Triggered = Triggered;
|
|
31
|
+
|
|
32
|
+
/// <summary>
|
|
33
|
+
///
|
|
34
|
+
/// </summary>
|
|
35
|
+
/// <param name="position"></param>
|
|
36
|
+
public virtual void SetPosition(Vector3 position) => this.position = position;
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
protected GenericActuator() { }
|
|
40
|
+
|
|
41
|
+
protected GenericActuator(string Type, bool Triggered, Vector3 position) : base(Type)
|
|
42
|
+
{
|
|
43
|
+
this.Triggered = Triggered;
|
|
44
|
+
|
|
45
|
+
this.position = position;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
48
|
}
|
package/GenericActuator.cs.meta
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 1f4e0b5a1fd270e41af6b0c5f7d9793a
|
|
3
|
-
MonoImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
serializedVersion: 2
|
|
6
|
-
defaultReferences: []
|
|
7
|
-
executionOrder: 0
|
|
8
|
-
icon: {instanceID: 0}
|
|
9
|
-
userData:
|
|
10
|
-
assetBundleName:
|
|
11
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 1f4e0b5a1fd270e41af6b0c5f7d9793a
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
package/GenericSubsequent.cs
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using System;
|
|
3
|
-
|
|
4
|
-
namespace DREditor.Triggers
|
|
5
|
-
{
|
|
6
|
-
/// <summary>
|
|
7
|
-
///
|
|
8
|
-
/// </summary>
|
|
9
|
-
[Serializable]
|
|
10
|
-
public abstract class GenericSubsequent : GenericTriggerBase
|
|
11
|
-
{
|
|
12
|
-
protected GenericSubsequent() { }
|
|
13
|
-
|
|
14
|
-
protected GenericSubsequent(string Type) : base(Type) { }
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
/// <summary>
|
|
18
|
-
///
|
|
19
|
-
/// </summary>
|
|
20
|
-
/// <param name="instance"></param>
|
|
21
|
-
/// <returns></returns>
|
|
22
|
-
public abstract GenericSubsequent MergeInstance(GenericSubsequent instance);
|
|
23
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using System;
|
|
3
|
+
|
|
4
|
+
namespace DREditor.Triggers
|
|
5
|
+
{
|
|
6
|
+
/// <summary>
|
|
7
|
+
///
|
|
8
|
+
/// </summary>
|
|
9
|
+
[Serializable]
|
|
10
|
+
public abstract class GenericSubsequent : GenericTriggerBase
|
|
11
|
+
{
|
|
12
|
+
protected GenericSubsequent() { }
|
|
13
|
+
|
|
14
|
+
protected GenericSubsequent(string Type) : base(Type) { }
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
/// <summary>
|
|
18
|
+
///
|
|
19
|
+
/// </summary>
|
|
20
|
+
/// <param name="instance"></param>
|
|
21
|
+
/// <returns></returns>
|
|
22
|
+
public abstract GenericSubsequent MergeInstance(GenericSubsequent instance);
|
|
23
|
+
}
|
|
24
24
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: a5cafa068c398544eb1f9c0abba0351f
|
|
3
|
-
MonoImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
serializedVersion: 2
|
|
6
|
-
defaultReferences: []
|
|
7
|
-
executionOrder: 0
|
|
8
|
-
icon: {instanceID: 0}
|
|
9
|
-
userData:
|
|
10
|
-
assetBundleName:
|
|
11
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: a5cafa068c398544eb1f9c0abba0351f
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
package/GenericTriggerBase.cs
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using System;
|
|
3
|
-
using UnityEngine;
|
|
4
|
-
|
|
5
|
-
namespace DREditor.Triggers
|
|
6
|
-
{
|
|
7
|
-
/// <summary>
|
|
8
|
-
///
|
|
9
|
-
/// </summary>
|
|
10
|
-
[Serializable]
|
|
11
|
-
public abstract class GenericTriggerBase
|
|
12
|
-
{
|
|
13
|
-
/// <summary>
|
|
14
|
-
///
|
|
15
|
-
/// </summary>
|
|
16
|
-
[Tooltip("")]
|
|
17
|
-
public string Type;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
/// <summary>
|
|
21
|
-
///
|
|
22
|
-
/// </summary>
|
|
23
|
-
/// <param name="Type"></param>
|
|
24
|
-
public virtual void SetType(string Type) => this.Type = Type;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
// Because the class type name might change namespaces, having this would
|
|
28
|
-
// help at least store and allow for a converter to be made.
|
|
29
|
-
// But at the moment the TriggerLoader class just scans assemblies to always find the right class,
|
|
30
|
-
// therefore this isn't needed at the moment, but it uses system.reflection, so it is only a
|
|
31
|
-
// temporary solution and should eventually be fixed in a future update.
|
|
32
|
-
//public string classTypeName;
|
|
33
|
-
|
|
34
|
-
//public void SetClassTypeName(string classTypeName) => this.classTypeName = classTypeName;
|
|
35
|
-
|
|
36
|
-
/// <summary>
|
|
37
|
-
///
|
|
38
|
-
/// </summary>
|
|
39
|
-
/// <returns></returns>
|
|
40
|
-
public virtual object Clone() => MemberwiseClone();
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
protected GenericTriggerBase() { }
|
|
44
|
-
|
|
45
|
-
protected GenericTriggerBase(string Type)
|
|
46
|
-
{
|
|
47
|
-
this.Type = Type;
|
|
48
|
-
|
|
49
|
-
// See classTypeName comments
|
|
50
|
-
//classTypeName = GetType().ToString();
|
|
51
|
-
}
|
|
52
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using System;
|
|
3
|
+
using UnityEngine;
|
|
4
|
+
|
|
5
|
+
namespace DREditor.Triggers
|
|
6
|
+
{
|
|
7
|
+
/// <summary>
|
|
8
|
+
///
|
|
9
|
+
/// </summary>
|
|
10
|
+
[Serializable]
|
|
11
|
+
public abstract class GenericTriggerBase
|
|
12
|
+
{
|
|
13
|
+
/// <summary>
|
|
14
|
+
///
|
|
15
|
+
/// </summary>
|
|
16
|
+
[Tooltip("")]
|
|
17
|
+
public string Type;
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
/// <summary>
|
|
21
|
+
///
|
|
22
|
+
/// </summary>
|
|
23
|
+
/// <param name="Type"></param>
|
|
24
|
+
public virtual void SetType(string Type) => this.Type = Type;
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
// Because the class type name might change namespaces, having this would
|
|
28
|
+
// help at least store and allow for a converter to be made.
|
|
29
|
+
// But at the moment the TriggerLoader class just scans assemblies to always find the right class,
|
|
30
|
+
// therefore this isn't needed at the moment, but it uses system.reflection, so it is only a
|
|
31
|
+
// temporary solution and should eventually be fixed in a future update.
|
|
32
|
+
//public string classTypeName;
|
|
33
|
+
|
|
34
|
+
//public void SetClassTypeName(string classTypeName) => this.classTypeName = classTypeName;
|
|
35
|
+
|
|
36
|
+
/// <summary>
|
|
37
|
+
///
|
|
38
|
+
/// </summary>
|
|
39
|
+
/// <returns></returns>
|
|
40
|
+
public virtual object Clone() => MemberwiseClone();
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
protected GenericTriggerBase() { }
|
|
44
|
+
|
|
45
|
+
protected GenericTriggerBase(string Type)
|
|
46
|
+
{
|
|
47
|
+
this.Type = Type;
|
|
48
|
+
|
|
49
|
+
// See classTypeName comments
|
|
50
|
+
//classTypeName = GetType().ToString();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
53
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 7d7259b397102fd4995aaa4afb663a95
|
|
3
|
-
MonoImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
serializedVersion: 2
|
|
6
|
-
defaultReferences: []
|
|
7
|
-
executionOrder: 0
|
|
8
|
-
icon: {instanceID: 0}
|
|
9
|
-
userData:
|
|
10
|
-
assetBundleName:
|
|
11
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 7d7259b397102fd4995aaa4afb663a95
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
package/HitboxActuator.cs
CHANGED
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using System;
|
|
3
|
-
using UnityEngine;
|
|
4
|
-
|
|
5
|
-
namespace DREditor.Triggers
|
|
6
|
-
{
|
|
7
|
-
/// <summary>
|
|
8
|
-
///
|
|
9
|
-
/// </summary>
|
|
10
|
-
[RequireComponent(typeof(BoxCollider))]
|
|
11
|
-
[ClassHeader(nameof(IActuatorBehaviour) +
|
|
12
|
-
"\n\n")]
|
|
13
|
-
public class HitboxActuator : ActuatorBehaviourBase
|
|
14
|
-
{
|
|
15
|
-
/// <summary>
|
|
16
|
-
///
|
|
17
|
-
/// </summary>
|
|
18
|
-
[Tooltip("")]
|
|
19
|
-
protected HitboxActuatorData data = new();
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
/// <summary>
|
|
23
|
-
///
|
|
24
|
-
/// </summary>
|
|
25
|
-
protected BoxCollider hitbox = null;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
/// <inheritdoc/>
|
|
29
|
-
protected override void InitializeActuator()
|
|
30
|
-
{
|
|
31
|
-
hitbox = GetComponent<BoxCollider>();
|
|
32
|
-
|
|
33
|
-
if (data.Triggered == false)
|
|
34
|
-
hitbox.enabled = true;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
protected virtual void OnTriggerEnter(Collider other)
|
|
38
|
-
{
|
|
39
|
-
if (!data.Triggered)
|
|
40
|
-
{
|
|
41
|
-
data.SetTriggered(!data.Triggered);
|
|
42
|
-
|
|
43
|
-
hitbox.enabled = false;
|
|
44
|
-
|
|
45
|
-
base.Call();
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/// <inheritdoc/>
|
|
50
|
-
public override object Save()
|
|
51
|
-
{
|
|
52
|
-
HitboxActuatorData newData = (HitboxActuatorData)data.Clone();
|
|
53
|
-
|
|
54
|
-
newData.SetType(GetType().Name);
|
|
55
|
-
|
|
56
|
-
newData.SetTriggered(data.Triggered);
|
|
57
|
-
|
|
58
|
-
newData.SetPosition(transform.position);
|
|
59
|
-
|
|
60
|
-
newData.SetHitboxSize(hitbox.size);
|
|
61
|
-
|
|
62
|
-
return newData;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/// <inheritdoc/>
|
|
66
|
-
public override void Load(object ob)
|
|
67
|
-
{
|
|
68
|
-
data = (HitboxActuatorData)Convert.ChangeType(ob, typeof(HitboxActuatorData));
|
|
69
|
-
|
|
70
|
-
transform.position = data.position;
|
|
71
|
-
|
|
72
|
-
if (!TryGetComponent(out hitbox))
|
|
73
|
-
hitbox = gameObject.AddComponent<BoxCollider>();
|
|
74
|
-
|
|
75
|
-
hitbox.enabled = false;
|
|
76
|
-
|
|
77
|
-
hitbox.isTrigger = true;
|
|
78
|
-
|
|
79
|
-
hitbox.size = data.HitboxSize;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using System;
|
|
3
|
+
using UnityEngine;
|
|
4
|
+
|
|
5
|
+
namespace DREditor.Triggers
|
|
6
|
+
{
|
|
7
|
+
/// <summary>
|
|
8
|
+
///
|
|
9
|
+
/// </summary>
|
|
10
|
+
[RequireComponent(typeof(BoxCollider))]
|
|
11
|
+
[ClassHeader(nameof(IActuatorBehaviour) +
|
|
12
|
+
"\n\n")]
|
|
13
|
+
public class HitboxActuator : ActuatorBehaviourBase
|
|
14
|
+
{
|
|
15
|
+
/// <summary>
|
|
16
|
+
///
|
|
17
|
+
/// </summary>
|
|
18
|
+
[Tooltip("")]
|
|
19
|
+
protected HitboxActuatorData data = new();
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
/// <summary>
|
|
23
|
+
///
|
|
24
|
+
/// </summary>
|
|
25
|
+
protected BoxCollider hitbox = null;
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
/// <inheritdoc/>
|
|
29
|
+
protected override void InitializeActuator()
|
|
30
|
+
{
|
|
31
|
+
hitbox = GetComponent<BoxCollider>();
|
|
32
|
+
|
|
33
|
+
if (data.Triggered == false)
|
|
34
|
+
hitbox.enabled = true;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
protected virtual void OnTriggerEnter(Collider other)
|
|
38
|
+
{
|
|
39
|
+
if (!data.Triggered)
|
|
40
|
+
{
|
|
41
|
+
data.SetTriggered(!data.Triggered);
|
|
42
|
+
|
|
43
|
+
hitbox.enabled = false;
|
|
44
|
+
|
|
45
|
+
base.Call();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/// <inheritdoc/>
|
|
50
|
+
public override object Save()
|
|
51
|
+
{
|
|
52
|
+
HitboxActuatorData newData = (HitboxActuatorData)data.Clone();
|
|
53
|
+
|
|
54
|
+
newData.SetType(GetType().Name);
|
|
55
|
+
|
|
56
|
+
newData.SetTriggered(data.Triggered);
|
|
57
|
+
|
|
58
|
+
newData.SetPosition(transform.position);
|
|
59
|
+
|
|
60
|
+
newData.SetHitboxSize(hitbox.size);
|
|
61
|
+
|
|
62
|
+
return newData;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/// <inheritdoc/>
|
|
66
|
+
public override void Load(object ob)
|
|
67
|
+
{
|
|
68
|
+
data = (HitboxActuatorData)Convert.ChangeType(ob, typeof(HitboxActuatorData));
|
|
69
|
+
|
|
70
|
+
transform.position = data.position;
|
|
71
|
+
|
|
72
|
+
if (!TryGetComponent(out hitbox))
|
|
73
|
+
hitbox = gameObject.AddComponent<BoxCollider>();
|
|
74
|
+
|
|
75
|
+
hitbox.enabled = false;
|
|
76
|
+
|
|
77
|
+
hitbox.isTrigger = true;
|
|
78
|
+
|
|
79
|
+
hitbox.size = data.HitboxSize;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
82
|
}
|