net.dreditor.flairs 0.1.6 → 0.1.7
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/DREditor.Flairs.asmdef +18 -18
- package/DREditor.Flairs.asmdef.meta +7 -7
- package/DestroyFlairHandler.cs +89 -89
- package/DestroyFlairHandler.cs.meta +1 -1
- package/DestroyFlairOnDirectorComplete.cs +73 -73
- package/DestroyFlairOnDirectorComplete.cs.meta +11 -11
- package/DestroyFlairOnNextLine.cs +77 -77
- package/DestroyFlairOnNextLine.cs.meta +1 -1
- package/Editor/AllCharactersOption.cs +42 -42
- package/Editor/AllCharactersOption.cs.meta +1 -1
- package/Editor/AllFlairsOneCharacterOption.cs +46 -46
- package/Editor/AllFlairsOneCharacterOption.cs.meta +1 -1
- package/Editor/AllSpritesOption.cs +53 -53
- package/Editor/AllSpritesOption.cs.meta +1 -1
- package/Editor/DREditor.Flairs.Editor.asmdef +17 -17
- package/Editor/DREditor.Flairs.Editor.asmdef.meta +7 -7
- package/Editor/FlairEditorTools.cs +86 -86
- package/Editor/FlairEditorTools.cs.meta +1 -1
- package/Editor/GenerateFlairDebugDialogue.cs +61 -61
- package/Editor/GenerateFlairDebugDialogue.cs.meta +1 -1
- package/Editor/GenerateFlairDialogueOptionBase.cs +111 -111
- package/Editor/GenerateFlairDialogueOptionBase.cs.meta +1 -1
- package/Editor/IGenerateFlairDialogueSetting.cs +18 -18
- package/Editor/IGenerateFlairDialogueSetting.cs.meta +1 -1
- package/Editor.meta +8 -8
- package/EnableFlairCanvas.cs +77 -77
- package/EnableFlairCanvas.cs.meta +1 -1
- package/FadeFlairDestroyer.cs +58 -58
- package/FadeFlairDestroyer.cs.meta +1 -1
- package/Flair.cs +31 -31
- package/Flair.cs.meta +1 -1
- package/FlairDestroyer.cs +26 -26
- package/FlairDestroyer.cs.meta +1 -1
- package/FlairEvent.cs +45 -45
- package/FlairEvent.cs.meta +1 -1
- package/FlairEventHandler.cs +33 -33
- package/FlairEventHandler.cs.meta +1 -1
- package/FlairOffset.cs +47 -47
- package/FlairOffset.cs.meta +1 -1
- package/FlairSpawner.cs +28 -28
- package/FlairSpawner.cs.meta +1 -1
- package/FlairSpawnerBase.cs +16 -16
- package/FlairSpawnerBase.cs.meta +1 -1
- package/FlairStrategy.cs +48 -48
- package/FlairStrategy.cs.meta +1 -1
- package/FlairStrategyBase.cs +57 -57
- package/FlairStrategyBase.cs.meta +1 -1
- package/Flair_Question.controller +72 -72
- package/Flair_Question.controller.meta +8 -8
- package/Flair_QuestionAnim.anim +693 -693
- package/Flair_QuestionAnim.anim.meta +8 -8
- package/Flair_QuestionTimeline.playable +2198 -2198
- package/Flair_QuestionTimeline.playable.meta +8 -8
- package/IFlair.cs +16 -16
- package/IFlair.cs.meta +1 -1
- package/IFlairDestroyable.cs +15 -15
- package/IFlairDestroyable.cs.meta +1 -1
- package/IFlairEvent.cs +29 -29
- package/IFlairEvent.cs.meta +1 -1
- package/IFlairSetting.cs +16 -16
- package/IFlairSetting.cs.meta +1 -1
- package/IFlairSpawnStep.cs +17 -17
- package/IFlairSpawnStep.cs.meta +1 -1
- package/IFlairStep.cs +17 -17
- package/IFlairStep.cs.meta +1 -1
- package/LayerFlair.cs +38 -38
- package/LayerFlair.cs.meta +1 -1
- package/ProtagFlairStrategy.cs +68 -68
- package/ProtagFlairStrategy.cs.meta +1 -1
- package/{Samples → Samples~}/Flair.prefab +145 -145
- package/{Samples → Samples~}/Flair.prefab.meta +7 -7
- package/{Samples → Samples~}/Flair_Event_Handler.prefab +238 -238
- package/{Samples → Samples~}/Flair_Event_Handler.prefab.meta +7 -7
- package/{Samples → Samples~}/Flair_Question.asset +15 -15
- package/{Samples → Samples~}/Flair_Question.asset.meta +8 -8
- package/{Samples → Samples~}/Flair_Question.prefab +412 -412
- package/{Samples → Samples~}/Flair_Question.prefab.meta +7 -7
- package/{Samples → Samples~}/Flair_Strategy.prefab +64 -64
- package/{Samples → Samples~}/Flair_Strategy.prefab.meta +7 -7
- package/{Samples → Samples~}/Protag_Flair_Strategy.prefab +186 -186
- package/{Samples → Samples~}/Protag_Flair_Strategy.prefab.meta +7 -7
- package/SpawnFlairOnHead.cs +36 -36
- package/SpawnFlairOnHead.cs.meta +1 -1
- package/SpawnFlairOnParent.cs +24 -24
- package/SpawnFlairOnParent.cs.meta +1 -1
- package/SpawnFlairStepBase.cs +44 -44
- package/SpawnFlairStepBase.cs.meta +1 -1
- package/SpawnFlairToParent.cs +38 -38
- package/SpawnFlairToParent.cs.meta +1 -1
- package/package.json +41 -36
- package/package.json.meta +7 -7
- package/Samples.meta +0 -8
package/.attestation.p7m
ADDED
|
Binary file
|
package/DREditor.Flairs.asmdef
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "DREditor.Flairs",
|
|
3
|
-
"rootNamespace": "",
|
|
4
|
-
"references": [
|
|
5
|
-
"DG.Tweening",
|
|
6
|
-
"DREditor",
|
|
7
|
-
"DREditor.DialogueEventHandling",
|
|
8
|
-
"Unity.Timeline"
|
|
9
|
-
],
|
|
10
|
-
"includePlatforms": [],
|
|
11
|
-
"excludePlatforms": [],
|
|
12
|
-
"allowUnsafeCode": false,
|
|
13
|
-
"overrideReferences": false,
|
|
14
|
-
"precompiledReferences": [],
|
|
15
|
-
"autoReferenced": true,
|
|
16
|
-
"defineConstraints": [],
|
|
17
|
-
"versionDefines": [],
|
|
18
|
-
"noEngineReferences": false
|
|
1
|
+
{
|
|
2
|
+
"name": "DREditor.Flairs",
|
|
3
|
+
"rootNamespace": "",
|
|
4
|
+
"references": [
|
|
5
|
+
"DG.Tweening",
|
|
6
|
+
"DREditor",
|
|
7
|
+
"DREditor.DialogueEventHandling",
|
|
8
|
+
"Unity.Timeline"
|
|
9
|
+
],
|
|
10
|
+
"includePlatforms": [],
|
|
11
|
+
"excludePlatforms": [],
|
|
12
|
+
"allowUnsafeCode": false,
|
|
13
|
+
"overrideReferences": false,
|
|
14
|
+
"precompiledReferences": [],
|
|
15
|
+
"autoReferenced": true,
|
|
16
|
+
"defineConstraints": [],
|
|
17
|
+
"versionDefines": [],
|
|
18
|
+
"noEngineReferences": false
|
|
19
19
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: a8c075c7ecee33643a09f4e0d533d4d2
|
|
3
|
-
AssemblyDefinitionImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
userData:
|
|
6
|
-
assetBundleName:
|
|
7
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: a8c075c7ecee33643a09f4e0d533d4d2
|
|
3
|
+
AssemblyDefinitionImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
userData:
|
|
6
|
+
assetBundleName:
|
|
7
|
+
assetBundleVariant:
|
package/DestroyFlairHandler.cs
CHANGED
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Kill/Cure: Beautiful Vice
|
|
2
|
-
using System;
|
|
3
|
-
using System.Linq;
|
|
4
|
-
using UnityEngine;
|
|
5
|
-
using UnityEngine.Events;
|
|
6
|
-
|
|
7
|
-
namespace DREditor.Flairs
|
|
8
|
-
{
|
|
9
|
-
/// <summary>
|
|
10
|
-
///
|
|
11
|
-
/// </summary>
|
|
12
|
-
public abstract class DestroyFlairHandler : MonoBehaviour
|
|
13
|
-
{
|
|
14
|
-
/// <summary>
|
|
15
|
-
///
|
|
16
|
-
/// </summary>
|
|
17
|
-
[Tooltip("")]
|
|
18
|
-
[SerializeField] protected FlairDestroyer destroyer = null;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
[Header("")]
|
|
22
|
-
public UnityEvent onOtherHandlerInvoked = null;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
/// <summary>
|
|
26
|
-
///
|
|
27
|
-
/// </summary>
|
|
28
|
-
protected DestroyFlairHandler[] otherHandlers;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
protected virtual void Awake() =>
|
|
32
|
-
otherHandlers = GetComponents<DestroyFlairHandler>()
|
|
33
|
-
.Where(handler => handler != this)
|
|
34
|
-
.ToArray();
|
|
35
|
-
|
|
36
|
-
protected virtual void Start() =>
|
|
37
|
-
UpdateFlairSubscription((handler) => handler.onOtherHandlerInvoked.AddListener(OnOtherHandlerDestroying));
|
|
38
|
-
|
|
39
|
-
protected virtual void OnDestroy() =>
|
|
40
|
-
UpdateFlairSubscription((handler) => handler.onOtherHandlerInvoked.RemoveListener(OnOtherHandlerDestroying));
|
|
41
|
-
|
|
42
|
-
/// <summary>
|
|
43
|
-
///
|
|
44
|
-
/// </summary>
|
|
45
|
-
/// <param name="update"></param>
|
|
46
|
-
protected virtual void UpdateFlairSubscription(Action<DestroyFlairHandler> update)
|
|
47
|
-
{
|
|
48
|
-
if (otherHandlers == null)
|
|
49
|
-
return;
|
|
50
|
-
|
|
51
|
-
foreach (DestroyFlairHandler handler in otherHandlers)
|
|
52
|
-
if (handler != null)
|
|
53
|
-
update(handler);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/// <summary>
|
|
57
|
-
///
|
|
58
|
-
/// </summary>
|
|
59
|
-
protected abstract void OnOtherHandlerDestroying();
|
|
60
|
-
|
|
61
|
-
/// <summary>
|
|
62
|
-
///
|
|
63
|
-
/// </summary>
|
|
64
|
-
protected virtual void AttemptToDestroyFlair()
|
|
65
|
-
{
|
|
66
|
-
if (FlairCanBeDestroyed())
|
|
67
|
-
InvokeFlairDestroyer();
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/// <summary>
|
|
71
|
-
///
|
|
72
|
-
/// </summary>
|
|
73
|
-
/// <returns></returns>
|
|
74
|
-
protected virtual bool FlairCanBeDestroyed() => gameObject != null;
|
|
75
|
-
|
|
76
|
-
/// <summary>
|
|
77
|
-
///
|
|
78
|
-
/// </summary>
|
|
79
|
-
protected virtual void InvokeFlairDestroyer()
|
|
80
|
-
{
|
|
81
|
-
onOtherHandlerInvoked?.Invoke();
|
|
82
|
-
|
|
83
|
-
if (destroyer != null)
|
|
84
|
-
destroyer.DestroyFlair();
|
|
85
|
-
else
|
|
86
|
-
UnityEngine.Debug.LogWarning("ALERT: This flair cannot be destroyed! " +
|
|
87
|
-
"\nANALYSIS: A destroyer has not been assigned!");
|
|
88
|
-
}
|
|
89
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Kill/Cure: Beautiful Vice
|
|
2
|
+
using System;
|
|
3
|
+
using System.Linq;
|
|
4
|
+
using UnityEngine;
|
|
5
|
+
using UnityEngine.Events;
|
|
6
|
+
|
|
7
|
+
namespace DREditor.Flairs
|
|
8
|
+
{
|
|
9
|
+
/// <summary>
|
|
10
|
+
///
|
|
11
|
+
/// </summary>
|
|
12
|
+
public abstract class DestroyFlairHandler : MonoBehaviour
|
|
13
|
+
{
|
|
14
|
+
/// <summary>
|
|
15
|
+
///
|
|
16
|
+
/// </summary>
|
|
17
|
+
[Tooltip("")]
|
|
18
|
+
[SerializeField] protected FlairDestroyer destroyer = null;
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
[Header("")]
|
|
22
|
+
public UnityEvent onOtherHandlerInvoked = null;
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
/// <summary>
|
|
26
|
+
///
|
|
27
|
+
/// </summary>
|
|
28
|
+
protected DestroyFlairHandler[] otherHandlers;
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
protected virtual void Awake() =>
|
|
32
|
+
otherHandlers = GetComponents<DestroyFlairHandler>()
|
|
33
|
+
.Where(handler => handler != this)
|
|
34
|
+
.ToArray();
|
|
35
|
+
|
|
36
|
+
protected virtual void Start() =>
|
|
37
|
+
UpdateFlairSubscription((handler) => handler.onOtherHandlerInvoked.AddListener(OnOtherHandlerDestroying));
|
|
38
|
+
|
|
39
|
+
protected virtual void OnDestroy() =>
|
|
40
|
+
UpdateFlairSubscription((handler) => handler.onOtherHandlerInvoked.RemoveListener(OnOtherHandlerDestroying));
|
|
41
|
+
|
|
42
|
+
/// <summary>
|
|
43
|
+
///
|
|
44
|
+
/// </summary>
|
|
45
|
+
/// <param name="update"></param>
|
|
46
|
+
protected virtual void UpdateFlairSubscription(Action<DestroyFlairHandler> update)
|
|
47
|
+
{
|
|
48
|
+
if (otherHandlers == null)
|
|
49
|
+
return;
|
|
50
|
+
|
|
51
|
+
foreach (DestroyFlairHandler handler in otherHandlers)
|
|
52
|
+
if (handler != null)
|
|
53
|
+
update(handler);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/// <summary>
|
|
57
|
+
///
|
|
58
|
+
/// </summary>
|
|
59
|
+
protected abstract void OnOtherHandlerDestroying();
|
|
60
|
+
|
|
61
|
+
/// <summary>
|
|
62
|
+
///
|
|
63
|
+
/// </summary>
|
|
64
|
+
protected virtual void AttemptToDestroyFlair()
|
|
65
|
+
{
|
|
66
|
+
if (FlairCanBeDestroyed())
|
|
67
|
+
InvokeFlairDestroyer();
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/// <summary>
|
|
71
|
+
///
|
|
72
|
+
/// </summary>
|
|
73
|
+
/// <returns></returns>
|
|
74
|
+
protected virtual bool FlairCanBeDestroyed() => gameObject != null;
|
|
75
|
+
|
|
76
|
+
/// <summary>
|
|
77
|
+
///
|
|
78
|
+
/// </summary>
|
|
79
|
+
protected virtual void InvokeFlairDestroyer()
|
|
80
|
+
{
|
|
81
|
+
onOtherHandlerInvoked?.Invoke();
|
|
82
|
+
|
|
83
|
+
if (destroyer != null)
|
|
84
|
+
destroyer.DestroyFlair();
|
|
85
|
+
else
|
|
86
|
+
UnityEngine.Debug.LogWarning("ALERT: This flair cannot be destroyed! " +
|
|
87
|
+
"\nANALYSIS: A destroyer has not been assigned!");
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
90
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
1
|
+
fileFormatVersion: 2
|
|
2
2
|
guid: 9f1499228b978fc4988ac24682ef22cf
|
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Kill/Cure: Beautiful Vice
|
|
2
|
-
//Original Author: KHeartz
|
|
3
|
-
using UnityEngine;
|
|
4
|
-
using UnityEngine.Playables;
|
|
5
|
-
|
|
6
|
-
namespace DREditor.Flairs
|
|
7
|
-
{
|
|
8
|
-
/// <summary>
|
|
9
|
-
///
|
|
10
|
-
/// </summary>
|
|
11
|
-
[ClassHeader(nameof(DestroyFlairHandler) +
|
|
12
|
-
"\n\n")]
|
|
13
|
-
public class DestroyFlairOnDirectorComplete : DestroyFlairHandler
|
|
14
|
-
{
|
|
15
|
-
/// <summary>
|
|
16
|
-
///
|
|
17
|
-
/// </summary>
|
|
18
|
-
protected PlayableDirector timeline = null;
|
|
19
|
-
|
|
20
|
-
/// <summary>
|
|
21
|
-
///
|
|
22
|
-
/// </summary>
|
|
23
|
-
protected bool isLooping = false;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
/// <inheritdoc/>
|
|
27
|
-
protected override void Awake()
|
|
28
|
-
{
|
|
29
|
-
base.Awake();
|
|
30
|
-
|
|
31
|
-
if (TryGetComponent(out timeline))
|
|
32
|
-
isLooping = timeline.extrapolationMode == DirectorWrapMode.Loop;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
protected virtual void Update() => AttemptToDestroyFlair();
|
|
36
|
-
|
|
37
|
-
/// <inheritdoc/>
|
|
38
|
-
protected override bool FlairCanBeDestroyed() => base.FlairCanBeDestroyed() && IsComplete();
|
|
39
|
-
|
|
40
|
-
/// <summary>
|
|
41
|
-
///
|
|
42
|
-
/// </summary>
|
|
43
|
-
/// <returns></returns>
|
|
44
|
-
protected virtual bool IsComplete() => !timeline.playableGraph.IsValid() || !isLooping && !timeline.playableGraph.IsPlaying();
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
/// <inheritdoc/>
|
|
48
|
-
protected override void InvokeFlairDestroyer()
|
|
49
|
-
{
|
|
50
|
-
DestroyPlayableDirector();
|
|
51
|
-
|
|
52
|
-
base.InvokeFlairDestroyer();
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/// <summary>
|
|
56
|
-
///
|
|
57
|
-
/// </summary>
|
|
58
|
-
protected virtual void DestroyPlayableDirector()
|
|
59
|
-
{
|
|
60
|
-
if (gameObject.TryGetComponent(out PlayableDirector playableDirector))
|
|
61
|
-
{
|
|
62
|
-
playableDirector.enabled = false;
|
|
63
|
-
|
|
64
|
-
foreach (var item in gameObject.GetComponentsInChildren<Animator>())
|
|
65
|
-
Destroy(item);
|
|
66
|
-
|
|
67
|
-
Destroy(gameObject.GetComponent<Animator>());
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/// <inheritdoc/>
|
|
72
|
-
protected override void OnOtherHandlerDestroying() => DestroyPlayableDirector();
|
|
73
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Kill/Cure: Beautiful Vice
|
|
2
|
+
//Original Author: KHeartz
|
|
3
|
+
using UnityEngine;
|
|
4
|
+
using UnityEngine.Playables;
|
|
5
|
+
|
|
6
|
+
namespace DREditor.Flairs
|
|
7
|
+
{
|
|
8
|
+
/// <summary>
|
|
9
|
+
///
|
|
10
|
+
/// </summary>
|
|
11
|
+
[ClassHeader(nameof(DestroyFlairHandler) +
|
|
12
|
+
"\n\n")]
|
|
13
|
+
public class DestroyFlairOnDirectorComplete : DestroyFlairHandler
|
|
14
|
+
{
|
|
15
|
+
/// <summary>
|
|
16
|
+
///
|
|
17
|
+
/// </summary>
|
|
18
|
+
protected PlayableDirector timeline = null;
|
|
19
|
+
|
|
20
|
+
/// <summary>
|
|
21
|
+
///
|
|
22
|
+
/// </summary>
|
|
23
|
+
protected bool isLooping = false;
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
/// <inheritdoc/>
|
|
27
|
+
protected override void Awake()
|
|
28
|
+
{
|
|
29
|
+
base.Awake();
|
|
30
|
+
|
|
31
|
+
if (TryGetComponent(out timeline))
|
|
32
|
+
isLooping = timeline.extrapolationMode == DirectorWrapMode.Loop;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
protected virtual void Update() => AttemptToDestroyFlair();
|
|
36
|
+
|
|
37
|
+
/// <inheritdoc/>
|
|
38
|
+
protected override bool FlairCanBeDestroyed() => base.FlairCanBeDestroyed() && IsComplete();
|
|
39
|
+
|
|
40
|
+
/// <summary>
|
|
41
|
+
///
|
|
42
|
+
/// </summary>
|
|
43
|
+
/// <returns></returns>
|
|
44
|
+
protected virtual bool IsComplete() => !timeline.playableGraph.IsValid() || !isLooping && !timeline.playableGraph.IsPlaying();
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
/// <inheritdoc/>
|
|
48
|
+
protected override void InvokeFlairDestroyer()
|
|
49
|
+
{
|
|
50
|
+
DestroyPlayableDirector();
|
|
51
|
+
|
|
52
|
+
base.InvokeFlairDestroyer();
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/// <summary>
|
|
56
|
+
///
|
|
57
|
+
/// </summary>
|
|
58
|
+
protected virtual void DestroyPlayableDirector()
|
|
59
|
+
{
|
|
60
|
+
if (gameObject.TryGetComponent(out PlayableDirector playableDirector))
|
|
61
|
+
{
|
|
62
|
+
playableDirector.enabled = false;
|
|
63
|
+
|
|
64
|
+
foreach (var item in gameObject.GetComponentsInChildren<Animator>())
|
|
65
|
+
Destroy(item);
|
|
66
|
+
|
|
67
|
+
Destroy(gameObject.GetComponent<Animator>());
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/// <inheritdoc/>
|
|
72
|
+
protected override void OnOtherHandlerDestroying() => DestroyPlayableDirector();
|
|
73
|
+
}
|
|
74
74
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: a09f8db821ca9074981397b5b7e1591b
|
|
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: a09f8db821ca9074981397b5b7e1591b
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Kill/Cure: Beautiful Vice
|
|
2
|
-
using DREditor.Dialogues;
|
|
3
|
-
using DREditor.Dialogues.LineReading;
|
|
4
|
-
using DREditor.Services;
|
|
5
|
-
|
|
6
|
-
namespace DREditor.Flairs
|
|
7
|
-
{
|
|
8
|
-
/// <summary>
|
|
9
|
-
///
|
|
10
|
-
/// </summary>
|
|
11
|
-
[ClassHeader(nameof(DestroyFlairHandler) +
|
|
12
|
-
"\n\n")]
|
|
13
|
-
public class DestroyFlairOnNextLine : DestroyFlairHandler
|
|
14
|
-
{
|
|
15
|
-
/// <summary>
|
|
16
|
-
///
|
|
17
|
-
/// </summary>
|
|
18
|
-
protected ILineReader lineReader;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
/// <inheritdoc/>
|
|
22
|
-
protected override void Awake()
|
|
23
|
-
{
|
|
24
|
-
base.Awake();
|
|
25
|
-
|
|
26
|
-
InitializeCheck();
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/// <summary>
|
|
30
|
-
///
|
|
31
|
-
/// </summary>
|
|
32
|
-
protected virtual void InitializeCheck()
|
|
33
|
-
{
|
|
34
|
-
Initialize();
|
|
35
|
-
|
|
36
|
-
if (InitializationFailed())
|
|
37
|
-
OnInitializationCheckFailed();
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/// <summary>
|
|
41
|
-
///
|
|
42
|
-
/// </summary>
|
|
43
|
-
protected virtual void Initialize() =>
|
|
44
|
-
lineReader = ServiceLocator.GetService<IDialogueManager>().GetReader().GetComponentInChildren<ILineReader>();
|
|
45
|
-
|
|
46
|
-
/// <summary>
|
|
47
|
-
///
|
|
48
|
-
/// </summary>
|
|
49
|
-
/// <returns></returns>
|
|
50
|
-
protected virtual bool InitializationFailed() => lineReader == null;
|
|
51
|
-
|
|
52
|
-
/// <summary>
|
|
53
|
-
///
|
|
54
|
-
/// </summary>
|
|
55
|
-
protected virtual void OnInitializationCheckFailed()
|
|
56
|
-
{
|
|
57
|
-
UnityEngine.Debug.LogError($"ALERT: Destroyer {gameObject.name} failed initialization because the line reader was null!" +
|
|
58
|
-
"\nDestroying Object.");
|
|
59
|
-
|
|
60
|
-
InvokeFlairDestroyer();
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
protected virtual void OnEnable()
|
|
64
|
-
{
|
|
65
|
-
if (lineReader != null)
|
|
66
|
-
lineReader.OnLineEndEvent += AttemptToDestroyFlair;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
protected virtual void OnDisable()
|
|
70
|
-
{
|
|
71
|
-
if (lineReader != null)
|
|
72
|
-
lineReader.OnLineEndEvent -= AttemptToDestroyFlair;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/// <inheritdoc/>
|
|
76
|
-
protected override void OnOtherHandlerDestroying() { }
|
|
77
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Kill/Cure: Beautiful Vice
|
|
2
|
+
using DREditor.Dialogues;
|
|
3
|
+
using DREditor.Dialogues.LineReading;
|
|
4
|
+
using DREditor.Services;
|
|
5
|
+
|
|
6
|
+
namespace DREditor.Flairs
|
|
7
|
+
{
|
|
8
|
+
/// <summary>
|
|
9
|
+
///
|
|
10
|
+
/// </summary>
|
|
11
|
+
[ClassHeader(nameof(DestroyFlairHandler) +
|
|
12
|
+
"\n\n")]
|
|
13
|
+
public class DestroyFlairOnNextLine : DestroyFlairHandler
|
|
14
|
+
{
|
|
15
|
+
/// <summary>
|
|
16
|
+
///
|
|
17
|
+
/// </summary>
|
|
18
|
+
protected ILineReader lineReader;
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
/// <inheritdoc/>
|
|
22
|
+
protected override void Awake()
|
|
23
|
+
{
|
|
24
|
+
base.Awake();
|
|
25
|
+
|
|
26
|
+
InitializeCheck();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/// <summary>
|
|
30
|
+
///
|
|
31
|
+
/// </summary>
|
|
32
|
+
protected virtual void InitializeCheck()
|
|
33
|
+
{
|
|
34
|
+
Initialize();
|
|
35
|
+
|
|
36
|
+
if (InitializationFailed())
|
|
37
|
+
OnInitializationCheckFailed();
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/// <summary>
|
|
41
|
+
///
|
|
42
|
+
/// </summary>
|
|
43
|
+
protected virtual void Initialize() =>
|
|
44
|
+
lineReader = ServiceLocator.GetService<IDialogueManager>().GetReader().GetComponentInChildren<ILineReader>();
|
|
45
|
+
|
|
46
|
+
/// <summary>
|
|
47
|
+
///
|
|
48
|
+
/// </summary>
|
|
49
|
+
/// <returns></returns>
|
|
50
|
+
protected virtual bool InitializationFailed() => lineReader == null;
|
|
51
|
+
|
|
52
|
+
/// <summary>
|
|
53
|
+
///
|
|
54
|
+
/// </summary>
|
|
55
|
+
protected virtual void OnInitializationCheckFailed()
|
|
56
|
+
{
|
|
57
|
+
UnityEngine.Debug.LogError($"ALERT: Destroyer {gameObject.name} failed initialization because the line reader was null!" +
|
|
58
|
+
"\nDestroying Object.");
|
|
59
|
+
|
|
60
|
+
InvokeFlairDestroyer();
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
protected virtual void OnEnable()
|
|
64
|
+
{
|
|
65
|
+
if (lineReader != null)
|
|
66
|
+
lineReader.OnLineEndEvent += AttemptToDestroyFlair;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
protected virtual void OnDisable()
|
|
70
|
+
{
|
|
71
|
+
if (lineReader != null)
|
|
72
|
+
lineReader.OnLineEndEvent -= AttemptToDestroyFlair;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/// <inheritdoc/>
|
|
76
|
+
protected override void OnOtherHandlerDestroying() { }
|
|
77
|
+
}
|
|
78
78
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
1
|
+
fileFormatVersion: 2
|
|
2
2
|
guid: 362244af54b168545a147da8aa02b950
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
#if UNITY_EDITOR
|
|
3
|
-
using DREditor.Dialogues;
|
|
4
|
-
using DREditor.Editor.Utility;
|
|
5
|
-
using System;
|
|
6
|
-
|
|
7
|
-
namespace DREditor.Flairs.Editor
|
|
8
|
-
{
|
|
9
|
-
/// <summary>
|
|
10
|
-
///
|
|
11
|
-
/// </summary>
|
|
12
|
-
[Serializable]
|
|
13
|
-
public class AllCharactersOption : GenerateFlairDialogueOptionBase
|
|
14
|
-
{
|
|
15
|
-
/// <inheritdoc/>
|
|
16
|
-
protected override void GenerateDialogue()
|
|
17
|
-
{
|
|
18
|
-
foreach (IFlairEvent sceneEvent in events)
|
|
19
|
-
AllCharactersOneFlair(sceneEvent);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/// <summary>
|
|
23
|
-
///
|
|
24
|
-
/// </summary>
|
|
25
|
-
/// <param name="flair"></param>
|
|
26
|
-
protected virtual void AllCharactersOneFlair(IFlairEvent flair)
|
|
27
|
-
{
|
|
28
|
-
Dialogue dia = MakeInstance<Dialogue>();
|
|
29
|
-
|
|
30
|
-
dia.Lines.Clear();
|
|
31
|
-
|
|
32
|
-
string flairName = flair.GetFlair().GetPrefab().name;
|
|
33
|
-
|
|
34
|
-
dia.name = "D_" + flairName + "_Debug";
|
|
35
|
-
|
|
36
|
-
foreach (var c in cdb.Characters)
|
|
37
|
-
dia.Lines.Add(CharacterFlairLine(c, flair, flairName));
|
|
38
|
-
|
|
39
|
-
BuilderUtility.CreateAsset(dia, targetDirectory);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
#if UNITY_EDITOR
|
|
3
|
+
using DREditor.Dialogues;
|
|
4
|
+
using DREditor.Editor.Utility;
|
|
5
|
+
using System;
|
|
6
|
+
|
|
7
|
+
namespace DREditor.Flairs.Editor
|
|
8
|
+
{
|
|
9
|
+
/// <summary>
|
|
10
|
+
///
|
|
11
|
+
/// </summary>
|
|
12
|
+
[Serializable]
|
|
13
|
+
public class AllCharactersOption : GenerateFlairDialogueOptionBase
|
|
14
|
+
{
|
|
15
|
+
/// <inheritdoc/>
|
|
16
|
+
protected override void GenerateDialogue()
|
|
17
|
+
{
|
|
18
|
+
foreach (IFlairEvent sceneEvent in events)
|
|
19
|
+
AllCharactersOneFlair(sceneEvent);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/// <summary>
|
|
23
|
+
///
|
|
24
|
+
/// </summary>
|
|
25
|
+
/// <param name="flair"></param>
|
|
26
|
+
protected virtual void AllCharactersOneFlair(IFlairEvent flair)
|
|
27
|
+
{
|
|
28
|
+
Dialogue dia = MakeInstance<Dialogue>();
|
|
29
|
+
|
|
30
|
+
dia.Lines.Clear();
|
|
31
|
+
|
|
32
|
+
string flairName = flair.GetFlair().GetPrefab().name;
|
|
33
|
+
|
|
34
|
+
dia.name = "D_" + flairName + "_Debug";
|
|
35
|
+
|
|
36
|
+
foreach (var c in cdb.Characters)
|
|
37
|
+
dia.Lines.Add(CharacterFlairLine(c, flair, flairName));
|
|
38
|
+
|
|
39
|
+
BuilderUtility.CreateAsset(dia, targetDirectory);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
43
|
#endif
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
1
|
+
fileFormatVersion: 2
|
|
2
2
|
guid: 6f265ac470ff4dc4d881a3768e67e30e
|