public void blSetup()
 {
     fighters = new fightersScript(_baSee, level);
     if (isPlayerUni)
     {
         GetComponent <Image>().sprite = fighters._base.backVeiw;
     }
     else
     {
         GetComponent <Image>().sprite = fighters._base.frontVeiw;
     }
 }
Ejemplo n.º 2
0
    public bool Tdamage(MoveScript move, fightersScript attackerr)
    {
        float modies = Random.Range(0.85f, 1f); //Random number is added to ensure damge ammount varies each time //
        float a      = (2 * attackerr.level + 10) / 250f;
        float d      = a * move.Base.Power * ((float)attackerr.Attack / Defense) + 2;
        int   damage = Mathf.FloorToInt(d * modies);

        HP -= damage;
        if (HP <= 0)
        {
            HP = 0;
            return(true);
        }
        return(false);
    }
Ejemplo n.º 3
0
    //Sets values for tHe above classes(nmaeText,levelText and hpBar)//

    public void dataSetup(fightersScript fighters)
    {
        nameTxt.text  = fighters._base.Name;
        levelTxt.text = "Lvl" + fighters.level;
        hpBar.HPsetup((float)fighters.HP / fighters.HealthPoints);
    }