Example #1
0
 public override void Hide()
 {
     base.Hide();
     Model?.Dispose();
     Model = null;
     _disposablesForModel.DisposeAllAndClear();
 }
Example #2
0
        private void AddSkill(Model.SkillView model)
        {
            foreach (var skill in skillsArea.skills.Where(skill => !skill.IsShown))
            {
                skill.SetData(model);
                skill.Show();

                return;
            }
        }
Example #3
0
        public void SetData(Model.SkillView model)
        {
            if (model is null)
            {
                Hide();

                return;
            }

            _disposablesForModel.DisposeAllAndClear();
            Model = model;
            Model.name.SubscribeTo(nameText).AddTo(_disposablesForModel);
            Model.power.SubscribeTo(powerText).AddTo(_disposablesForModel);
            Model.chance.SubscribeTo(chanceText).AddTo(_disposablesForModel);

            base.SetData(model.iconSprite.Value);
        }