Work on hooking the character system into the character creation

This commit is contained in:
Sebastian Bularca
2026-04-05 15:55:48 +02:00
parent 43dc5e68be
commit 4d83483034
18 changed files with 107 additions and 180 deletions

View File

@@ -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() {