コード例 #1
0
    void UpdateIntelligence()
    {
        IntField.GetComponent <Text> ().text = Int + "";

        this.Att_MgDmg     = 5 * Int;
        this.Att_MgDmgCrit = 2 * Int;
        this.Att_FireRes   = 1 * Con + 1 * Int;
        this.Att_IceRes    = 1 * Con + 1 * Int;;
        this.Att_LightRes  = 1 * Con + 1 * Int;

        MgDmg.GetComponent <Text> ().text     = Att_MgDmg + "";
        MgDmgCrit.GetComponent <Text> ().text = Att_MgDmgCrit + "";
        FireRes.GetComponent <Text> ().text   = Att_FireRes + "";
        IceRes.GetComponent <Text> ().text    = Att_IceRes + "";
        LightRes.GetComponent <Text> ().text  = Att_LightRes + "";
    }
コード例 #2
0
    void UpdateConstituition()
    {
        ConField.GetComponent <Text> ().text = Con + "";

        this.Att_Weight   = 2 * Str + 1 * Con;
        this.Att_HP       = 2 * Str + 5 * Con;
        this.Att_Armor    = 1 * Con;
        this.Att_FireRes  = 1 * Con + 1 * Int;
        this.Att_IceRes   = 1 * Con + 1 * Int;
        this.Att_LightRes = 1 * Con + 1 * Int;

        Weight.GetComponent <Text> ().text   = Att_Weight + "";
        HP.GetComponent <Text> ().text       = Att_HP + "";
        Armor.GetComponent <Text> ().text    = Att_Armor + "";
        FireRes.GetComponent <Text> ().text  = Att_FireRes + "";
        IceRes.GetComponent <Text> ().text   = Att_IceRes + "";
        LightRes.GetComponent <Text> ().text = Att_LightRes + "";
    }