private void Remove(AppearCharacterViewModel appearCharacterViewModel) { if (this.appearCharacterViewModels.IndexOf(appearCharacterViewModel) < 0) { return; } appearCharacterViewModel.Dispose(); this.appearCharacterViewModels.Remove(appearCharacterViewModel); this.appearCharacterRemoveService.Execute(appearCharacterViewModel.PlayerAppearCharacterViewModel); }
public AppearCharacterViewModel Generate(PlayerAppearCharacterViewModel playerAppearCharacterViewModel) { var modelPrefab = ResourceLoader.LoadModel(appearCharacterModel.Name); var appearCharacterInstance = Object.AppearToFloor(modelPrefab, GameManager.Instance.AppearCharacterManager.Root, playerAppearCharacterViewModel.Position); var appearCharacterView = appearCharacterInstance.GetComponent <AppearCharacterView>(); var generatedAppearCharacterViewModel = new AppearCharacterViewModel( appearCharacterView, playerAppearCharacterViewModel ); return(generatedAppearCharacterViewModel); }
public AppearCharacterViewModel Generate() { var modelPrefab = ResourceLoader.LoadModel(appearCharacterModel.Name); var appearCharacterInstance = Object.AppearToFloor(modelPrefab, GameManager.Instance.AppearCharacterManager.Root, GetInitialPosition()); var appearCharacterView = appearCharacterInstance.GetComponent <AppearCharacterView>(); var generatedAppearCharacterViewModel = new AppearCharacterViewModel( appearCharacterView, GameManager.Instance.AppearCharacterManager.Create(appearCharacterView.transform, playerAppearCharacterReserveModel) ); return(generatedAppearCharacterViewModel); }
private void EnqueueRemove(AppearCharacterViewModel appearCharacterViewModel) { this.reservedRemovableModels.Add(appearCharacterViewModel); }
private void Register(AppearCharacterViewModel appearCharacterViewModel) { this.appearCharacterViewModels.Add(appearCharacterViewModel); }
public void EnqueueRegister(AppearCharacterViewModel appearCharacterViewModel) { this.reservedRegisterModels.Add(appearCharacterViewModel); }