Beispiel #1
0
    private void setState(ArmyCardBase armystate)
    {
        //Text_RaceValue.text = armystate.Race.ToString();
        //Text_NameValue.text = armystate.Name.ToString();
        setName(armystate);
        Text_MaxHpValue.text = armystate.MaxHp.ToString();
        Text_HpValue.text    = armystate.Hp.ToString();

        SetPanelActive(true);
    }
Beispiel #2
0
    private void setName(ArmyCardBase armystate)
    {
        switch (armystate.Race)
        {
        case RaceType.ORC:
            Text_RaceValue.text = "兽族";

            switch (armystate.Name)
            {
            case OrcArmyCardType.Infantry:
                Text_NameValue.text   = "兽族步兵";
                Text_CanFlyValue.text = "否";
                break;

            case OrcArmyCardType.Eagle_Riders:
                Text_NameValue.text   = "鹰骑士";
                Text_CanFlyValue.text = "是";
                break;

            case OrcArmyCardType.Black_Rats_Boomer:
                Text_NameValue.text   = "黑鼠爆破手";
                Text_CanFlyValue.text = "否";
                break;

            case OrcArmyCardType.Giant_mouthed_Frog:
                Text_NameValue.text   = "巨口蛙";
                Text_CanFlyValue.text = "否";
                break;

            case OrcArmyCardType.Forest_Shooter:
                Text_NameValue.text   = "巫林射手";
                Text_CanFlyValue.text = "否";
                break;

            case OrcArmyCardType.Pangolin:
                Text_NameValue.text   = "尖刺穿山甲";
                Text_CanFlyValue.text = "否";
                break;

            case OrcArmyCardType.Raven_Shaman:
                Text_NameValue.text   = "乌鸦萨满";
                Text_CanFlyValue.text = "否";
                break;

            case OrcArmyCardType.Hero:
                Text_NameValue.text   = "兽族英雄";
                Text_CanFlyValue.text = "否";
                break;
            }
            break;
        }
    }
Beispiel #3
0
    /// <summary>
    /// 设置兵种属性
    /// </summary>
    /// <param name="cardDto"></param>
    private void setArmyState(CardDto cardDto)
    {
        switch (cardDto.Race)
        {
        case RaceType.ORC:

            switch (cardDto.Name)
            {
            case OrcArmyCardType.Infantry:
                armyState = new OrcInfantry();
                break;

            case OrcArmyCardType.Eagle_Riders:
                armyState = new OrcEagleRiders();
                break;

            case OrcArmyCardType.Black_Rats_Boomer:
                armyState = new OrcBlackRatsBoomer();
                break;

            case OrcArmyCardType.Giant_mouthed_Frog:
                armyState = new OrcGiantmouthedFrog();
                break;

            case OrcArmyCardType.Forest_Shooter:
                armyState = new OrcForestShooter();
                break;

            case OrcArmyCardType.Pangolin:
                armyState = new OrcPangolin();
                break;

            case OrcArmyCardType.Raven_Shaman:
                armyState = new OrcRavenShaman();
                break;

            case OrcArmyCardType.Hero:
                armyState = new OrcHero();
                break;
            }

            break;
        }
    }