net.dreditor.eventobjectservices 0.1.4 → 0.1.6

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.
Files changed (53) hide show
  1. package/BoolWithEventOnTitleScreen.cs +10 -0
  2. package/BoolWithEventOnTitleScreen.cs.meta +11 -0
  3. package/DREditor.EventObjectServices.asmdef +17 -0
  4. package/DREditor.EventObjectServices.asmdef.meta +7 -0
  5. package/EvaluateCamerasStates.cs +103 -0
  6. package/EvaluateCamerasStates.cs.meta +11 -0
  7. package/FloatWithEventListener.cs +10 -0
  8. package/FloatWithEventListener.cs.meta +11 -0
  9. package/FloatWithEventOnTitleScreen.cs +10 -0
  10. package/FloatWithEventOnTitleScreen.cs.meta +11 -0
  11. package/IntWithEventIndexListener.cs +25 -0
  12. package/IntWithEventIndexListener.cs.meta +11 -0
  13. package/IntWithEventListener.cs +10 -0
  14. package/IntWithEventListener.cs.meta +11 -0
  15. package/IntWithEventOnTitleScreen.cs +10 -0
  16. package/IntWithEventOnTitleScreen.cs.meta +11 -0
  17. package/InverseObjectStateBoolWithEvent.cs +50 -0
  18. package/InverseObjectStateBoolWithEvent.cs.meta +11 -0
  19. package/ObjectActiveOnChapterIndex.cs +84 -0
  20. package/ObjectActiveOnChapterIndex.cs.meta +11 -0
  21. package/ObjectNameDisplayer.cs +47 -0
  22. package/ObjectNameDisplayer.cs.meta +11 -0
  23. package/OptionWithEventListener.cs +57 -0
  24. package/OptionWithEventListener.cs.meta +11 -0
  25. package/ResetCharacterControllerOnEvent.cs +47 -0
  26. package/ResetCharacterControllerOnEvent.cs.meta +11 -0
  27. package/Samples/Float_With_Event_On_Title_Screen.prefab +48 -0
  28. package/{package.json.meta → Samples/Float_With_Event_On_Title_Screen.prefab.meta} +7 -7
  29. package/Samples/Int_With_Event_On_Title_Screen.prefab +48 -0
  30. package/Samples/Int_With_Event_On_Title_Screen.prefab.meta +7 -0
  31. package/Samples/Reset_Player.prefab +118 -0
  32. package/Samples/Reset_Player.prefab.meta +7 -0
  33. package/Samples/Selectable_Object_Manager.prefab +49 -0
  34. package/Samples/Selectable_Object_Manager.prefab.meta +7 -0
  35. package/Samples.meta +8 -0
  36. package/SceneEventOnStart.cs +27 -0
  37. package/SceneEventOnStart.cs.meta +11 -0
  38. package/SelectStringWithEvent.cs +44 -0
  39. package/SelectStringWithEvent.cs.meta +11 -0
  40. package/SelectableObjectManager.cs +45 -0
  41. package/SelectableObjectManager.cs.meta +11 -0
  42. package/SpriteOnIntEvent.cs +68 -0
  43. package/SpriteOnIntEvent.cs.meta +11 -0
  44. package/StringWithEventListener.cs +10 -0
  45. package/StringWithEventListener.cs.meta +11 -0
  46. package/TextWithEventListener.cs +46 -0
  47. package/TextWithEventListener.cs.meta +11 -0
  48. package/ValueWithEventListener.cs +60 -0
  49. package/ValueWithEventListener.cs.meta +11 -0
  50. package/ValueWithEventOnTitleScreen.cs +37 -0
  51. package/ValueWithEventOnTitleScreen.cs.meta +11 -0
  52. package/package.json +36 -29
  53. package/.attestation.p7m +0 -0
@@ -0,0 +1,10 @@
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using DREditor.EventObjects;
3
+
4
+ namespace DREditor.EventObjectServices
5
+ {
6
+ /// <summary>
7
+ ///
8
+ /// </summary>
9
+ public class BoolWithEventOnTitleScreen : ValueWithEventOnTitleScreen<bool, BoolEvent> { }
10
+ }
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: db5844c8a9f9b854e8ad7c6c0248de87
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "DREditor.EventObjectServices",
3
+ "rootNamespace": "",
4
+ "references": [
5
+ "DREditor",
6
+ "Unity.TextMeshPro"
7
+ ],
8
+ "includePlatforms": [],
9
+ "excludePlatforms": [],
10
+ "allowUnsafeCode": false,
11
+ "overrideReferences": false,
12
+ "precompiledReferences": [],
13
+ "autoReferenced": true,
14
+ "defineConstraints": [],
15
+ "versionDefines": [],
16
+ "noEngineReferences": false
17
+ }
@@ -0,0 +1,7 @@
1
+ fileFormatVersion: 2
2
+ guid: 95c6a2a7b0ff1224babbd19fa47b94e8
3
+ AssemblyDefinitionImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant:
@@ -0,0 +1,103 @@
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using DREditor.EventObjects;
3
+ using System.Collections.Generic;
4
+ using UnityEngine;
5
+
6
+ namespace DREditor.EventObjectServices
7
+ {
8
+ /// <summary>
9
+ ///
10
+ /// </summary>
11
+ [ClassHeader("")]
12
+ public class EvaluateCamerasStates : MonoBehaviour
13
+ {
14
+ /// <summary>
15
+ ///
16
+ /// </summary>
17
+ [Tooltip("")]
18
+ [SerializeField] protected BoolWithEvent inTrialMode = null;
19
+
20
+ /// <summary>
21
+ ///
22
+ /// </summary>
23
+ [Tooltip("")]
24
+ [SerializeField] protected BoolWithEvent inCGMode = null;
25
+
26
+ /// <summary>
27
+ ///
28
+ /// </summary>
29
+ [Tooltip("")]
30
+ [SerializeField] protected BoolWithEvent inVideoMode = null;
31
+
32
+ /// <summary>
33
+ ///
34
+ /// </summary>
35
+ [Tooltip("")]
36
+ [SerializeField] protected List<BoolWithEvent> cameras = new();
37
+
38
+
39
+ /// <summary>
40
+ ///
41
+ /// </summary>
42
+ protected virtual void Start() => StartListeningToEvents();
43
+
44
+ /// <summary>
45
+ ///
46
+ /// </summary>
47
+ protected virtual void StartListeningToEvents()
48
+ {
49
+ inTrialMode.AddListener(EvaluateInTrialState);
50
+
51
+ inCGMode.AddListener(EvaluateInCGState);
52
+
53
+ inVideoMode.AddListener(EvaluateInCGState);
54
+ }
55
+
56
+ /// <summary>
57
+ ///
58
+ /// </summary>
59
+ protected virtual void OnDisable() => StopListeningToEvents();
60
+
61
+ /// <summary>
62
+ ///
63
+ /// </summary>
64
+ protected virtual void StopListeningToEvents()
65
+ {
66
+ inTrialMode.RemoveListener(EvaluateInTrialState);
67
+
68
+ inCGMode.RemoveListener(EvaluateInCGState);
69
+
70
+ inVideoMode.RemoveListener(EvaluateInCGState);
71
+ }
72
+
73
+ /// <summary>
74
+ ///
75
+ /// </summary>
76
+ /// <param name="inTrial"></param>
77
+ protected virtual void EvaluateInTrialState(bool inTrial) => EnableCamerasTo(!inTrial);
78
+
79
+ /// <summary>
80
+ ///
81
+ /// </summary>
82
+ /// <param name="inCG"></param>
83
+ protected virtual void EvaluateInCGState(bool inCG)
84
+ {
85
+ if (!inTrialMode.Value)
86
+ EnableCamerasTo(!inCG);
87
+ }
88
+
89
+ /// <summary>
90
+ ///
91
+ /// </summary>
92
+ /// <param name="to"></param>
93
+ protected virtual void EnableCamerasTo(bool to)
94
+ {
95
+ foreach (BoolWithEvent camera in cameras)
96
+ if (camera != null)
97
+ camera.SetValue(to);
98
+ else
99
+ UnityEngine.Debug.Log($"{ToString()}: Canvases and Cameras states were not changed because " +
100
+ "a dialogue camera has not been found.");
101
+ }
102
+ }
103
+ }
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: ca23dba077d9f344bb165ec6dc377c27
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -0,0 +1,10 @@
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using DREditor.EventObjects;
3
+
4
+ namespace DREditor.EventObjectServices
5
+ {
6
+ /// <summary>
7
+ ///
8
+ /// </summary>
9
+ public class FloatWithEventListener : ValueWithEventListener<FloatWithEvent, float, FloatEvent> { }
10
+ }
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: 5c4b96edb4e5ff545ad287bdc200f777
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -0,0 +1,10 @@
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using DREditor.EventObjects;
3
+
4
+ namespace DREditor.EventObjectServices
5
+ {
6
+ /// <summary>
7
+ ///
8
+ /// </summary>
9
+ public class FloatWithEventOnTitleScreen : ValueWithEventOnTitleScreen<float, FloatEvent> { }
10
+ }
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: 164f5339acd8f69479293b15d23255e3
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -0,0 +1,25 @@
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using UnityEngine;
3
+
4
+ namespace DREditor.EventObjectServices
5
+ {
6
+ /// <summary>
7
+ ///
8
+ /// </summary>
9
+ [ClassHeader("")]
10
+ public class IntWithEventIndexListener : IntWithEventListener
11
+ {
12
+ /// <summary>
13
+ ///
14
+ /// </summary>
15
+ [Tooltip("")]
16
+ [SerializeField] protected int index = 0;
17
+
18
+ /// <inheritdoc/>
19
+ protected override void OnValueChanged(int updatedValue)
20
+ {
21
+ if (updatedValue == index)
22
+ base.OnValueChanged(updatedValue);
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: a49fae9bdc4131f44a1b2d9d89a20e56
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -0,0 +1,10 @@
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using DREditor.EventObjects;
3
+
4
+ namespace DREditor.EventObjectServices
5
+ {
6
+ /// <summary>
7
+ ///
8
+ /// </summary>
9
+ public class IntWithEventListener : ValueWithEventListener<IntWithEvent, int, IntEvent> { }
10
+ }
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: a733b090f68d71b4e8001b2dac684c19
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -0,0 +1,10 @@
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using DREditor.EventObjects;
3
+
4
+ namespace DREditor.EventObjectServices
5
+ {
6
+ /// <summary>
7
+ ///
8
+ /// </summary>
9
+ public class IntWithEventOnTitleScreen : ValueWithEventOnTitleScreen<int, IntEvent> { }
10
+ }
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: 5bc71ee10345ccc4298cc09d582eab08
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -0,0 +1,50 @@
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using DREditor.EventObjects;
3
+ using UnityEngine;
4
+
5
+ namespace DREditor.EventObjectServices
6
+ {
7
+ /// <summary>
8
+ ///
9
+ /// </summary>
10
+ /// <remarks></remarks>
11
+ public class InverseObjectStateBoolWithEvent : MonoBehaviour
12
+ {
13
+ /// <summary>
14
+ ///
15
+ /// </summary>
16
+ [Header("")]
17
+
18
+ [Space]
19
+
20
+ [Tooltip("")]
21
+ [SerializeField] protected BoolWithEvent boolWithEvent = null;
22
+
23
+ /// <summary>
24
+ ///
25
+ /// </summary>
26
+ [Tooltip("")]
27
+ [SerializeField] protected GameObject objectToSet = null;
28
+
29
+
30
+ /// <summary>
31
+ ///
32
+ /// </summary>
33
+ protected virtual void OnEnable() => boolWithEvent.AddListener(OnLeavingState);
34
+
35
+ /// <summary>
36
+ ///
37
+ /// </summary>
38
+ protected virtual void OnDisable() => boolWithEvent.RemoveListener(OnLeavingState);
39
+
40
+ /// <summary>
41
+ ///
42
+ /// </summary>
43
+ /// <param name="state"></param>
44
+ protected virtual void OnLeavingState(bool state)
45
+ {
46
+ if (objectToSet != null)
47
+ objectToSet.SetActive(!state);
48
+ }
49
+ }
50
+ }
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: 0d3f8dd2724f8ed4f9f65f923acd8da7
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -0,0 +1,84 @@
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using DREditor.EventObjects;
3
+ using System.Collections.Generic;
4
+ using UnityEngine;
5
+ using UnityEngine.Serialization;
6
+
7
+ namespace DREditor.EventObjectServices
8
+ {
9
+ /// <summary>
10
+ ///
11
+ /// </summary>
12
+ [ClassHeader("")]
13
+ public class ObjectActiveOnChapterIndex : SceneEventListener
14
+ {
15
+ /// <summary>
16
+ ///
17
+ /// </summary>
18
+ [Space]
19
+
20
+ [Space]
21
+
22
+ [Header("")]
23
+
24
+ [Tooltip("")]
25
+ [SerializeField] protected IntWithEvent currentChapterIndex = null;
26
+
27
+ /// <summary>
28
+ ///
29
+ /// </summary>
30
+ [Space]
31
+
32
+ [Tooltip("")]
33
+ [SerializeField] protected bool setObjectsActiveTo = false;
34
+
35
+ /// <summary>
36
+ ///
37
+ /// </summary>
38
+ [Space]
39
+
40
+ [FormerlySerializedAs("visibleChapterIndex")]
41
+ [Tooltip("")]
42
+ [SerializeField] protected List<int> visibleChapterIndexes = new();
43
+
44
+ /// <summary>
45
+ ///
46
+ /// </summary>
47
+ [Tooltip("")]
48
+ [SerializeField] protected List<GameObject> gameObjects = new();
49
+
50
+
51
+ /// <inheritdoc/>
52
+ public override void OnEventRaised()
53
+ {
54
+ base.OnEventRaised();
55
+
56
+ CheckLoad();
57
+ }
58
+
59
+ /// <summary>
60
+ ///
61
+ /// </summary>
62
+ protected virtual void CheckLoad()
63
+ {
64
+ if (ChapterMatchesVisibilityIndex())
65
+ SetGameObjectsActive();
66
+ }
67
+
68
+ /// <summary>
69
+ ///
70
+ /// </summary>
71
+ /// <returns></returns>
72
+ protected virtual bool ChapterMatchesVisibilityIndex()
73
+ => visibleChapterIndexes.Contains(currentChapterIndex.Value);
74
+
75
+ /// <summary>
76
+ ///
77
+ /// </summary>
78
+ protected virtual void SetGameObjectsActive()
79
+ {
80
+ foreach (var go in gameObjects)
81
+ go.SetActive(setObjectsActiveTo);
82
+ }
83
+ }
84
+ }
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: c7d27a74c3e88f44ab210743f4a369a9
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -0,0 +1,47 @@
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using DREditor.EventObjects;
3
+ using DREditor.Services;
4
+ using TMPro;
5
+ using UnityEngine;
6
+
7
+ namespace DREditor.EventObjectServices
8
+ {
9
+ /// <summary>
10
+ ///
11
+ /// </summary>
12
+ [ClassHeader(nameof(StringWithEventListener) + ", " + nameof(IToTitleScreen) +
13
+ "\n\n")]
14
+ public class ObjectNameDisplayer : StringWithEventListener, IToTitleScreen
15
+ {
16
+ /// <summary>
17
+ ///
18
+ /// </summary>
19
+ [Space]
20
+
21
+ [Header("")]
22
+ [Divider]
23
+ [Tooltip("")]
24
+ [SerializeField] protected BoolWithEvent displayNameVisible = null;
25
+
26
+ /// <summary>
27
+ ///
28
+ /// </summary>
29
+ [Tooltip("")]
30
+ [SerializeField] protected TextMeshProUGUI displayText = null;
31
+
32
+
33
+ /// <inheritdoc/>
34
+ protected override void OnValueChanged(string updatedValue)
35
+ {
36
+ base.OnValueChanged(updatedValue);
37
+
38
+ if (updatedValue != "")
39
+ displayText.text = updatedValue;
40
+
41
+ displayNameVisible.SetValue(updatedValue != "");
42
+ }
43
+
44
+ /// <inheritdoc/>
45
+ public virtual void ToTitleScreen() => displayNameVisible.SetValue(false);
46
+ }
47
+ }
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: 20237ba4483535c4a9b4b0acfe03a1cd
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -0,0 +1,57 @@
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using DREditor.EventObjects;
3
+ using TMPro;
4
+ using UnityEngine;
5
+ using UnityEngine.Events;
6
+
7
+ namespace DREditor.EventObjectServices
8
+ {
9
+ /// <summary>
10
+ ///
11
+ /// </summary>
12
+ /// <typeparam name="TX"></typeparam>
13
+ /// <typeparam name="TY"></typeparam>
14
+ public abstract class OptionWithEventListener<TX, TY> : ValueWithEventListener<OptionWithEvent<TX, TY>, TX, TY>, IOptionEventListener,
15
+ ISceneEventListener
16
+ where TY : UnityEvent<TX>, new()
17
+ {
18
+ /// <summary>
19
+ ///
20
+ /// </summary>
21
+ [Tooltip("")]
22
+ [SerializeField] protected SceneEvent newGameSelected = null;
23
+
24
+ /// <summary>
25
+ ///
26
+ /// </summary>
27
+ [Tooltip("")]
28
+ [SerializeField] protected TMP_Text displayNameText;
29
+
30
+
31
+ public virtual void Initialize(IOptionEvent option)
32
+ {
33
+ if (displayNameText != null && displayNameText.gameObject.activeSelf)
34
+ displayNameText.text = option.OptionDisplayName;
35
+
36
+ valueWithEvent = option as OptionWithEvent<TX, TY>;
37
+ }
38
+
39
+ protected override void OnEnable()
40
+ {
41
+ base.OnEnable();
42
+
43
+ if (newGameSelected != null)
44
+ newGameSelected.RegisterListener(this);
45
+ }
46
+
47
+ protected override void OnDisable()
48
+ {
49
+ base.OnEnable();
50
+
51
+ if (newGameSelected != null)
52
+ newGameSelected.UnregisterListener(this);
53
+ }
54
+
55
+ public virtual void OnEventRaised() => valueWithEvent.SetValue(valueWithEvent.InitialValue);
56
+ }
57
+ }
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: 93f7500a3d60420439d3fa0ee59f5ad0
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -0,0 +1,47 @@
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using DREditor.EventObjects;
3
+ using UnityEngine;
4
+
5
+ namespace DREditor.EventObjectServices
6
+ {
7
+ /// <summary>
8
+ ///
9
+ /// </summary>
10
+ [RequireComponent(typeof(CharacterController))]
11
+ [ClassHeader("")]
12
+ public class ResetCharacterControllerOnEvent : SceneEventListener
13
+ {
14
+ /// <summary>
15
+ ///
16
+ /// </summary>
17
+ [Tooltip("")]
18
+ [SerializeField] protected CharacterController characterController = null;
19
+
20
+ /// <summary>
21
+ ///
22
+ /// </summary>
23
+ [Tooltip("")]
24
+ [SerializeField] protected Vector3 resetPosition = new(0, 1.5f, 0);
25
+
26
+
27
+ /// <inheritdoc/>
28
+ public override void OnEventRaised()
29
+ {
30
+ base.OnEventRaised();
31
+
32
+ ResetCharacterControllerPosition();
33
+ }
34
+
35
+ /// <summary>
36
+ ///
37
+ /// </summary>
38
+ protected void ResetCharacterControllerPosition()
39
+ {
40
+ characterController.enabled = false;
41
+
42
+ characterController.gameObject.transform.position = resetPosition;
43
+
44
+ characterController.enabled = true;
45
+ }
46
+ }
47
+ }
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: ee546de187091ff48a01535621b91e41
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant: