ajout de la prefab CompletedQUest et du script QUestHistory. Modification dans les script (BaseMonobehaviour => BaseMonoBheaviour)
This commit is contained in:
parent
3ba8dad4a2
commit
9143f3c50d
52 changed files with 1438 additions and 724 deletions
|
|
@ -24,11 +24,11 @@ namespace GuildTycoon.Tests.Editor
|
|||
// Ensure profile and base facts are set
|
||||
_gameManager.Profile = "UnitTestProfile";
|
||||
_gameManager.Fact = new FactDictionnary();
|
||||
GameManager.m_gameFacts = _gameManager.Fact; // ensure BaseMonobehaviour access works
|
||||
GameManager.m_gameFacts = _gameManager.Fact; // ensure BaseMonoBehaviour access works
|
||||
|
||||
// Pre-seed facts used by QuestManager
|
||||
_gameManager.Fact.SetFact("accepted_quests", new List<QuestClass>(), BaseMonobehaviour.FactPersistence.Normal);
|
||||
_gameManager.Fact.SetFact("events_quests_history", new Dictionary<Guid, List<QuestEventLog>>(), BaseMonobehaviour.FactPersistence.Normal);
|
||||
_gameManager.Fact.SetFact("accepted_quests", new List<QuestClass>(), BaseMonoBehaviour.FactPersistence.Normal);
|
||||
_gameManager.Fact.SetFact("events_quests_history", new Dictionary<Guid, List<QuestEventLog>>(), BaseMonoBehaviour.FactPersistence.Normal);
|
||||
|
||||
// Create QuestManager
|
||||
_qmGO = new GameObject("QuestManager_Test");
|
||||
|
|
@ -64,7 +64,7 @@ namespace GuildTycoon.Tests.Editor
|
|||
|
||||
// Seed facts with the same quest so QuestManager can update saved state
|
||||
var accepted = new List<QuestClass> { new QuestClass(questId, quest.Name, quest.Description, quest.Objective, quest.Duration, quest.Difficulty, quest.Rewards, quest.MinLevel) { State = QuestStateEnum.InProgress } };
|
||||
_gameManager.Fact.SetFact("accepted_quests", accepted, BaseMonobehaviour.FactPersistence.Normal);
|
||||
_gameManager.Fact.SetFact("accepted_quests", accepted, BaseMonoBehaviour.FactPersistence.Normal);
|
||||
|
||||
QuestClass completedRaised = null;
|
||||
Action<QuestClass> handler = q => completedRaised = q;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ using UnityEngine.SceneManagement;
|
|||
|
||||
namespace TestFacts.Runtime
|
||||
{
|
||||
public class AutoLoaderGame : BaseMonobehaviour
|
||||
public class AutoLoaderGame : BaseMonoBehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ using UnityEngine;
|
|||
|
||||
namespace TestFacts.Runtime
|
||||
{
|
||||
public class TestFacts : BaseMonobehaviour
|
||||
public class TestFacts : BaseMonoBehaviour
|
||||
{
|
||||
string _fact;
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ using UnityEngine;
|
|||
|
||||
namespace TestFacts.Runtime
|
||||
{
|
||||
public class Triche : BaseMonobehaviour
|
||||
public class Triche : BaseMonoBehaviour
|
||||
{
|
||||
[ContextMenu("Add 99999 Gold")]
|
||||
void AddInfiniteGold()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue