Skip to content

Commit 86c87eb

Browse files
committed
refactor: Use scene attribute
1 parent 7dab70b commit 86c87eb

File tree

10 files changed

+26
-18
lines changed

10 files changed

+26
-18
lines changed

Assets/JCSUnity/Scenes/System/JCS_AppSkip.unity

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ RenderSettings:
3838
m_ReflectionIntensity: 1
3939
m_CustomReflection: {fileID: 0}
4040
m_Sun: {fileID: 0}
41-
m_IndirectSpecularColor: {r: 0.46169513, g: 0.5124164, b: 0.58993304, a: 1}
4241
m_UseRadianceAmbientProbe: 0
4342
--- !u!157 &3
4443
LightmapSettings:
4544
m_ObjectHideFlags: 0
46-
serializedVersion: 12
45+
serializedVersion: 13
46+
m_BakeOnSceneLoad: 0
4747
m_GISettings:
4848
serializedVersion: 2
4949
m_BounceScale: 1

Assets/JCSUnity/Scripts/Events/Scene/JCS_DelayLoadSceneEvent.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ public class JCS_DelayLoadSceneEvent : MonoBehaviour
2222

2323
[Tooltip("Next scene to load; if empy, load the next scene instead.")]
2424
[SerializeField]
25-
private string mNextLevel = "";
25+
[Scene]
26+
private string mSceneName = "";
2627

2728
[Tooltip("Reload the current scene, and ignore the target scene name.")]
2829
[SerializeField]
@@ -41,7 +42,7 @@ public class JCS_DelayLoadSceneEvent : MonoBehaviour
4142

4243
/* Setter & Getter */
4344

44-
public string NextLevel { get { return this.mNextLevel; } set { this.mNextLevel = value; } }
45+
public string SceneName { get { return this.mSceneName; } set { this.mSceneName = value; } }
4546
public float DelayTime { get { return this.mDelayTime; } set { this.mDelayTime = value; } }
4647
public JCS_TimeType DeltaTimeType { get { return this.mTimeType; } set { this.mTimeType = value; } }
4748

@@ -62,7 +63,7 @@ private void Update()
6263

6364
if (mDelayTime < mDelayTimer)
6465
{
65-
string sceneName = JCS_SceneManager.GetSceneNameByOption(mNextLevel, mReloadScene);
66+
string sceneName = JCS_SceneManager.GetSceneNameByOption(mSceneName, mReloadScene);
6667

6768
JCS_SceneManager.instance.LoadScene(sceneName);
6869
}

Assets/JCSUnity/Scripts/Events/System/JCS_SkipAppEvent.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public class JCS_SkipAppEvent : MonoBehaviour
2525

2626
[Tooltip("The next starting scene to load.")]
2727
[SerializeField]
28+
[Scene]
2829
private string mSceneName = "";
2930

3031
/* Functions */

Assets/JCSUnity/Scripts/Interactive/2D/JCS_2DPortal.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ public class JCS_2DPortal : MonoBehaviour
4040

4141
[Tooltip("Name of the scene.")]
4242
[SerializeField]
43-
private string mSceneName = "JCS_AppCloseSimulate";
43+
[Scene]
44+
private string mSceneName = "";
4445

4546
[Tooltip("Label of the portal.")]
4647
[SerializeField]

Assets/JCSUnity/Scripts/Interactive/3D/JCS_3DPortal.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ public class JCS_3DPortal : MonoBehaviour
3636

3737
[Tooltip("Scene name when portal load this scene.")]
3838
[SerializeField]
39-
private string mSceneName = "JCS_Demo";
39+
[Scene]
40+
private string mSceneName = "";
4041

4142
[Header("- Transfer Portal")]
4243

Assets/JCSUnity/Scripts/JCS_VideoPlayer.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ public class JCS_VideoPlayer : JCS_UnityObject
5050

5151
[Tooltip("Next scene will be loaded.")]
5252
[SerializeField]
53-
private string mSceneName = "JCS_AppCloseSimulate";
53+
[Scene]
54+
private string mSceneName = "";
5455

5556
[Tooltip("Type of the delta time.")]
5657
[SerializeField]
@@ -258,7 +259,8 @@ public class JCS_VideoPlayer : JCS_UnityObject
258259

259260
[Tooltip("Next scene will be loaded.")]
260261
[SerializeField]
261-
private string mSceneName = "JCS_AppCloseSimulate";
262+
[Scene]
263+
private string mSceneName = "";
262264

263265
[Tooltip("Type of the delta time.")]
264266
[SerializeField]

Assets/JCSUnity/Scripts/UI/Button/Scene/JCS_LoadSceneButton.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
using UnityEngine;
1010
using UnityEngine.SceneManagement;
1111
using MyBox;
12-
using Unity.Hierarchy;
1312

1413
namespace JCSUnity
1514
{
@@ -33,6 +32,7 @@ public class JCS_LoadSceneButton :
3332

3433
[Tooltip("Scene name you want to load the scene; if empy, load the next scene instead.")]
3534
[SerializeField]
35+
[Scene]
3636
private string mSceneName = "";
3737

3838
[Tooltip("Reload the current scene, and ignore the target scene name.")]

Assets/_BossFight/Scenes/BF_Logo.unity

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,13 @@ MonoBehaviour:
162162
mResizeUI: {fileID: 0}
163163
mDisplayOnAwake: 1
164164
mMainCanvas: 1
165-
mFade: 0
165+
mShowMethod: 1
166166
mFadeFriction: 0.15
167167
mFadeInAmount: 1
168168
mFadeOutAmount: 0
169169
mTimeType: 7
170-
mActiveSound: {fileID: 0}
171-
mDeactiveSound: {fileID: 0}
170+
mSoundOnShow: {fileID: 0}
171+
mSoundOnHide: {fileID: 0}
172172
--- !u!114 &170838951
173173
MonoBehaviour:
174174
m_ObjectHideFlags: 0
@@ -406,7 +406,7 @@ MonoBehaviour:
406406
m_Script: {fileID: 11500000, guid: 95a88ee96a8132b46a0ef0fe762d1b7a, type: 3}
407407
m_Name:
408408
m_EditorClassIdentifier:
409-
mNextLevel: BF_Lobby
409+
mSceneName: BF_Lobby
410410
mReloadScene: 0
411411
mDelayTime: 1.5
412412
mTimeType: 0

Assets/_BossFight/Scripts/UI/Buttons/BF_SelectLevelButton.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*/
99
using UnityEngine;
1010
using JCSUnity;
11+
using MyBox;
1112

1213
/// <summary>
1314
///
@@ -18,6 +19,7 @@ public class BF_SelectLevelButton : JCS_Button
1819

1920
[Tooltip("Name of the scene you want to load for game.")]
2021
[SerializeField]
22+
[Scene]
2123
private string mSceneName = "";
2224

2325
/* Setter & Getter */

Assets/_RunningCrush/Scenes/RC_Logo.unity

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ MonoBehaviour:
221221
m_Script: {fileID: 11500000, guid: 95a88ee96a8132b46a0ef0fe762d1b7a, type: 3}
222222
m_Name:
223223
m_EditorClassIdentifier:
224-
mNextLevel: RC_Lobby
224+
mSceneName: RC_Lobby
225225
mReloadScene: 0
226226
mDelayTime: 1.5
227227
mTimeType: 0
@@ -837,13 +837,13 @@ MonoBehaviour:
837837
mResizeUI: {fileID: 0}
838838
mDisplayOnAwake: 1
839839
mMainCanvas: 1
840-
mFade: 0
840+
mShowMethod: 1
841841
mFadeFriction: 0.15
842842
mFadeInAmount: 1
843843
mFadeOutAmount: 0
844844
mTimeType: 7
845-
mActiveSound: {fileID: 0}
846-
mDeactiveSound: {fileID: 0}
845+
mSoundOnShow: {fileID: 0}
846+
mSoundOnHide: {fileID: 0}
847847
--- !u!224 &1772590661 stripped
848848
RectTransform:
849849
m_CorrespondingSourceObject: {fileID: 22457494, guid: 5e738c8e180c9d344ab559f867a0fe2c,

0 commit comments

Comments
 (0)