コード例 #1
0
        private ComboBox ComboBoxForSecondarySkill(SecondarySkill skill)
        {
            Type skillType = skill.GetType();

            if (skillType == typeof(Offense))
            {
                return(HeroOffenseComboBox);
            }
            if (skillType == typeof(Archery))
            {
                return(HeroArcheryComboBox);
            }
            if (skillType == typeof(Armorer))
            {
                return(HeroArmorerComboBox);
            }

            if (skillType == typeof(AirMagic))
            {
                return(HeroAirComboBox);
            }
            if (skillType == typeof(FireMagic))
            {
                return(HeroFireComboBox);
            }
            if (skillType == typeof(EarthMagic))
            {
                return(HeroEarthComboBox);
            }
            if (skillType == typeof(WaterMagic))
            {
                return(HeroWaterComboBox);
            }

            return(null);
        }
コード例 #2
0
 public void SetSecondarySkill(SecondarySkill skill)
 {
     m_SecondarySkill = skill;
 }