net.dreditor.uispritehandling 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.
Binary file
@@ -1,42 +1,42 @@
1
- //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
- using DREditor.Dialogues.Events;
3
- using System;
4
- using UnityEngine;
5
-
6
-
7
- #if UNITY_EDITOR
8
- using DREditor.Editor.Utility;
9
- #endif
10
-
11
- namespace DREditor.UISpriteHandling
12
- {
13
- /// <summary>
14
- ///
15
- /// </summary>
16
- [Serializable]
17
- public class ChangeUISpriteEventData : IDataCapsulate
18
- {
19
- /// <summary>
20
- ///
21
- /// </summary>
22
- public CharacterUISpriteData characterUIData = null;
23
-
24
-
25
- #if UNITY_EDITOR
26
- /// <inheritdoc/>
27
- public void Display(object o)
28
- {
29
- HandyFields.Label("The data for telling the protag manager how to swap the protag.");
30
-
31
- characterUIData = HandyFields.UnityField(new GUIContent("CharacterUIData:",
32
- "Asset containing info related to how a character sprite is displayed to the UI."),
33
- characterUIData);
34
- }
35
- #else
36
- public void Display(object o = null)
37
- {
38
-
39
- }
40
- #endif
41
- }
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using DREditor.Dialogues.Events;
3
+ using System;
4
+ using UnityEngine;
5
+
6
+
7
+ #if UNITY_EDITOR
8
+ using DREditor.Editor.Utility;
9
+ #endif
10
+
11
+ namespace DREditor.UISpriteHandling
12
+ {
13
+ /// <summary>
14
+ ///
15
+ /// </summary>
16
+ [Serializable]
17
+ public class ChangeUISpriteEventData : IDataCapsulate
18
+ {
19
+ /// <summary>
20
+ ///
21
+ /// </summary>
22
+ public CharacterUISpriteData characterUIData = null;
23
+
24
+
25
+ #if UNITY_EDITOR
26
+ /// <inheritdoc/>
27
+ public void Display(object o)
28
+ {
29
+ HandyFields.Label("The data for telling the protag manager how to swap the protag.");
30
+
31
+ characterUIData = HandyFields.UnityField(new GUIContent("CharacterUIData:",
32
+ "Asset containing info related to how a character sprite is displayed to the UI."),
33
+ characterUIData);
34
+ }
35
+ #else
36
+ public void Display(object o = null)
37
+ {
38
+
39
+ }
40
+ #endif
41
+ }
42
42
  }
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: 0f0f9f49d8e489544880d9dc460f6671
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: 0f0f9f49d8e489544880d9dc460f6671
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -1,48 +1,48 @@
1
- //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
- using UnityEngine;
3
-
4
- namespace DREditor.UISpriteHandling
5
- {
6
- /// <summary>
7
- ///
8
- /// </summary>
9
- [System.Serializable]
10
- [CreateAssetMenu(menuName = "DREditor/Characters/Protag UI Sprite Data", fileName = "UI Sprite Data")]
11
- public class CharacterUISpriteData : ScriptableObject
12
- {
13
- /// <summary>
14
- ///
15
- /// </summary>
16
- [Header("")]
17
- public string charName = string.Empty;
18
-
19
- /// <summary>
20
- ///
21
- /// </summary>
22
- public float x = 0;
23
-
24
- /// <summary>
25
- ///
26
- /// </summary>
27
- public float y = 0;
28
-
29
-
30
- /// <summary>
31
- ///
32
- /// </summary>
33
- /// <param name="charName"></param>
34
- public virtual void SetCharacterName(string charName) => this.charName = charName;
35
-
36
- /// <summary>
37
- ///
38
- /// </summary>
39
- /// <param name="x"></param>
40
- /// <param name="y"></param>
41
- public virtual void SetSpritePosition(float x, float y)
42
- {
43
- this.x = x;
44
-
45
- this.y = y;
46
- }
47
- }
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using UnityEngine;
3
+
4
+ namespace DREditor.UISpriteHandling
5
+ {
6
+ /// <summary>
7
+ ///
8
+ /// </summary>
9
+ [System.Serializable]
10
+ [CreateAssetMenu(menuName = "DREditor/Characters/Protag UI Sprite Data", fileName = "UI Sprite Data")]
11
+ public class CharacterUISpriteData : ScriptableObject
12
+ {
13
+ /// <summary>
14
+ ///
15
+ /// </summary>
16
+ [Header("")]
17
+ public string charName = string.Empty;
18
+
19
+ /// <summary>
20
+ ///
21
+ /// </summary>
22
+ public float x = 0;
23
+
24
+ /// <summary>
25
+ ///
26
+ /// </summary>
27
+ public float y = 0;
28
+
29
+
30
+ /// <summary>
31
+ ///
32
+ /// </summary>
33
+ /// <param name="charName"></param>
34
+ public virtual void SetCharacterName(string charName) => this.charName = charName;
35
+
36
+ /// <summary>
37
+ ///
38
+ /// </summary>
39
+ /// <param name="x"></param>
40
+ /// <param name="y"></param>
41
+ public virtual void SetSpritePosition(float x, float y)
42
+ {
43
+ this.x = x;
44
+
45
+ this.y = y;
46
+ }
47
+ }
48
48
  }
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: 8c56e321ab86add4e8d80d20b6453c54
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: 8c56e321ab86add4e8d80d20b6453c54
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -1,19 +1,19 @@
1
- {
2
- "name": "DREditor.UISpriteHandling",
3
- "rootNamespace": "",
4
- "references": [
5
- "DREditor",
6
- "DREditor.DialogueEventHandling",
7
- "DREditor.Editor",
8
- "DG.Tweening"
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.UISpriteHandling",
3
+ "rootNamespace": "",
4
+ "references": [
5
+ "DREditor",
6
+ "DREditor.DialogueEventHandling",
7
+ "DREditor.Editor",
8
+ "DG.Tweening"
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: de30b9bb7d7287342a302106da214372
3
- AssemblyDefinitionImporter:
4
- externalObjects: {}
5
- userData:
6
- assetBundleName:
7
- assetBundleVariant:
1
+ fileFormatVersion: 2
2
+ guid: de30b9bb7d7287342a302106da214372
3
+ AssemblyDefinitionImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant:
@@ -1,55 +1,55 @@
1
- //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
- using DREditor.Dialogues;
3
- using DREditor.Dialogues.Events;
4
- using DREditor.Dialogues.LineReading;
5
- using DREditor.Dialogues.Loading;
6
- using DREditor.EventObjects;
7
- using UnityEngine;
8
-
9
- namespace DREditor.UISpriteHandling
10
- {
11
- /// <summary>
12
- ///
13
- /// </summary>
14
- [ClassHeader(nameof(DialogueComponent) + ", " + nameof(ILineProcessor) + ", " + nameof(ILoadToLineEnd) +
15
- "\n\n")]
16
- public class ProtagUISpriteHandler : DialogueComponent, ILineProcessor, ILoadToLineEnd
17
- {
18
- /// <summary>
19
- ///
20
- /// </summary>
21
- [Header("")]
22
- [Divider]
23
- [Tooltip("")]
24
- [SerializeField] protected BoolWithEvent isProtagSpeaking = null;
25
-
26
- /// <summary>
27
- ///
28
- /// </summary>
29
- [Tooltip("")]
30
- [SerializeField] protected string spriteLineEvent = "ProtagSpriteLineEvent";
31
-
32
- /// <summary>
33
- ///
34
- /// </summary>
35
- [Tooltip("")]
36
- [SerializeField] protected string loadToLineEndEvent = "ProtagLoadToLineEndSpriteEvent";
37
-
38
-
39
- /// <inheritdoc/>
40
- public virtual void LineProcess(Line currentLine)
41
- {
42
- bool expressionIsValid = currentLine.Expression != null && currentLine.Expression.Sprite != null;
43
-
44
- if (isProtagSpeaking.Value && expressionIsValid)
45
- DialogueEventSystem.TriggerEvent(spriteLineEvent, currentLine);
46
- }
47
-
48
- /// <inheritdoc/>
49
- public virtual void OnLoadToLineEnd(Line currentLine)
50
- {
51
- if (isProtagSpeaking.Value)
52
- DialogueEventSystem.TriggerEvent(loadToLineEndEvent, currentLine);
53
- }
54
- }
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using DREditor.Dialogues;
3
+ using DREditor.Dialogues.Events;
4
+ using DREditor.Dialogues.LineReading;
5
+ using DREditor.Dialogues.Loading;
6
+ using DREditor.EventObjects;
7
+ using UnityEngine;
8
+
9
+ namespace DREditor.UISpriteHandling
10
+ {
11
+ /// <summary>
12
+ ///
13
+ /// </summary>
14
+ [ClassHeader(nameof(DialogueComponent) + ", " + nameof(ILineProcessor) + ", " + nameof(ILoadToLineEnd) +
15
+ "\n\n")]
16
+ public class ProtagUISpriteHandler : DialogueComponent, ILineProcessor, ILoadToLineEnd
17
+ {
18
+ /// <summary>
19
+ ///
20
+ /// </summary>
21
+ [Header("")]
22
+ [Divider]
23
+ [Tooltip("")]
24
+ [SerializeField] protected BoolWithEvent isProtagSpeaking = null;
25
+
26
+ /// <summary>
27
+ ///
28
+ /// </summary>
29
+ [Tooltip("")]
30
+ [SerializeField] protected string spriteLineEvent = "ProtagSpriteLineEvent";
31
+
32
+ /// <summary>
33
+ ///
34
+ /// </summary>
35
+ [Tooltip("")]
36
+ [SerializeField] protected string loadToLineEndEvent = "ProtagLoadToLineEndSpriteEvent";
37
+
38
+
39
+ /// <inheritdoc/>
40
+ public virtual void LineProcess(Line currentLine)
41
+ {
42
+ bool expressionIsValid = currentLine.Expression != null && currentLine.Expression.Sprite != null;
43
+
44
+ if (isProtagSpeaking.Value && expressionIsValid)
45
+ DialogueEventSystem.TriggerEvent(spriteLineEvent, currentLine);
46
+ }
47
+
48
+ /// <inheritdoc/>
49
+ public virtual void OnLoadToLineEnd(Line currentLine)
50
+ {
51
+ if (isProtagSpeaking.Value)
52
+ DialogueEventSystem.TriggerEvent(loadToLineEndEvent, currentLine);
53
+ }
54
+ }
55
55
  }
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: 3895a6a72fb86284d852a2df73b93422
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: 3895a6a72fb86284d852a2df73b93422
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -1,17 +1,17 @@
1
- %YAML 1.1
2
- %TAG !u! tag:unity3d.com,2011:
3
- --- !u!114 &11400000
4
- MonoBehaviour:
5
- m_ObjectHideFlags: 0
6
- m_CorrespondingSourceObject: {fileID: 0}
7
- m_PrefabInstance: {fileID: 0}
8
- m_PrefabAsset: {fileID: 0}
9
- m_GameObject: {fileID: 0}
10
- m_Enabled: 1
11
- m_EditorHideFlags: 0
12
- m_Script: {fileID: 11500000, guid: 8c56e321ab86add4e8d80d20b6453c54, type: 3}
13
- m_Name: Default_Protag_Data
14
- m_EditorClassIdentifier:
15
- charName:
16
- x: -72
17
- y: -298
1
+ %YAML 1.1
2
+ %TAG !u! tag:unity3d.com,2011:
3
+ --- !u!114 &11400000
4
+ MonoBehaviour:
5
+ m_ObjectHideFlags: 0
6
+ m_CorrespondingSourceObject: {fileID: 0}
7
+ m_PrefabInstance: {fileID: 0}
8
+ m_PrefabAsset: {fileID: 0}
9
+ m_GameObject: {fileID: 0}
10
+ m_Enabled: 1
11
+ m_EditorHideFlags: 0
12
+ m_Script: {fileID: 11500000, guid: 8c56e321ab86add4e8d80d20b6453c54, type: 3}
13
+ m_Name: Default_Protag_Data
14
+ m_EditorClassIdentifier:
15
+ charName:
16
+ x: -72
17
+ y: -298
@@ -1,8 +1,8 @@
1
- fileFormatVersion: 2
2
- guid: 50adb13503517454cb5903edc77b6ae8
3
- NativeFormatImporter:
4
- externalObjects: {}
5
- mainObjectFileID: 11400000
6
- userData:
7
- assetBundleName:
8
- assetBundleVariant:
1
+ fileFormatVersion: 2
2
+ guid: 50adb13503517454cb5903edc77b6ae8
3
+ NativeFormatImporter:
4
+ externalObjects: {}
5
+ mainObjectFileID: 11400000
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
@@ -1,17 +1,17 @@
1
- %YAML 1.1
2
- %TAG !u! tag:unity3d.com,2011:
3
- --- !u!114 &11400000
4
- MonoBehaviour:
5
- m_ObjectHideFlags: 0
6
- m_CorrespondingSourceObject: {fileID: 0}
7
- m_PrefabInstance: {fileID: 0}
8
- m_PrefabAsset: {fileID: 0}
9
- m_GameObject: {fileID: 0}
10
- m_Enabled: 1
11
- m_EditorHideFlags: 0
12
- m_Script: {fileID: 11500000, guid: 8c56e321ab86add4e8d80d20b6453c54, type: 3}
13
- m_Name: Load_Protag_Data
14
- m_EditorClassIdentifier:
15
- charName:
16
- x: -72
17
- y: -298
1
+ %YAML 1.1
2
+ %TAG !u! tag:unity3d.com,2011:
3
+ --- !u!114 &11400000
4
+ MonoBehaviour:
5
+ m_ObjectHideFlags: 0
6
+ m_CorrespondingSourceObject: {fileID: 0}
7
+ m_PrefabInstance: {fileID: 0}
8
+ m_PrefabAsset: {fileID: 0}
9
+ m_GameObject: {fileID: 0}
10
+ m_Enabled: 1
11
+ m_EditorHideFlags: 0
12
+ m_Script: {fileID: 11500000, guid: 8c56e321ab86add4e8d80d20b6453c54, type: 3}
13
+ m_Name: Load_Protag_Data
14
+ m_EditorClassIdentifier:
15
+ charName:
16
+ x: -72
17
+ y: -298
@@ -1,8 +1,8 @@
1
- fileFormatVersion: 2
2
- guid: bb9d6894c211f3f46883777595ba789e
3
- NativeFormatImporter:
4
- externalObjects: {}
5
- mainObjectFileID: 11400000
6
- userData:
7
- assetBundleName:
8
- assetBundleVariant:
1
+ fileFormatVersion: 2
2
+ guid: bb9d6894c211f3f46883777595ba789e
3
+ NativeFormatImporter:
4
+ externalObjects: {}
5
+ mainObjectFileID: 11400000
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
@@ -1,49 +1,49 @@
1
- %YAML 1.1
2
- %TAG !u! tag:unity3d.com,2011:
3
- --- !u!1 &6081190874047259582
4
- GameObject:
5
- m_ObjectHideFlags: 0
6
- m_CorrespondingSourceObject: {fileID: 0}
7
- m_PrefabInstance: {fileID: 0}
8
- m_PrefabAsset: {fileID: 0}
9
- serializedVersion: 6
10
- m_Component:
11
- - component: {fileID: 6081190874047259577}
12
- - component: {fileID: 6081190874047259576}
13
- m_Layer: 0
14
- m_Name: Protag_UI_Sprite_Handler
15
- m_TagString: Untagged
16
- m_Icon: {fileID: 0}
17
- m_NavMeshLayer: 0
18
- m_StaticEditorFlags: 0
19
- m_IsActive: 1
20
- --- !u!4 &6081190874047259577
21
- Transform:
22
- m_ObjectHideFlags: 0
23
- m_CorrespondingSourceObject: {fileID: 0}
24
- m_PrefabInstance: {fileID: 0}
25
- m_PrefabAsset: {fileID: 0}
26
- m_GameObject: {fileID: 6081190874047259582}
27
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
28
- m_LocalPosition: {x: 0, y: 0, z: 0}
29
- m_LocalScale: {x: 1, y: 1, z: 1}
30
- m_ConstrainProportionsScale: 0
31
- m_Children: []
32
- m_Father: {fileID: 0}
33
- m_RootOrder: 0
34
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
35
- --- !u!114 &6081190874047259576
36
- MonoBehaviour:
37
- m_ObjectHideFlags: 0
38
- m_CorrespondingSourceObject: {fileID: 0}
39
- m_PrefabInstance: {fileID: 0}
40
- m_PrefabAsset: {fileID: 0}
41
- m_GameObject: {fileID: 6081190874047259582}
42
- m_Enabled: 1
43
- m_EditorHideFlags: 0
44
- m_Script: {fileID: 11500000, guid: 3895a6a72fb86284d852a2df73b93422, type: 3}
45
- m_Name:
46
- m_EditorClassIdentifier:
47
- isProtagSpeaking: {fileID: 11400000, guid: 7f279787522335d4c84256f3890a6ced, type: 2}
48
- spriteLineEvent: ProtagSpriteLineEvent
49
- loadToLineEndEvent: ProtagLoadToLineEndSpriteEvent
1
+ %YAML 1.1
2
+ %TAG !u! tag:unity3d.com,2011:
3
+ --- !u!1 &6081190874047259582
4
+ GameObject:
5
+ m_ObjectHideFlags: 0
6
+ m_CorrespondingSourceObject: {fileID: 0}
7
+ m_PrefabInstance: {fileID: 0}
8
+ m_PrefabAsset: {fileID: 0}
9
+ serializedVersion: 6
10
+ m_Component:
11
+ - component: {fileID: 6081190874047259577}
12
+ - component: {fileID: 6081190874047259576}
13
+ m_Layer: 0
14
+ m_Name: Protag_UI_Sprite_Handler
15
+ m_TagString: Untagged
16
+ m_Icon: {fileID: 0}
17
+ m_NavMeshLayer: 0
18
+ m_StaticEditorFlags: 0
19
+ m_IsActive: 1
20
+ --- !u!4 &6081190874047259577
21
+ Transform:
22
+ m_ObjectHideFlags: 0
23
+ m_CorrespondingSourceObject: {fileID: 0}
24
+ m_PrefabInstance: {fileID: 0}
25
+ m_PrefabAsset: {fileID: 0}
26
+ m_GameObject: {fileID: 6081190874047259582}
27
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
28
+ m_LocalPosition: {x: 0, y: 0, z: 0}
29
+ m_LocalScale: {x: 1, y: 1, z: 1}
30
+ m_ConstrainProportionsScale: 0
31
+ m_Children: []
32
+ m_Father: {fileID: 0}
33
+ m_RootOrder: 0
34
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
35
+ --- !u!114 &6081190874047259576
36
+ MonoBehaviour:
37
+ m_ObjectHideFlags: 0
38
+ m_CorrespondingSourceObject: {fileID: 0}
39
+ m_PrefabInstance: {fileID: 0}
40
+ m_PrefabAsset: {fileID: 0}
41
+ m_GameObject: {fileID: 6081190874047259582}
42
+ m_Enabled: 1
43
+ m_EditorHideFlags: 0
44
+ m_Script: {fileID: 11500000, guid: 3895a6a72fb86284d852a2df73b93422, type: 3}
45
+ m_Name:
46
+ m_EditorClassIdentifier:
47
+ isProtagSpeaking: {fileID: 11400000, guid: 7f279787522335d4c84256f3890a6ced, type: 2}
48
+ spriteLineEvent: ProtagSpriteLineEvent
49
+ loadToLineEndEvent: ProtagLoadToLineEndSpriteEvent
@@ -1,7 +1,7 @@
1
- fileFormatVersion: 2
2
- guid: 7e9b798db7a7c434faf97bdd830a9662
3
- PrefabImporter:
4
- externalObjects: {}
5
- userData:
6
- assetBundleName:
7
- assetBundleVariant:
1
+ fileFormatVersion: 2
2
+ guid: 7e9b798db7a7c434faf97bdd830a9662
3
+ PrefabImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant: