Skip to content

Commit

Permalink
feat: Use shorter app name
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Apr 29, 2024
1 parent f89835c commit b042ae9
Show file tree
Hide file tree
Showing 37 changed files with 52 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ private void OnDestroy()
{
// if is quitting the application don't spawn object,
// or else will cause memory leak!
if (JCS_ApplicationManager.APP_QUITTING)
if (JCS_AppManager.APP_QUITTING)
return;

// if switching the scene, don't spawn new gameObject.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ private void OnDestroy()
{
// if is quitting the application don't spawn object,
// or else will cause memory leak!
if (JCS_ApplicationManager.APP_QUITTING)
if (JCS_AppManager.APP_QUITTING)
return;

// if switching the scene, don't spawn new gameObject.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ private void OnDestroy()
{
// if is quitting the application don't spawn object,
// or else will cause memory leak!
if (JCS_ApplicationManager.APP_QUITTING)
if (JCS_AppManager.APP_QUITTING)
return;

// if switching the scene, don't spawn new gameObject.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ private void OnDestroy()
{
// if is quitting the application don't spawn object,
// or else will cause memory leak!
if (JCS_ApplicationManager.APP_QUITTING)
if (JCS_AppManager.APP_QUITTING)
return;

// if switching the scene, don't spawn new gameObject.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ private void OnDestroy()
{
// if is quitting the application don't spawn object,
// or else will cause memory leak!
if (JCS_ApplicationManager.APP_QUITTING)
if (JCS_AppManager.APP_QUITTING)
return;

// if switching the scene, don't spawn new gameObject.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ private void OnDestroy()
{
// if is quitting the application don't spawn object,
// or else will cause memory leak!
if (JCS_ApplicationManager.APP_QUITTING)
if (JCS_AppManager.APP_QUITTING)
return;

// if switching the scene, don't spawn new gameObject.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ private void Awake()
private void OnEnable()
{
// if app still initializing then return.
if (JCS_ApplicationManager.APP_INITIALIZING)
if (JCS_AppManager.APP_INITIALIZING)
return;

// when enabled play the sound and animation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private void OnDestroy()
{
// if is quitting the application don't spawn object,
// or else will cause memory leak!
if (JCS_ApplicationManager.APP_QUITTING)
if (JCS_AppManager.APP_QUITTING)
return;

// if switching the scene, don't spawn new gameObject.
Expand Down
2 changes: 1 addition & 1 deletion Assets/JCSUnity/Scripts/Events/JCS_SplitSpawnEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ private void OnDestroy()
{
// if is quitting the application don't spawn object,
// or else will cause memory leak!
if (JCS_ApplicationManager.APP_QUITTING)
if (JCS_AppManager.APP_QUITTING)
return;

// if switching the scene, don't spawn new gameObject.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* $File: JCS_QuitApplicationOnLoadEvent.cs $
* $File: JCS_QuitAppOnLoadEvent.cs $
* $Date: $
* $Revision: $
* $Creator: Jen-Chieh Shen $
Expand All @@ -13,7 +13,7 @@ namespace JCSUnity
/// <summary>
/// Event that will quit the application.
/// </summary>
public class JCS_QuitApplicationOnLoadEvent : MonoBehaviour
public class JCS_QuitAppOnLoadEvent : MonoBehaviour
{
/* Variables */

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* $File: JCS_ApplicationManager.cs $
* $File: JCS_AppManager.cs $
* $Date: $
* $Revision: $
* $Creator: Jen-Chieh Shen $
Expand All @@ -20,15 +20,15 @@ namespace JCSUnity
/// <summary>
/// Manager manage application layer.
/// </summary>
public class JCS_ApplicationManager : JCS_Manager<JCS_ApplicationManager>
public class JCS_AppManager : JCS_Manager<JCS_AppManager>
{
/* Variables */

public static bool APP_PAUSE = false;
public static bool APP_QUITTING = false;
public static bool APP_INITIALIZING = true;

[Separator("Check Variables (JCS_ApplicationManager)")]
[Separator("Check Variables (JCS_AppManager)")]

[Tooltip("Current systme language.")]
[SerializeField]
Expand All @@ -40,7 +40,7 @@ public class JCS_ApplicationManager : JCS_Manager<JCS_ApplicationManager>
[ReadOnly]
private List<JCS_LangText> mLangTexts = null;

[Separator("Initialize Variables (JCS_ApplicationManager)")]
[Separator("Initialize Variables (JCS_AppManager)")]

[Tooltip("Request permission for camera/webcam.")]
[SerializeField]
Expand All @@ -54,7 +54,7 @@ public class JCS_ApplicationManager : JCS_Manager<JCS_ApplicationManager>
[SerializeField]
private bool mRequestLocation = false;

[Separator("Runtime Variables (JCS_ApplicationManager)")]
[Separator("Runtime Variables (JCS_AppManager)")]

[Tooltip("This will override platform Type.")]
[SerializeField]
Expand Down Expand Up @@ -104,7 +104,7 @@ private void OnApplicationQuit()
{
APP_QUITTING = true;

var apps = JCS_ApplicationSettings.instance;
var apps = JCS_AppSettings.instance;

if (apps.SAVE_ON_EXIT_APP && apps.SAVE_APP_DATA_FUNC != null)
{
Expand Down
2 changes: 1 addition & 1 deletion Assets/JCSUnity/Scripts/Managers/JCS_NetworkManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ private void Update()
Test();
#endif

if (JCS_ApplicationManager.APP_PAUSE)
if (JCS_AppManager.APP_PAUSE)
return;

CheckConnectionWithTime();
Expand Down
2 changes: 1 addition & 1 deletion Assets/JCSUnity/Scripts/Managers/JCS_PatchManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ private void DoTimeOut()
Debug.Log("Server Connection Time Out, Quit Application.");

// quit the application smoothly.
JCS_ApplicationManager.instance.Quit(true);
JCS_AppManager.instance.Quit(true);
}
}
}
2 changes: 1 addition & 1 deletion Assets/JCSUnity/Scripts/Managers/JCS_SceneManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ public void LoadScene(string sceneName, float fadeInTime, Color screenColor, boo
// set the next scene name
this.mNextSceneName = sceneName;

var apps = JCS_ApplicationSettings.instance;
var apps = JCS_AppSettings.instance;

if (apps.SAVE_ON_SWITCH_SCENE && apps.SAVE_APP_DATA_FUNC != null)
{
Expand Down
2 changes: 1 addition & 1 deletion Assets/JCSUnity/Scripts/SaveLoad/JCS_AppData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public bool Initialized()
/// </summary>
public static string SavePath()
{
var apps = JCS_ApplicationSettings.instance;
var apps = JCS_AppSettings.instance;
string path = JCS_Path.Combine(Application.persistentDataPath, apps.DATA_PATH);
return path;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* $File: JCS_ApplicationSettings.cs $
* $File: JCS_AppSettings.cs $
* $Date: 2018-09-08 16:51:42 $
* $Revision: $
* $Creator: Jen-Chieh Shen $
Expand All @@ -14,7 +14,7 @@ namespace JCSUnity
/// <summary>
/// Application settings.
/// </summary>
public class JCS_ApplicationSettings : JCS_Settings<JCS_ApplicationSettings>
public class JCS_AppSettings : JCS_Settings<JCS_AppSettings>
{
/* Variables */

Expand All @@ -25,13 +25,13 @@ public class JCS_ApplicationSettings : JCS_Settings<JCS_ApplicationSettings>
// per application is starts.
public EmptyFunction onApplicationStarts = null;

[Separator("Check Variables (JCS_ApplicationSettings)")]
[Separator("Check Variables (JCS_AppSettings)")]

[Tooltip("Is the application start?")]
[ReadOnly]
public bool APPLICATION_STARTS = false;

[Separator("Initialize Variables (JCS_ApplicationSettings)")]
[Separator("Initialize Variables (JCS_AppSettings)")]

[Tooltip("Enable to overwrite the default frame rate.")]
public bool SET_FRAME_RATE = false;
Expand All @@ -40,7 +40,7 @@ public class JCS_ApplicationSettings : JCS_Settings<JCS_ApplicationSettings>
[Range(30, 120)]
public int FRAME_RATE = 120;

[Separator("Runtime Variables (JCS_ApplicationSettings)")]
[Separator("Runtime Variables (JCS_AppSettings)")]

[Header("- Save Load")]

Expand Down Expand Up @@ -86,7 +86,7 @@ private void Start()
/// </summary>
/// <param name="_old"> old instance </param>
/// <param name="_new"> new instance </param>
protected override void TransferData(JCS_ApplicationSettings _old, JCS_ApplicationSettings _new)
protected override void TransferData(JCS_AppSettings _old, JCS_AppSettings _new)
{
_new.SET_FRAME_RATE = _old.SET_FRAME_RATE;
_new.FRAME_RATE = _old.FRAME_RATE;
Expand Down
4 changes: 2 additions & 2 deletions Assets/JCSUnity/Scripts/Settings/JCS_ScreenSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ private void Awake()

// This will only run once at the time when
// the application is starts.
if (!JCS_ApplicationSettings.instance.APPLICATION_STARTS)
if (!JCS_AppSettings.instance.APPLICATION_STARTS)
{
// Calculate standard screen width and screen height.
{
Expand Down Expand Up @@ -153,7 +153,7 @@ private void Awake()
private void Start()
{
// When first run in the application...
if (!JCS_ApplicationSettings.instance.APPLICATION_STARTS)
if (!JCS_AppSettings.instance.APPLICATION_STARTS)
{
Camera cam = JCS_Camera.main.GetCamera();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public override void OnClick()
{
// if the button and the platform are not the same,
// dont load the scene and do nothing.
if (mPlatformType != JCS_ApplicationManager.instance.PlatformType)
if (mPlatformType != JCS_AppManager.instance.PlatformType)
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public override void OnClick()
{
// if the button and the platform are not the same,
// dont load the scene and do nothing.
if (mPlatformType != JCS_ApplicationManager.instance.PlatformType)
if (mPlatformType != JCS_AppManager.instance.PlatformType)
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public void ResetDialogue()
public void Destroy()
{
// start the app
JCS_ApplicationManager.APP_PAUSE = false;
JCS_AppManager.APP_PAUSE = false;

// destroy this dialogue
Destroy(this.gameObject);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ protected override void Start()
base.Start();

// pause the app
JCS_ApplicationManager.APP_PAUSE = true;
JCS_AppManager.APP_PAUSE = true;
}

protected void Update()
Expand Down
4 changes: 2 additions & 2 deletions Assets/JCSUnity/Scripts/UI/JCS_ButtonFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static void PauseGame(bool act = true)
/// <param name="act"></param>
public static void PasueApplication(bool act = true)
{
JCS_ApplicationManager.APP_PAUSE = act;
JCS_AppManager.APP_PAUSE = act;
}

/// <summary>
Expand All @@ -50,7 +50,7 @@ public static void QuitApplication()
{
#if UNITY_EDITOR
SceneManager.LoadScene("JCS_AppCloseSimulate");
JCS_ApplicationManager.APP_PAUSE = true;
JCS_AppManager.APP_PAUSE = true;
#endif

Application.Quit();
Expand Down
4 changes: 2 additions & 2 deletions Assets/JCSUnity/Scripts/UI/Language/JCS_LangText.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace JCSUnity
/// 2. A list of language definition for correctly displays the target
/// system lanauge.
///
/// 3. Register to `JCS_ApplicationManager`, its' component will take
/// 3. Register to `JCS_AppManager`, its' component will take
/// case of the rest.
/// </summary>
public class JCS_LangText : JCS_TextObject
Expand All @@ -44,7 +44,7 @@ public class JCS_LangText : JCS_TextObject

private void Start()
{
JCS_ApplicationManager.instance.AddLangText(this);
JCS_AppManager.instance.AddLangText(this);
Refresh();
}

Expand Down
4 changes: 2 additions & 2 deletions Assets/JCSUnity/Scripts/Util/JCS_UIUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static bool IsUnityDefinedUI(Component comp)
/// <param name="txt"> Text container to display language data. </param>
public static void SetLangText(JCS_LangDataList data, Text txt)
{
SystemLanguage lang = JCS_ApplicationManager.instance.systemLanguage;
SystemLanguage lang = JCS_AppManager.instance.systemLanguage;

foreach (JCS_LangData langData in data.LangData)
{
Expand All @@ -70,7 +70,7 @@ public static void SetLangText(JCS_LangDataList data, Text txt)
/// <param name="txt"> Text container to display language data. </param>
public static void SetLangText(JCS_LangDataList data, TMP_Text txt)
{
SystemLanguage lang = JCS_ApplicationManager.instance.systemLanguage;
SystemLanguage lang = JCS_AppManager.instance.systemLanguage;

foreach (JCS_LangData langData in data.LangData)
{
Expand Down
2 changes: 1 addition & 1 deletion Assets/_BossFight/Scripts/BF_PickItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public void AfterPicked(Collider other)
/// <param name="jcsItem"> item to do the effect. </param>
public static void SetPickMode(JCS_Item jcsItem)
{
var am = JCS_ApplicationManager.instance;
var am = JCS_AppManager.instance;

if (am.IsPC())
{
Expand Down
4 changes: 2 additions & 2 deletions Assets/_BossFight/Scripts/Settings/BF_AppSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ private void Start()
LoadAppData();

// set load and save game data
var apps = JCS_ApplicationSettings.instance;
var apps = JCS_AppSettings.instance;
apps.SAVE_APP_DATA_FUNC = SaveAppData;
apps.LOAD_APP_DATA_FUNC = LoadAppData;
}
Expand All @@ -81,7 +81,7 @@ protected override void TransferData(BF_AppSettings _old, BF_AppSettings _new)
/// </summary>
private void InitPath()
{
var apps = JCS_ApplicationSettings.instance;
var apps = JCS_AppSettings.instance;

mFullFilePath = JCS_Path.Combine(Application.persistentDataPath, apps.DATA_PATH, FILE_PATH);
mFullFileName = FILE_NAME + apps.DATA_EXTENSION;
Expand Down
4 changes: 2 additions & 2 deletions Assets/_Project/Scripts/Language/FT_MultiLangs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ private void Awake()

private void Btn1_Click()
{
JCS_ApplicationManager.instance.systemLanguage = mLang1;
JCS_AppManager.instance.systemLanguage = mLang1;
}

private void Btn2_Click()
{
JCS_ApplicationManager.instance.systemLanguage = mLang2;
JCS_AppManager.instance.systemLanguage = mLang2;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* $File: FT_ApplicationQuit.cs $
* $File: FT_AppQuit.cs $
* $Date: $
* $Revision: $
* $Creator: Jen-Chieh Shen $
Expand All @@ -9,7 +9,7 @@
using UnityEngine;
using JCSUnity;

public class FT_ApplicationQuit: MonoBehaviour
public class FT_AppQuit: MonoBehaviour
{
/* Variables */

Expand Down
Loading

0 comments on commit b042ae9

Please sign in to comment.