migration from new repo
This commit is contained in:
commit
423134a840
26930 changed files with 3458568 additions and 0 deletions
51
Assets/_/Features/Tests/Runtime/AutoLoaderGame.cs
Normal file
51
Assets/_/Features/Tests/Runtime/AutoLoaderGame.cs
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
using Core.Runtime;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace TestFacts.Runtime
|
||||
{
|
||||
public class AutoLoaderGame : BaseMonobehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
||||
//
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Unity API
|
||||
|
||||
void Awake()
|
||||
{
|
||||
if (GameManager.Instance == null)
|
||||
{
|
||||
SceneManager.LoadScene("TitleScreen");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Main Methods
|
||||
|
||||
//
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Utils
|
||||
|
||||
/* Fonctions privées utiles */
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Privates and Protected
|
||||
|
||||
// Variables privées
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
3
Assets/_/Features/Tests/Runtime/AutoLoaderGame.cs.meta
Normal file
3
Assets/_/Features/Tests/Runtime/AutoLoaderGame.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 8309fb5f87214c46a2994daf35aa90a5
|
||||
timeCreated: 1754076972
|
||||
67
Assets/_/Features/Tests/Runtime/TestFacts.cs
Normal file
67
Assets/_/Features/Tests/Runtime/TestFacts.cs
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Core.Runtime;
|
||||
using Core.Runtime.Interfaces;
|
||||
using UnityEngine;
|
||||
|
||||
namespace TestFacts.Runtime
|
||||
{
|
||||
public class TestFacts : BaseMonobehaviour
|
||||
{
|
||||
string _fact;
|
||||
|
||||
void Start()
|
||||
{
|
||||
GameManager.Instance.Profile = "Guilde_de_Toine";
|
||||
}
|
||||
|
||||
[ContextMenu("Créer un fait")]
|
||||
public void CreateFact()
|
||||
{
|
||||
SetFact<string>("fact", "Mon premier fait");
|
||||
_fact = GetFact<string>("fact");
|
||||
}
|
||||
|
||||
[ContextMenu("Créer un fait persistant")]
|
||||
public void CreatePersistentFact()
|
||||
{
|
||||
SetFact<string>("fact", "Mon premier fait persistant", FactPersistence.Persistent);
|
||||
_fact = GetFact<string>("fact");
|
||||
}
|
||||
|
||||
[ContextMenu("Sauver les donénes")]
|
||||
public void Sauver()
|
||||
{
|
||||
SaveFacts();
|
||||
}
|
||||
|
||||
[ContextMenu("Charger les données")]
|
||||
public void Charger()
|
||||
{
|
||||
LoadFacts();
|
||||
|
||||
GetAllFactsPlease();
|
||||
}
|
||||
|
||||
[ContextMenu("Supprimer un fait")]
|
||||
public void RemoveFact()
|
||||
{
|
||||
RemoveFact<string>("fact");
|
||||
}
|
||||
|
||||
[ContextMenu("Supprimer la sauvegarde")]
|
||||
public void DeleteSave()
|
||||
{
|
||||
DeleteSaveFile();
|
||||
}
|
||||
|
||||
[ContextMenu("Voir tous les faits")]
|
||||
public void GetAllFactsPlease()
|
||||
{
|
||||
foreach (var fact in GetAllFacts())
|
||||
{
|
||||
Info($"Fact[{fact.Key}] = {fact.Value}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/_/Features/Tests/Runtime/TestFacts.cs.meta
Normal file
2
Assets/_/Features/Tests/Runtime/TestFacts.cs.meta
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 81a2bf3dbec3e4e79a9a45765d33da8b
|
||||
29
Assets/_/Features/Tests/Runtime/Triche.cs
Normal file
29
Assets/_/Features/Tests/Runtime/Triche.cs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Core.Runtime;
|
||||
using Player.Runtime;
|
||||
using Quests.Runtime;
|
||||
using UnityEngine;
|
||||
|
||||
namespace TestFacts.Runtime
|
||||
{
|
||||
public class Triche : BaseMonobehaviour
|
||||
{
|
||||
[ContextMenu("Add 99999 Gold")]
|
||||
void AddInfiniteGold()
|
||||
{
|
||||
PlayerClass profile = GetFact<PlayerClass>(GameManager.Instance.Profile);
|
||||
profile.Money = 99999;
|
||||
Info("➕99999 Gold added");
|
||||
SaveFacts();
|
||||
}
|
||||
|
||||
[ContextMenu("MAJ Facts = Créer l'historique des events ")]
|
||||
void CreateHistory()
|
||||
{
|
||||
SetFact<Dictionary<Guid, List<QuestEvent>>>("events_quests_history", new Dictionary<Guid, List<QuestEvent>>(), FactPersistence.Persistent);
|
||||
SaveFacts();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
3
Assets/_/Features/Tests/Runtime/Triche.cs.meta
Normal file
3
Assets/_/Features/Tests/Runtime/Triche.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: feb5575f76804030a0ae6877ba236d61
|
||||
timeCreated: 1754585962
|
||||
34
Assets/_/Features/Tests/Runtime/testLocalization.cs
Normal file
34
Assets/_/Features/Tests/Runtime/testLocalization.cs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
using Core.Runtime;
|
||||
using UnityEngine;
|
||||
|
||||
namespace TestFacts.Runtime
|
||||
{
|
||||
public class testLocalization : BaseMonobehaviour
|
||||
{
|
||||
private LocalizationSystem _localization = LocalizationSystem.Instance;
|
||||
|
||||
[ContextMenu("Current Language ?")]
|
||||
public void GetCurrentLanguage()
|
||||
{
|
||||
_localization.LoadLanguage();
|
||||
// Affichage de la langue courante
|
||||
}
|
||||
|
||||
[ContextMenu("Mettre en anglais")]
|
||||
public void SetEnglish()
|
||||
{
|
||||
GameManager.Instance.CurrentLanguage = "en";
|
||||
_localization.SaveLanguage(GameManager.Instance.CurrentLanguage);
|
||||
SaveFacts("GeneralSettings");
|
||||
}
|
||||
|
||||
[ContextMenu("Mettre en français")]
|
||||
public void SetFrench()
|
||||
{
|
||||
GameManager.Instance.CurrentLanguage = "fr";
|
||||
_localization.SaveLanguage(GameManager.Instance.CurrentLanguage);
|
||||
SaveFacts("GeneralSettings");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
3
Assets/_/Features/Tests/Runtime/testLocalization.cs.meta
Normal file
3
Assets/_/Features/Tests/Runtime/testLocalization.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 55ed85535e4d41bdadca7f7c2628ddff
|
||||
timeCreated: 1752476966
|
||||
Loading…
Add table
Add a link
Reference in a new issue