Exemplo n.º 1
0
 public void CalculateAndSetInfoPanelFields()
 {
     abilityInfoSheet.cooldownText.text   = abilityBaseCooldownTime.ToString();
     abilityInfoSheet.rangeText.text      = AbilityLogic.Instance.CalculateAbilityRange(this, myLivingEntity).ToString();
     abilityInfoSheet.energyCostText.text = AbilityLogic.Instance.CalculateAbilityEnergyCost(this, myLivingEntity).ToString();
     TextLogic.SetAbilityDescriptionText(this);
 }
Exemplo n.º 2
0
    public void AddAbilityToolTipToView(Ability ability)
    {
        GameObject           newToolTip  = Instantiate(PrefabHolder.Instance.enemyPanelAbilityTab, spellToolTipParent.transform);
        EnemyPanelAbilityTab tooltipData = newToolTip.GetComponent <EnemyPanelAbilityTab>();

        tooltipData.abilityImage.sprite = ability.myAbilityData.sprite;
        AbilityInfoSheetController.Instance.BuildSheetFromData(tooltipData.abilityInfoSheet, ability.myAbilityData, AbilityInfoSheet.PivotDirection.Upwards);
        TextLogic.SetAbilityDescriptionText(ability.myAbilityData, tooltipData.abilityInfoSheet.descriptionText);
    }
Exemplo n.º 3
0
 public void SetNewAbilityDescriptions()
 {
     if (myLivingEntity.defender)
     {
         foreach (Ability ability in myActiveAbilities)
         {
             TextLogic.SetAbilityDescriptionText(ability);
         }
     }
 }
Exemplo n.º 4
0
    public void BuildAllTextValueViewsFromData(AbilityInfoSheet sheet, AbilityDataSO data)
    {
        Debug.Log("AbilityInfoSheetController.BuildAllTextValueViewsFromData() called...");

        // Set up text files
        sheet.nameText.text       = data.abilityName;
        sheet.cooldownText.text   = data.baseCooldownTime.ToString();
        sheet.rangeText.text      = data.range.ToString();
        sheet.energyCostText.text = data.energyCost.ToString();
        TextLogic.SetAbilityDescriptionText(data, sheet.descriptionText);
        sheet.abilityImage.sprite = data.sprite;
    }
Exemplo n.º 5
0
    public void BuildTalentInfoPanelFromAbilityData(Talent talent)
    {
        // Get data
        AbilityDataSO data = AbilityLibrary.Instance.GetAbilityByName(talent.talentName);

        // Set button image
        talent.talentImage.sprite = data.sprite;

        // build text and images assets
        AbilityInfoSheetController.Instance.BuildSheetFromData(talent.abilityInfoSheet, data, AbilityInfoSheet.PivotDirection.Upwards);
        TextLogic.SetAbilityDescriptionText(data, talent.abilityInfoSheet.descriptionText);
    }