public Task Initialize(PlayerConfig config, bool isView = false)
 {
     States          = Instantiate(States); // Create a per-player copy of the builder.
     StateController = States.BuildCharacterControllerImpl(new StateControllerBuilder());
     stateMap        = StateController.States.ToDictionary(s => s.Id, s => s);
     return(Task.WhenAll(stateMap.Values.Select(s => s.Initalize(config, gameObject, isView)).Where(t => t != null)));
 }
예제 #2
0
 public Task Initialize(PlayerConfig config, bool isView = false)
 {
     States          = Instantiate(States); // Create a per-player copy of the builder.
     StateController = States.BuildCharacterControllerImpl(new StateControllerBuilder <CharacterState, CharacterContext>());
     stateMap        = StateController.States.ToDictionary(s => s.Id, s => s);
     return(Task.CompletedTask);
 }