private void VisualizeNewReplica(Replica_Switch context) { _replica.text = Localizator.GetText(context.Replica.TextId); var data = _charactersData.GetCharacter(context.Replica.CharacterId); _character.sprite = data.Icon; }
public void SetChoice(Choice choice) { Choice = choice; if (choice.IsAvalible) { _text.text = Localizator.GetText(choice.TextId); } else { _text.text = Localizator.GetText(choice.BlockedTextId); } EnableButton(choice.IsAvalible); }
private void VisualizeChoice(Dialog_Give_Choice context) { _replica.text = Localizator.GetText(context.ChoiceTextId); var choicesDelta = context.Choices.Length - _choices.Count; for (int i = 0; i < choicesDelta; i++) { var newChoice = Instantiate(_choicePrefab, _choicesConteiner); _choices.Add(newChoice); newChoice.ChoiceMaded.Subscribe(x => { _switcher.OnChoiceMade(x.Choice); HideChoices(); }, _observers); } for (int i = 0; i < context.Choices.Length; i++) { _choices[i].SetChoice(context.Choices[i]); _choices[i].Show(); } }