net.dreditor.actors 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/Actor.cs +74 -74
- package/Actor.cs.meta +11 -11
- package/ActorBodyDebugger.cs +117 -117
- package/ActorBodyDebugger.cs.meta +13 -13
- package/ActorManager.cs +149 -149
- package/ActorManager.cs.meta +11 -11
- package/ActorOrganizer.cs +93 -93
- package/ActorOrganizer.cs.meta +11 -11
- package/BasicExpressionChanger.cs +157 -157
- package/BasicExpressionChanger.cs.meta +11 -11
- package/BasicLayerHandler.cs +108 -108
- package/BasicLayerHandler.cs.meta +11 -11
- package/DREditor.Actors.asmdef +20 -20
- package/DREditor.Actors.asmdef.meta +7 -7
- package/Editor/AssignmentStyleGUIEditor.cs +171 -171
- package/Editor/AssignmentStyleGUIEditor.cs.meta +1 -1
- package/Editor/AutoCreateCharacterWizard.cs +475 -475
- package/Editor/AutoCreateCharacterWizard.cs.meta +11 -11
- package/Editor/AutoCreateTrialCharacterWizard.cs +426 -426
- package/Editor/AutoCreateTrialCharacterWizard.cs.meta +1 -1
- package/Editor/CharacterUtility.cs +119 -119
- package/Editor/CharacterUtility.cs.meta +11 -11
- package/Editor/CircleDrawer.cs +206 -206
- package/Editor/CircleDrawer.cs.meta +1 -1
- package/Editor/CircleUtility.cs +54 -54
- package/Editor/CircleUtility.cs.meta +1 -1
- package/Editor/DREditor.Actors.Editor.asmdef +21 -21
- package/Editor/DREditor.Actors.Editor.asmdef.meta +7 -7
- package/Editor/GenerateCharacterIntroDialogues.cs +234 -234
- package/Editor/GenerateCharacterIntroDialogues.cs.meta +11 -11
- package/Editor/IItemImporter.cs +19 -19
- package/Editor/IItemImporter.cs.meta +1 -1
- package/Editor/ItemImporter.cs +170 -170
- package/Editor/ItemImporter.cs.meta +1 -1
- package/Editor/ItemUtility.cs +85 -85
- package/Editor/ItemUtility.cs.meta +11 -11
- package/Editor/ItemWizard.cs +41 -41
- package/Editor/ItemWizard.cs.meta +11 -11
- package/Editor.meta +8 -8
- package/Events/ActorCheckFocusEvent.cs +49 -49
- package/Events/ActorCheckFocusEvent.cs.meta +11 -11
- package/Events/ActorFadeEvent.cs +19 -19
- package/Events/ActorFadeEvent.cs.meta +11 -11
- package/Events/ActorFadeHandler.cs +53 -53
- package/Events/ActorFadeHandler.cs.meta +11 -11
- package/Events/ActorFaintEvent.cs +282 -282
- package/Events/ActorFaintEvent.cs.meta +11 -11
- package/Events/ActorFaintEventRenderQ.cs +65 -65
- package/Events/ActorFaintEventRenderQ.cs.meta +11 -11
- package/Events/ActorLeaveHandler.cs +238 -238
- package/Events/ActorLeaveHandler.cs.meta +11 -11
- package/Events/ActorSpriteFader.cs +190 -190
- package/Events/ActorSpriteFader.cs.meta +11 -11
- package/Events/ActorSpriteFaderRenderQ.cs +49 -49
- package/Events/ActorSpriteFaderRenderQ.cs.meta +11 -11
- package/Events/BSTrialActorFlash.cs +259 -259
- package/Events/BSTrialActorFlash.cs.meta +11 -11
- package/Events/ChangeLastFocusEvent.cs +62 -62
- package/Events/ChangeLastFocusEvent.cs.meta +11 -11
- package/Events/MoveCharacterEvent.cs +141 -141
- package/Events/MoveCharacterEvent.cs.meta +11 -11
- package/Events.meta +8 -8
- package/ExpressionChanger.cs +25 -25
- package/ExpressionChanger.cs.meta +11 -11
- package/FocusHandler.cs +96 -96
- package/FocusHandler.cs.meta +11 -11
- package/Implementation/ActorFocusHandler.cs +195 -195
- package/Implementation/ActorFocusHandler.cs.meta +11 -11
- package/Implementation/ActorFocusLoadEnd.cs +108 -108
- package/Implementation/ActorFocusLoadEnd.cs.meta +11 -11
- package/Implementation/ActorFocusPrepare.cs +102 -102
- package/Implementation/ActorFocusPrepare.cs.meta +11 -11
- package/Implementation/ActorFocusResolve.cs +67 -67
- package/Implementation/ActorFocusResolve.cs.meta +11 -11
- package/Implementation/ActorSpriteChanger.cs +129 -129
- package/Implementation/ActorSpriteChanger.cs.meta +11 -11
- package/Implementation/ActorTrialSpriteChanger.cs +46 -46
- package/Implementation/ActorTrialSpriteChanger.cs.meta +11 -11
- package/Implementation/ChangeLastSpriteEvent.cs +92 -92
- package/Implementation/ChangeLastSpriteEvent.cs.meta +11 -11
- package/Implementation/WorldSpriteChanger.cs +207 -207
- package/Implementation/WorldSpriteChanger.cs.meta +11 -11
- package/Implementation.meta +8 -8
- package/LayerHandler.cs +30 -30
- package/LayerHandler.cs.meta +11 -11
- package/{Samples → Samples~}/Actor.prefab +581 -581
- package/{Samples → Samples~}/Actor.prefab.meta +7 -7
- package/{Samples → Samples~}/Actor_Body_Debugger.prefab +68 -68
- package/{Samples → Samples~}/Actor_Body_Debugger.prefab.meta +7 -7
- package/{Samples → Samples~}/Actor_Check_Focus_Event.prefab +47 -47
- package/{Samples → Samples~}/Actor_Check_Focus_Event.prefab.meta +7 -7
- package/{Samples → Samples~}/Actor_Event_Handlers.prefab +668 -668
- package/{Samples → Samples~}/Actor_Event_Handlers.prefab.meta +7 -7
- package/{Samples → Samples~}/Actor_Fade_Handler.prefab +137 -137
- package/{Samples → Samples~}/Actor_Fade_Handler.prefab.meta +7 -7
- package/{Samples → Samples~}/Actor_Fade_Handler_Render_Q.prefab +137 -137
- package/{Samples → Samples~}/Actor_Fade_Handler_Render_Q.prefab.meta +7 -7
- package/{Samples → Samples~}/Actor_Faint_Event.prefab +71 -71
- package/{Samples → Samples~}/Actor_Faint_Event.prefab.meta +7 -7
- package/{Samples → Samples~}/Actor_Faint_Event_Render_Q.prefab +73 -73
- package/{Samples → Samples~}/Actor_Faint_Event_Render_Q.prefab.meta +7 -7
- package/{Samples → Samples~}/Actor_Focus_Handler.prefab +168 -168
- package/{Samples → Samples~}/Actor_Focus_Handler.prefab.meta +7 -7
- package/{Samples → Samples~}/Actor_Focus_Handler_Shell.prefab +56 -56
- package/{Samples → Samples~}/Actor_Focus_Handler_Shell.prefab.meta +7 -7
- package/{Samples → Samples~}/Actor_Focus_Load_End.prefab +66 -66
- package/{Samples → Samples~}/Actor_Focus_Load_End.prefab.meta +7 -7
- package/{Samples → Samples~}/Actor_Focus_Prepare.prefab +49 -49
- package/{Samples → Samples~}/Actor_Focus_Prepare.prefab.meta +7 -7
- package/{Samples → Samples~}/Actor_Focus_Resolve.prefab +48 -48
- package/{Samples → Samples~}/Actor_Focus_Resolve.prefab.meta +7 -7
- package/{Samples → Samples~}/Actor_Leave_Handler.prefab +141 -141
- package/{Samples → Samples~}/Actor_Leave_Handler.prefab.meta +7 -7
- package/{Samples → Samples~}/Actor_Leave_Handler_Render_Q.prefab +141 -141
- package/{Samples → Samples~}/Actor_Leave_Handler_Render_Q.prefab.meta +7 -7
- package/{Samples → Samples~}/Actor_Organizer.prefab +49 -49
- package/{Samples → Samples~}/Actor_Organizer.prefab.meta +7 -7
- package/{Samples → Samples~}/Actor_Sprite_Changer.prefab +163 -163
- package/{Samples → Samples~}/Actor_Sprite_Changer.prefab.meta +7 -7
- package/{Samples → Samples~}/Actor_Sprite_Changer_Shell.prefab +51 -51
- package/{Samples → Samples~}/Actor_Sprite_Changer_Shell.prefab.meta +7 -7
- package/{Samples → Samples~}/Actor_Sprite_Fader.prefab +52 -52
- package/{Samples → Samples~}/Actor_Sprite_Fader.prefab.meta +7 -7
- package/{Samples → Samples~}/Actor_Sprite_Fader_Render_Q.prefab +54 -54
- package/{Samples → Samples~}/Actor_Sprite_Fader_Render_Q.prefab.meta +7 -7
- package/{Samples → Samples~}/Actor_Trial_Sprite_Changer.prefab +47 -47
- package/{Samples → Samples~}/Actor_Trial_Sprite_Changer.prefab.meta +7 -7
- package/{Samples → Samples~}/Change_Last_Focus_Event.prefab +66 -66
- package/{Samples → Samples~}/Change_Last_Focus_Event.prefab.meta +7 -7
- package/{Samples → Samples~}/Change_Last_Sprite_Event.prefab +49 -49
- package/{Samples → Samples~}/Change_Last_Sprite_Event.prefab.meta +7 -7
- package/{Samples → Samples~}/Change_Last_World_Sprite_Event.prefab +186 -186
- package/{Samples → Samples~}/Change_Last_World_Sprite_Event.prefab.meta +7 -7
- package/{Samples → Samples~}/Focus_Handler.prefab +49 -49
- package/{Samples → Samples~}/Focus_Handler.prefab.meta +7 -7
- package/{Samples → Samples~}/Move_Character_Event.prefab +51 -51
- package/{Samples → Samples~}/Move_Character_Event.prefab.meta +7 -7
- package/{Samples → Samples~}/World_Sprite_Changer.prefab +51 -51
- package/{Samples → Samples~}/World_Sprite_Changer.prefab.meta +7 -7
- package/package.json +43 -38
- package/package.json.meta +7 -7
- package/Samples.meta +0 -8
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
1
|
+
fileFormatVersion: 2
|
|
2
2
|
guid: 0e8667f3c4efdb94fab7256e8e0f4eea
|
|
@@ -1,119 +1,119 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using DREditor.Characters;
|
|
3
|
-
using DREditor.Dialogues;
|
|
4
|
-
using DREditor.Editor.Dialogues;
|
|
5
|
-
using DREditor.Editor.Utility;
|
|
6
|
-
using System.Linq;
|
|
7
|
-
using System.Text.RegularExpressions;
|
|
8
|
-
using UnityEditor;
|
|
9
|
-
using UnityEngine;
|
|
10
|
-
|
|
11
|
-
namespace DREditor.Actors.Editor
|
|
12
|
-
{
|
|
13
|
-
/// <summary>
|
|
14
|
-
///
|
|
15
|
-
/// </summary>
|
|
16
|
-
public static class CharacterUtility
|
|
17
|
-
{
|
|
18
|
-
/// <summary>
|
|
19
|
-
///
|
|
20
|
-
/// </summary>
|
|
21
|
-
/// <remarks>
|
|
22
|
-
///
|
|
23
|
-
/// </remarks>
|
|
24
|
-
[MenuItem("DREditor/Characters/Sort Expressions by their numbers")]
|
|
25
|
-
public static void SortSelectedCharactersExpressionSprites()
|
|
26
|
-
{
|
|
27
|
-
UnityEngine.Debug.Log("REPORT: Starting sort.");
|
|
28
|
-
|
|
29
|
-
var selections = Selection.objects;
|
|
30
|
-
|
|
31
|
-
foreach (var obj in selections)
|
|
32
|
-
{
|
|
33
|
-
if (obj is Character character)
|
|
34
|
-
{
|
|
35
|
-
character.SetExpressions(character.Expressions.OrderBy(expression => PadNumbers(expression.Name)).ToList());
|
|
36
|
-
|
|
37
|
-
character.SetSprites(character.Sprites.OrderBy(unlit => PadNumbers(unlit.Name)).ToList());
|
|
38
|
-
|
|
39
|
-
EditorUtility.SetDirty(character);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
UnityEngine.Debug.Log("REPORT: Sorting complete. If a Character asset was selected it has been set dirty.");
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/// <summary>
|
|
47
|
-
///
|
|
48
|
-
/// </summary>
|
|
49
|
-
/// <param name="input"></param>
|
|
50
|
-
/// <returns></returns>
|
|
51
|
-
/// <remarks></remarks>
|
|
52
|
-
public static string PadNumbers(string input) => Regex.Replace(input, "[0-9]+", match => match.Value.PadLeft(10, '0'));
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
/// <summary>
|
|
56
|
-
///
|
|
57
|
-
/// </summary>
|
|
58
|
-
[MenuItem("DREditor/Characters/Create Dialogue With All Sprites", true)]
|
|
59
|
-
public static bool ValidateCreateDialogueWithAllSprites() =>
|
|
60
|
-
Selection.objects.OfType<Character>().Count() > 0;
|
|
61
|
-
|
|
62
|
-
/// <summary>
|
|
63
|
-
///
|
|
64
|
-
/// </summary>
|
|
65
|
-
[MenuItem("DREditor/Characters/Create Dialogue With All Sprites")]
|
|
66
|
-
public static void CreateDialogueWithAllSprites()
|
|
67
|
-
{
|
|
68
|
-
AssetDatabase.StartAssetEditing();
|
|
69
|
-
|
|
70
|
-
DatabaseUtility.InitializeDatabase(null, out CharacterDatabase database);
|
|
71
|
-
|
|
72
|
-
if (database == null)
|
|
73
|
-
database = Resources.Load<CharacterDatabase>("Characters/CharacterDatabase");
|
|
74
|
-
|
|
75
|
-
Character selectedCharacter = Selection.objects.OfType<Character>().First();
|
|
76
|
-
|
|
77
|
-
Dialogue dialogue = CreateCharacterDialogueAsset<Dialogue>(
|
|
78
|
-
folderPath: "Dialogues/Debugging/Sprites",
|
|
79
|
-
assetName: "D_" + selectedCharacter.name + "_Debug_Sprites");
|
|
80
|
-
|
|
81
|
-
int speakerIndex = database.Characters.IndexOf(selectedCharacter);
|
|
82
|
-
|
|
83
|
-
dialogue.lines.Add(new Line(selectedCharacter, speakerIndex));
|
|
84
|
-
|
|
85
|
-
new DialogueDebugToolEditor<Line>().ReplaceWithFirstLineCharactersSprites(dialogue, true);
|
|
86
|
-
|
|
87
|
-
AssetDatabase.StopAssetEditing();
|
|
88
|
-
|
|
89
|
-
AssetDatabase.SaveAssets();
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/// <summary>
|
|
93
|
-
///
|
|
94
|
-
/// </summary>
|
|
95
|
-
/// <typeparam name="T"></typeparam>
|
|
96
|
-
/// <param name="folderPath"></param>
|
|
97
|
-
/// <param name="assetName"></param>
|
|
98
|
-
/// <param name="dialogue"></param>
|
|
99
|
-
/// <returns></returns>
|
|
100
|
-
public static T CreateCharacterDialogueAsset<T>(string folderPath, string assetName, T dialogue = null) where T : DialogueCore
|
|
101
|
-
{
|
|
102
|
-
if (dialogue == null)
|
|
103
|
-
dialogue = (T)ScriptableObject.CreateInstance(typeof(T));
|
|
104
|
-
|
|
105
|
-
using (new AssetDatabase.AssetEditingScope())
|
|
106
|
-
{
|
|
107
|
-
dialogue.SetName(assetName);
|
|
108
|
-
|
|
109
|
-
string assetPath = FolderUtility.CreateIntermediateFolders(folderPath) + "/" + assetName + ".asset";
|
|
110
|
-
|
|
111
|
-
AssetDatabase.CreateAsset(dialogue, assetPath);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
AssetDatabase.SaveAssets();
|
|
115
|
-
|
|
116
|
-
return dialogue;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.Characters;
|
|
3
|
+
using DREditor.Dialogues;
|
|
4
|
+
using DREditor.Editor.Dialogues;
|
|
5
|
+
using DREditor.Editor.Utility;
|
|
6
|
+
using System.Linq;
|
|
7
|
+
using System.Text.RegularExpressions;
|
|
8
|
+
using UnityEditor;
|
|
9
|
+
using UnityEngine;
|
|
10
|
+
|
|
11
|
+
namespace DREditor.Actors.Editor
|
|
12
|
+
{
|
|
13
|
+
/// <summary>
|
|
14
|
+
///
|
|
15
|
+
/// </summary>
|
|
16
|
+
public static class CharacterUtility
|
|
17
|
+
{
|
|
18
|
+
/// <summary>
|
|
19
|
+
///
|
|
20
|
+
/// </summary>
|
|
21
|
+
/// <remarks>
|
|
22
|
+
///
|
|
23
|
+
/// </remarks>
|
|
24
|
+
[MenuItem("DREditor/Characters/Sort Expressions by their numbers")]
|
|
25
|
+
public static void SortSelectedCharactersExpressionSprites()
|
|
26
|
+
{
|
|
27
|
+
UnityEngine.Debug.Log("REPORT: Starting sort.");
|
|
28
|
+
|
|
29
|
+
var selections = Selection.objects;
|
|
30
|
+
|
|
31
|
+
foreach (var obj in selections)
|
|
32
|
+
{
|
|
33
|
+
if (obj is Character character)
|
|
34
|
+
{
|
|
35
|
+
character.SetExpressions(character.Expressions.OrderBy(expression => PadNumbers(expression.Name)).ToList());
|
|
36
|
+
|
|
37
|
+
character.SetSprites(character.Sprites.OrderBy(unlit => PadNumbers(unlit.Name)).ToList());
|
|
38
|
+
|
|
39
|
+
EditorUtility.SetDirty(character);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
UnityEngine.Debug.Log("REPORT: Sorting complete. If a Character asset was selected it has been set dirty.");
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/// <summary>
|
|
47
|
+
///
|
|
48
|
+
/// </summary>
|
|
49
|
+
/// <param name="input"></param>
|
|
50
|
+
/// <returns></returns>
|
|
51
|
+
/// <remarks></remarks>
|
|
52
|
+
public static string PadNumbers(string input) => Regex.Replace(input, "[0-9]+", match => match.Value.PadLeft(10, '0'));
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
/// <summary>
|
|
56
|
+
///
|
|
57
|
+
/// </summary>
|
|
58
|
+
[MenuItem("DREditor/Characters/Create Dialogue With All Sprites", true)]
|
|
59
|
+
public static bool ValidateCreateDialogueWithAllSprites() =>
|
|
60
|
+
Selection.objects.OfType<Character>().Count() > 0;
|
|
61
|
+
|
|
62
|
+
/// <summary>
|
|
63
|
+
///
|
|
64
|
+
/// </summary>
|
|
65
|
+
[MenuItem("DREditor/Characters/Create Dialogue With All Sprites")]
|
|
66
|
+
public static void CreateDialogueWithAllSprites()
|
|
67
|
+
{
|
|
68
|
+
AssetDatabase.StartAssetEditing();
|
|
69
|
+
|
|
70
|
+
DatabaseUtility.InitializeDatabase(null, out CharacterDatabase database);
|
|
71
|
+
|
|
72
|
+
if (database == null)
|
|
73
|
+
database = Resources.Load<CharacterDatabase>("Characters/CharacterDatabase");
|
|
74
|
+
|
|
75
|
+
Character selectedCharacter = Selection.objects.OfType<Character>().First();
|
|
76
|
+
|
|
77
|
+
Dialogue dialogue = CreateCharacterDialogueAsset<Dialogue>(
|
|
78
|
+
folderPath: "Dialogues/Debugging/Sprites",
|
|
79
|
+
assetName: "D_" + selectedCharacter.name + "_Debug_Sprites");
|
|
80
|
+
|
|
81
|
+
int speakerIndex = database.Characters.IndexOf(selectedCharacter);
|
|
82
|
+
|
|
83
|
+
dialogue.lines.Add(new Line(selectedCharacter, speakerIndex));
|
|
84
|
+
|
|
85
|
+
new DialogueDebugToolEditor<Line>().ReplaceWithFirstLineCharactersSprites(dialogue, true);
|
|
86
|
+
|
|
87
|
+
AssetDatabase.StopAssetEditing();
|
|
88
|
+
|
|
89
|
+
AssetDatabase.SaveAssets();
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/// <summary>
|
|
93
|
+
///
|
|
94
|
+
/// </summary>
|
|
95
|
+
/// <typeparam name="T"></typeparam>
|
|
96
|
+
/// <param name="folderPath"></param>
|
|
97
|
+
/// <param name="assetName"></param>
|
|
98
|
+
/// <param name="dialogue"></param>
|
|
99
|
+
/// <returns></returns>
|
|
100
|
+
public static T CreateCharacterDialogueAsset<T>(string folderPath, string assetName, T dialogue = null) where T : DialogueCore
|
|
101
|
+
{
|
|
102
|
+
if (dialogue == null)
|
|
103
|
+
dialogue = (T)ScriptableObject.CreateInstance(typeof(T));
|
|
104
|
+
|
|
105
|
+
using (new AssetDatabase.AssetEditingScope())
|
|
106
|
+
{
|
|
107
|
+
dialogue.SetName(assetName);
|
|
108
|
+
|
|
109
|
+
string assetPath = FolderUtility.CreateIntermediateFolders(folderPath) + "/" + assetName + ".asset";
|
|
110
|
+
|
|
111
|
+
AssetDatabase.CreateAsset(dialogue, assetPath);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
AssetDatabase.SaveAssets();
|
|
115
|
+
|
|
116
|
+
return dialogue;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: e1f2d6ada9d6082488db7cea604d1cf8
|
|
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: e1f2d6ada9d6082488db7cea604d1cf8
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|