forked from Shardstone/trail-into-darkness
Work on hooking the character system into the character creation
This commit is contained in:
@@ -1,16 +1,44 @@
|
||||
using Jovian.SaveSystem;
|
||||
using Nox.Core;
|
||||
using Nox.Game;
|
||||
using Nox.Game.UI;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Nox.UI {
|
||||
public class CharacterCreationView : IMenuView {
|
||||
// we need prefab reference from the menu view, character creation data, save system, modifier calculation, gamemode state to start the game
|
||||
// party creation data/system,
|
||||
public CharacterCreationView(CharacterCreationReference characterCreationReference, MenuGameStateData menuGameStateData) {
|
||||
characterCreationReference.startGameButton.onClick.AddListener(() => menuGameStateData.startGameRequests?.Invoke(PlayMode.Adventure));
|
||||
public ISaveSystem SaveSystem { get; }
|
||||
private readonly CharacterCreationReference characterCreationReference;
|
||||
private readonly MenuGameStateData menuGameStateData;
|
||||
private readonly GameDataState gameDataState;
|
||||
private readonly PartySettings partySettings;
|
||||
private readonly ICharacterSystems characterSystems;
|
||||
|
||||
private List<CharacterCreationRequest> characterCreationRequests;
|
||||
|
||||
public CharacterCreationView(
|
||||
CharacterCreationReference characterCreationReference,
|
||||
MenuGameStateData menuGameStateData,
|
||||
ISaveSystem saveSystem,
|
||||
GameDataState gameDataState,
|
||||
PartySettings partySettings,
|
||||
ICharacterSystems characterSystems) {
|
||||
SaveSystem = saveSystem;
|
||||
this.characterCreationReference = characterCreationReference;
|
||||
this.menuGameStateData = menuGameStateData;
|
||||
this.gameDataState = gameDataState;
|
||||
this.partySettings = partySettings;
|
||||
this.characterSystems = characterSystems;
|
||||
|
||||
}
|
||||
|
||||
public void Initialize() {
|
||||
throw new System.NotImplementedException();
|
||||
characterCreationReference.startGameButton.onClick.AddListener(() => menuGameStateData.startGameRequests?.Invoke(PlayMode.Adventure));
|
||||
}
|
||||
|
||||
public void CreateParty() {
|
||||
var partyCreatorModel = new PartyCreatorModel(characterSystems.CharacterFactory, characterSystems.PartyFactory, characterCreationRequests, partySettings);
|
||||
var party = partyCreatorModel.CreatePartyForNewRun();
|
||||
gameDataState.ActiveParty = party;
|
||||
}
|
||||
|
||||
public void Tick() {
|
||||
|
||||
Reference in New Issue
Block a user