mirror of
https://github.com/FriendshipIsEpic/FiE-Game.git
synced 2024-12-02 01:47:58 +01:00
68 lines
2.2 KiB
C#
68 lines
2.2 KiB
C#
|
using Fie.Core;
|
||
|
using Fie.Manager;
|
||
|
using Fie.Scene;
|
||
|
using GameDataEditor;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
|
||
|
namespace Fie.DebugUtility
|
||
|
{
|
||
|
public class FieDebugGameSceneBoot : MonoBehaviour
|
||
|
{
|
||
|
[Range(1f, 3f)]
|
||
|
[SerializeField]
|
||
|
private int playerNum = 1;
|
||
|
|
||
|
[SerializeField]
|
||
|
private List<FieGameCharacter> _debugCharacters = new List<FieGameCharacter>();
|
||
|
|
||
|
[SerializeField]
|
||
|
private List<FieGameCharacter.IntelligenceType> _debugCharactersIntelligenceTypes = new List<FieGameCharacter.IntelligenceType>();
|
||
|
|
||
|
[SerializeField]
|
||
|
private List<string> _debugCharactersNames = new List<string>();
|
||
|
|
||
|
[SerializeField]
|
||
|
private List<FieConstValues.FieSkill> _debugSkills = new List<FieConstValues.FieSkill>();
|
||
|
|
||
|
private void Awake()
|
||
|
{
|
||
|
if (!FieBootstrap.isBootedFromBootStrap && _debugCharacters.Count == _debugCharactersIntelligenceTypes.Count && _debugCharactersIntelligenceTypes.Count == _debugCharactersNames.Count && _debugCharacters.Count == _debugCharactersNames.Count)
|
||
|
{
|
||
|
PhotonNetwork.offlineMode = true;
|
||
|
PhotonNetwork.InstantiateInRoomOnly = false;
|
||
|
FieManagerFactory.I.currentSceneType = FieSceneType.INGAME;
|
||
|
FieManagerBehaviour<FieSceneManager>.I.StartUp();
|
||
|
FieManagerBehaviour<FieSaveManager>.I.StartUp();
|
||
|
FieManagerBehaviour<FieFaderManager>.I.StartUp();
|
||
|
FieManagerBehaviour<FieEnvironmentManager>.I.StartUp();
|
||
|
FieManagerBehaviour<FieUserManager>.I.nowPlayerNum = playerNum;
|
||
|
FieManagerBehaviour<FieUserManager>.I.StartUp();
|
||
|
List<GDESkillTreeData> list = FieMasterData<GDESkillTreeData>.FindMasterDataList(delegate(GDESkillTreeData data)
|
||
|
{
|
||
|
if (_debugSkills.Contains((FieConstValues.FieSkill)data.ID))
|
||
|
{
|
||
|
return true;
|
||
|
}
|
||
|
return false;
|
||
|
});
|
||
|
for (int i = 0; i < playerNum; i++)
|
||
|
{
|
||
|
_debugCharacters[i].intelligenceType = _debugCharactersIntelligenceTypes[i];
|
||
|
if (list != null && list.Count > 0)
|
||
|
{
|
||
|
FieSaveManager.debugSkills = list;
|
||
|
}
|
||
|
FieManagerBehaviour<FieUserManager>.I.SetUserName(i, _debugCharactersNames[i]);
|
||
|
FieManagerBehaviour<FieUserManager>.I.SetUserCharacterPrefab(i, _debugCharacters[i]);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
private void Start()
|
||
|
{
|
||
|
FieManagerBehaviour<FieInGameStateManager>.I.StartUp();
|
||
|
}
|
||
|
}
|
||
|
}
|