示例#1
0
    void GetUnit()
    {
        UnitThis = Instantiate <UnitBehevior> (UnitsCanUse[UnitTurn], transform);
        UnitThis.transform.position = Vector3.one * 1000;

        UnitText.text    = UnitsCanUse[UnitTurn].name;
        UnitImage.sprite = UnitThis.transform.Find("Body").GetComponent <SpriteRenderer> ().sprite;
        AllText[0].text  = "Helty:" + UnitThis.data.Helty;
        AllText[1].text  = "Shild:" + UnitThis.data.Shild;
        AllText[2].text  = "Armor:" + UnitThis.data.Armor;
        AllText[3].text  = "Armor qulity:" + UnitThis.ArmorQulity;
        AllText[4].text  = "Skill for this weapon:" + UnitThis.Skills[WeaponThis.TypeWeapon];
        AllText[9].text  = "Unit Cost:" + UnitThis.WhatACost();

        AllText[10].text = "Unit and Weapon Cost:" + (UnitThis.WhatACost() + WeaponThis.WhatACost());
        AllText[13].text = UnitThis.data.PercOfUnit.Discription;
        AllText[14].text = "";
        for (int i = 0; i < 6; i++)
        {
            AllText[14].text += GetWeaponType(i) + " : " + UnitThis.Skills[i] + "\n";
        }
        AllText[15].text = UnitThis.data.Discription;
        AllText[16].text = UnitThis.data.PercOfUnit.name;
        AllText[17].text = "кол-во:" + UnitsCanUseCout[UnitTurn];
    }
示例#2
0
    void GetWeapon()
    {
        WeaponThis = Instantiate(WeaponCanUse[WeaponTurn], transform);
        WeaponThis.transform.position = Vector3.one * 1000;

        WeaponText.text    = WeaponCanUse[WeaponTurn].name;
        WeaponImage.sprite = WeaponThis.data.ImageOFGun;
        AllText[4].text    = "Skill for this weapon:" + UnitThis.Skills[WeaponThis.TypeWeapon];
        AllText[5].text    = "Ammo:" + WeaponThis.MaxLoad;
        AllText[6].text    = "Damage:" + WeaponThis.Damage;
        AllText[7].text    = "Optimal Distance:" + WeaponThis.NormalDistance.ToString() + "\n" +
                             "Max Distance:" + WeaponThis.MaxDistance;
        AllText[8].text = "Weapon Cost:" + WeaponThis.WhatACost() + "\n" +
                          "кол-во:" + WeaponCanUseCount[WeaponTurn];
        AllText[12].text     = "weapon fire:" + WeaponThis.fireTypeThis;
        AllText[10].text     = "Unit and Weapon Cost:" + (UnitThis.WhatACost() + WeaponThis.WhatACost());
        WeaponRareType.color = GetRareColor((int)WeaponThis.data.rareType);
    }