Ejemplo n.º 1
0
    public void LoadHeroOverview(TreatmentHeroSlot slot)
    {
        SelectedSlot = slot;
        SelectedSlot.ResetTreatment();
        int positiveQuirks = 0;

        foreach (var posQuirk in slot.TreatmentSlot.Hero.PositiveQuirks)
        {
            positiveSlots[positiveQuirks++].UpdateQuirk(posQuirk);
        }

        for (int i = positiveQuirks; i < positiveSlots.Count; i++)
        {
            positiveSlots[i].ResetSlot();
        }

        int negQuirks = 0;

        foreach (var negQuirk in slot.TreatmentSlot.Hero.NegativeQuirks)
        {
            negativeSlots[negQuirks++].UpdateQuirk(negQuirk);
        }

        for (int i = negQuirks; i < negativeSlots.Count; i++)
        {
            negativeSlots[i].ResetSlot();
        }

        RecalculateCost();
        gameObject.SetActive(true);
    }
 void SanitariumWindow_onTreatmentButtonClick(TreatmentHeroSlot slot)
 {
     if (slot.TreatmentSlot.Status == ActivitySlotStatus.Paid)
     {
         TownManager.GetHeroSlot(slot.TreatmentSlot.Hero).SetStatus(HeroStatus.Available);
         slot.SetStatus(ActivitySlotStatus.Available);
     }
 }
Ejemplo n.º 3
0
 private void TreatmentHeroSlotButtonClicked(TreatmentHeroSlot slot)
 {
     if (slot.TreatmentSlot.Status == ActivitySlotStatus.Paid)
     {
         EstateSceneManager.Instanse.TownManager.GetHeroSlot(slot.TreatmentSlot.Hero).SetStatus(HeroStatus.Available);
         slot.SetStatus(ActivitySlotStatus.Available);
     }
 }
 void SanitariumWindow_onDiseaseHeroRemoved(TreatmentHeroSlot slot)
 {
     for (int i = 0; i < 3; i++)
     {
         quirkSlots[i].UpdateSlot();
         diseaseSlots[i].UpdateSlot();
     }
     diseaseWindow.ResetWindow();
 }
 void SanitariumWindow_onDiseaseHeroDropped(TreatmentHeroSlot slot)
 {
     diseaseWindow.LoadHeroOverview(slot);
     for (int i = 0; i < 3; i++)
     {
         quirkSlots[i].buttonIcon.gameObject.SetActive(false);
         diseaseSlots[i].buttonIcon.gameObject.SetActive(false);
     }
 }
 public void ResetWindow()
 {
     SelectedSlot = null;
     for (int i = 0; i < diseaseSlots.Count; i++)
     {
         diseaseSlots[i].ResetSlot();
     }
     gameObject.SetActive(false);
 }
Ejemplo n.º 7
0
 private void TreatmentHeroSlotDiseaseHeroRemoved(TreatmentHeroSlot slot)
 {
     for (int i = 0; i < 3; i++)
     {
         quirkSlots[i].UpdateSlot();
         diseaseSlots[i].UpdateSlot();
     }
     diseaseWindow.ResetWindow();
 }
Ejemplo n.º 8
0
 private void TreatmentHeroSlotQuirkHeroDropped(TreatmentHeroSlot slot)
 {
     quirkWindow.LoadHeroOverview(slot);
     for (int i = 0; i < 3; i++)
     {
         quirkSlots[i].ButtonIcon.gameObject.SetActive(false);
         diseaseSlots[i].ButtonIcon.gameObject.SetActive(false);
     }
 }
 public void ResetWindow()
 {
     SelectedSlot = null;
     for (int i = 0; i < positiveSlots.Count; i++)
     {
         positiveSlots[i].ResetSlot();
     }
     for (int i = 0; i < negativeSlots.Count; i++)
     {
         negativeSlots[i].ResetSlot();
     }
     gameObject.SetActive(false);
 }
Ejemplo n.º 10
0
    public void LoadHeroOverview(TreatmentHeroSlot slot)
    {
        SelectedSlot = slot;
        SelectedSlot.ResetTreatment();
        int diseasesCount = 0;

        foreach (var disease in slot.TreatmentSlot.Hero.Diseases)
        {
            diseaseSlots[diseasesCount++].UpdateQuirk(disease);
        }

        for (int i = diseasesCount; i < diseaseSlots.Count; i++)
        {
            diseaseSlots[i].ResetSlot();
        }

        RecalculateCost();
        gameObject.SetActive(true);
    }