//特殊魔術の情報を設定する public void SetSpecailBulletInfo(MagicBase.MagicType type, int num) { int index = CastMagicTypeToIndex(type); this.special_bullet_image.sprite = special_bullet_icons[index]; this.specail_bullet_num_text.text = num.ToString(); }
//MagicTypeに対応した配列のインデックスを返す。 private int CastMagicTypeToIndex(MagicBase.MagicType type) { switch (type) { case MagicBase.MagicType.NORMAL: return(1); case MagicBase.MagicType.PENETRATION: return(2); case MagicBase.MagicType.SCATTER: return(3); default: return(0); } }