public void SetData(QuestCharacter questCharacter) { _status.SetData(questCharacter); _name.text = questCharacter.Name; List <string> effects = new List <string>(); if (questCharacter.IsSufferingByHunger) { effects.Add("Страдает от голода"); } if (questCharacter.IsSufferingByThirst) { effects.Add("Страдает от жажды"); } string effectsString = effects.Count == 0 ? "Нет активных эффектов" : string.Empty; for (int i = 0; i < effects.Count; i++) { effectsString += string.IsNullOrEmpty(effectsString) ? "" : "\n"; effectsString += effects[i]; } _effects.text = questCharacter.GetJobText() + "\n" + effectsString; }
public QuestCharacter GetNewCharacter() { QuestCharacter character = new QuestCharacter(); character.Name = GenerateName(); return(character); }
public override string GetQuestion() { _character = Quest.Instance.Status.Characters.Find ( QuestCharacterDeathReason.Starvation, QuestCharacterBurialType.None ); return(_character.Name + " умер от голода. Нужно что-то сделать с телом."); }
public virtual void SetWorker(QuestCharacter character) { Worker = character; }
public void SetData(QuestCharacter character) { QuestCharacter = character; Refresh(); }
public void AddCharacterToShelter(QuestCharacter character) { character.IsInShelter = true; AddCharacter(character); }
public void AddCharacter(QuestCharacter character) { _characters.Add(character); }
public QuestBuilding GetBuildingByWorker(QuestCharacter character) { return(Buildings.Find(x => x.Worker == character)); }
private void OnDeath(QuestCharacter questCharacter) { }
public override string GetQuestion() { _character = Quest.Instance.Status.Characters.GetNewCharacter(); return("Привет, меня зовут " + _character.Name + ". Я увидел дым от вашего костра. Можно присоединиться к вашей группе?"); }
public void SetData(QuestCharacter character) { _health.text = character.Health + "%"; _hunger.text = (100 - character.Hunger) + "%"; _thirst.text = (100 - character.Thirst) + "%"; }