예제 #1
0
    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;
    }
예제 #2
0
    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 + " умер от голода. Нужно что-то сделать с телом.");
    }
예제 #4
0
 public virtual void SetWorker(QuestCharacter character)
 {
     Worker = character;
 }
예제 #5
0
 public void SetData(QuestCharacter character)
 {
     QuestCharacter = character;
     Refresh();
 }
예제 #6
0
    public void AddCharacterToShelter(QuestCharacter character)
    {
        character.IsInShelter = true;

        AddCharacter(character);
    }
예제 #7
0
 public void AddCharacter(QuestCharacter character)
 {
     _characters.Add(character);
 }
예제 #8
0
 public QuestBuilding GetBuildingByWorker(QuestCharacter character)
 {
     return(Buildings.Find(x => x.Worker == character));
 }
예제 #9
0
 private void OnDeath(QuestCharacter questCharacter)
 {
 }
    public override string GetQuestion()
    {
        _character = Quest.Instance.Status.Characters.GetNewCharacter();

        return("Привет, меня зовут " + _character.Name + ". Я увидел дым от вашего костра. Можно присоединиться к вашей группе?");
    }
예제 #11
0
 public void SetData(QuestCharacter character)
 {
     _health.text = character.Health + "%";
     _hunger.text = (100 - character.Hunger) + "%";
     _thirst.text = (100 - character.Thirst) + "%";
 }