aboutsummaryrefslogtreecommitdiff
path: root/Assets/Scripts
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/Scripts')
-rw-r--r--Assets/Scripts/Localisation.meta8
-rw-r--r--Assets/Scripts/Localisation/CSVLoader.cs68
-rw-r--r--Assets/Scripts/Localisation/CSVLoader.cs.meta11
-rw-r--r--Assets/Scripts/Localisation/LocalisationSystem.cs54
-rw-r--r--Assets/Scripts/Localisation/LocalisationSystem.cs.meta11
-rw-r--r--Assets/Scripts/Localisation/TextLocaliserUI.cs21
-rw-r--r--Assets/Scripts/Localisation/TextLocaliserUI.cs.meta11
-rw-r--r--Assets/Scripts/Player/PlayerMovement.cs18
-rw-r--r--Assets/Scripts/Player/PlayerStats.cs18
-rw-r--r--Assets/Scripts/UI/ExitApplication.cs18
-rw-r--r--Assets/Scripts/UI/LoadScene.cs18
11 files changed, 16 insertions, 240 deletions
diff --git a/Assets/Scripts/Localisation.meta b/Assets/Scripts/Localisation.meta
deleted file mode 100644
index 1ed2220..0000000
--- a/Assets/Scripts/Localisation.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 92d477af9741ec149b21177b60c5a8e0
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/Localisation/CSVLoader.cs b/Assets/Scripts/Localisation/CSVLoader.cs
deleted file mode 100644
index 6805761..0000000
--- a/Assets/Scripts/Localisation/CSVLoader.cs
+++ /dev/null
@@ -1,68 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Text.RegularExpressions;
-using UnityEngine;
-
-public class CSVLoader
-{
- //Reference file;
- private TextAsset csvFile;
- private char lineSeperator = '\n';
- private char surrond = '"';
- private string[] fieldSeperator = { "\", \"" };
-
- public void LoadCSV()
- {
- csvFile = Resources.Load<TextAsset>("localisation");
- }
-
- public Dictionary<string, string> GetDictionaryValues(string attributeID)
- {
- Dictionary<string, string> dictionary = new Dictionary<string, string>();
-
- string[] lines = csvFile.text.Split(lineSeperator);
-
- int attributeIndex = -1;
-
- string[] headers = lines[0].Split(fieldSeperator, StringSplitOptions.None);
-
- for(int i=0; i<headers.Length; i++)
- {
- if(headers[i].Contains(attributeID))
- {
- attributeIndex = i;
- break;
- }
- }
-
- Regex CSVParser = new Regex(",(?=(?:[^\"]*\"[^\"]*\")*(?![^\"]*\"))");
-
- for(int i=1; i<lines.Length; i++)
- {
- string line = lines[i];
-
- string[] fields = CSVParser.Split(line);
-
- for(int f=0; f<fields.Length; f++)
- {
- fields[f] = fields[f].TrimStart(' ', surrond);
- fields[f] = fields[f].TrimEnd(surrond);
- }
-
- if(fields.Length > attributeIndex)
- {
- var key = fields[0];
-
- if (dictionary.ContainsKey(key)) { continue; }
-
- var value = fields[attributeIndex];
-
- dictionary.Add(key, value);
- }
- }
-
- return dictionary;
- }
-
-}
diff --git a/Assets/Scripts/Localisation/CSVLoader.cs.meta b/Assets/Scripts/Localisation/CSVLoader.cs.meta
deleted file mode 100644
index f8da045..0000000
--- a/Assets/Scripts/Localisation/CSVLoader.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 61806182744136d43ac66686d8fd4a8c
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/Localisation/LocalisationSystem.cs b/Assets/Scripts/Localisation/LocalisationSystem.cs
deleted file mode 100644
index 3d48244..0000000
--- a/Assets/Scripts/Localisation/LocalisationSystem.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public class LocalisationSystem
-{
- public enum Language
- {
- English,
- French
- }
-
- public static Language language = Language.English;
-
- private static Dictionary<string, string> localisedEN;
- private static Dictionary<string, string> localisedFR;
-
- public static bool isInit;
-
- public static void Init()
- {
- Debug.Log("Initalizing the localisation system...");
- CSVLoader csvLoader = new CSVLoader();
- csvLoader.LoadCSV();
-
- localisedEN = csvLoader.GetDictionaryValues("en");
- localisedFR = csvLoader.GetDictionaryValues("fr");
-
- isInit = true;
- Debug.Log("Loaded the values for the localisation system.");
- }
-
- public static string GetLocalisedValue(string key)
- {
- if (!isInit) { Init(); }
-
- string value = key;
-
- switch (language)
- {
- case Language.English:
- localisedEN.TryGetValue(key, out value);
- break;
- case Language.French:
- localisedFR.TryGetValue(key, out value);
- break;
-
- }
-
- return value;
- }
-
-}
diff --git a/Assets/Scripts/Localisation/LocalisationSystem.cs.meta b/Assets/Scripts/Localisation/LocalisationSystem.cs.meta
deleted file mode 100644
index 59e4525..0000000
--- a/Assets/Scripts/Localisation/LocalisationSystem.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: a3891ee2e9bce604eb56fc66b0ee96ac
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/Localisation/TextLocaliserUI.cs b/Assets/Scripts/Localisation/TextLocaliserUI.cs
deleted file mode 100644
index a56afb0..0000000
--- a/Assets/Scripts/Localisation/TextLocaliserUI.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using TMPro;
-using UnityEngine;
-
-[RequireComponent(typeof(TextMeshProUGUI))]
-public class TextLocaliserUI : MonoBehaviour
-{
- TextMeshProUGUI textField;
-
- public string key;
-
- // Start is called before the first frame update
- void Start()
- {
- textField = GetComponent<TextMeshProUGUI>();
- string value = LocalisationSystem.GetLocalisedValue(key);
- textField.text = value;
- }
-
-}
diff --git a/Assets/Scripts/Localisation/TextLocaliserUI.cs.meta b/Assets/Scripts/Localisation/TextLocaliserUI.cs.meta
deleted file mode 100644
index 93e3094..0000000
--- a/Assets/Scripts/Localisation/TextLocaliserUI.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 7c6a2fc696577634c999293f25c45550
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/Player/PlayerMovement.cs b/Assets/Scripts/Player/PlayerMovement.cs
index aa6dd13..8f02b5b 100644
--- a/Assets/Scripts/Player/PlayerMovement.cs
+++ b/Assets/Scripts/Player/PlayerMovement.cs
@@ -1,20 +1,10 @@
/*******************************************************************************
*
-* Project SimLife: A Sims clone written in Unity C#
-* Copyright (C) 2019 AleeCorp + Software Elevated
+* Unicity (Project SimLife): A Sims clone written in Unity C#
+* Copyright (C) 2019 Unicity Development Team
*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, either version 3 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program. If not, see <https://www.gnu.org/licenses/>.
+* This software is protected by the copyright and licensing rights held
+* by the Unicity Development Team. (2019)
*
*********************************************************************************/
using UnityEngine;
diff --git a/Assets/Scripts/Player/PlayerStats.cs b/Assets/Scripts/Player/PlayerStats.cs
index a6020b8..21e0e40 100644
--- a/Assets/Scripts/Player/PlayerStats.cs
+++ b/Assets/Scripts/Player/PlayerStats.cs
@@ -1,20 +1,10 @@
/*******************************************************************************
*
-* Project SimLife: A Sims clone written in Unity C#
-* Copyright (C) 2019 AleeCorp + Software Elevated
+* Unicity (Project SimLife): A Sims clone written in Unity C#
+* Copyright (C) 2019 Unicity Development Team
*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, either version 3 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program. If not, see <https://www.gnu.org/licenses/>.
+* This software is protected by the copyright and licensing rights held
+* by the Unicity Development Team. (2019)
*
*********************************************************************************/
using System.Collections;
diff --git a/Assets/Scripts/UI/ExitApplication.cs b/Assets/Scripts/UI/ExitApplication.cs
index 475aae7..b1579a1 100644
--- a/Assets/Scripts/UI/ExitApplication.cs
+++ b/Assets/Scripts/UI/ExitApplication.cs
@@ -1,20 +1,10 @@
/*******************************************************************************
*
-* Project SimLife: A Sims clone written in Unity C#
-* Copyright (C) 2019 AleeCorp + Software Elevated
+* Unicity (Project SimLife): A Sims clone written in Unity C#
+* Copyright (C) 2019 Unicity Development Team
*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, either version 3 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program. If not, see <https://www.gnu.org/licenses/>.
+* This software is protected by the copyright and licensing rights held
+* by the Unicity Development Team. (2019)
*
*********************************************************************************/
using System.Collections;
diff --git a/Assets/Scripts/UI/LoadScene.cs b/Assets/Scripts/UI/LoadScene.cs
index 95b7278..3fbb91e 100644
--- a/Assets/Scripts/UI/LoadScene.cs
+++ b/Assets/Scripts/UI/LoadScene.cs
@@ -1,20 +1,10 @@
/*******************************************************************************
*
-* Project SimLife: A Sims clone written in Unity C#
-* Copyright (C) 2019 AleeCorp + Software Elevated
+* Unicity (Project SimLife): A Sims clone written in Unity C#
+* Copyright (C) 2019 Unicity Development Team
*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, either version 3 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program. If not, see <https://www.gnu.org/licenses/>.
+* This software is protected by the copyright and licensing rights held
+* by the Unicity Development Team. (2019)
*
*********************************************************************************/
using System.Collections;