Example #1
0
 public void UpdateInfos()
 {
     attackSpot.text    = currUnit.GetBaseAttack().ToString();
     defenceSpot.text   = currUnit.GetBaseDefence().ToString();
     healthSpot.text    = currUnit.MaxHP.ToString();
     moveSpeedSpot.text = currUnit.GetBaseMS().ToString();
     fluffBio.text      = currUnit.unitUnit.fluffBio;
 }
Example #2
0
    bool SetSelectedUnit()
    {
        if (RealOne)
        {
            if (MouseManager.Instance.SelectedUnit == null)
            {
                return(false);
            }
            unit = MouseManager.Instance.SelectedUnit;
        }
        else
        {
            if (MouseManager.Instance.MouseoveredUnit == null)
            {
                return(false);
            }
            unit = MouseManager.Instance.MouseoveredUnit;
        }



        Attack         = unit.CurrentAttack;
        Defence        = unit.CurrentDefence;
        Health         = unit.CurrentHP;
        PoisonCounters = unit.PoisonCounter;
        SetColourDependingOnSize(Attack, unit.GetBaseAttack(), attackText);
        SetColourDependingOnSize(Defence, unit.GetBaseDefence(), defenceText);
        SetColourDependingOnSize(Movement, unit.GetBaseMS(), movementText);
        SetColourDependingOnSize(Health, unit.MaxHP, healthText);
        if (unit.GetComponent <ShootingScript>() != null)
        {
            ShootingRange = unit.GetComponent <ShootingScript>().currShootingRange;
        }
        else
        {
            ShootingRange = 0;
        }

        Value    = unit.Value;
        Movement = unit.GetComponent <UnitMovement>().GetCurrentMoveSpeed(false);
        return(true);
    }