Ejemplo n.º 1
0
 string ToString(CHARACTER_PART _value)
 {
     switch (_value)
     {
         case CHARACTER_PART.ARM_MAIN:
             return "arm-main";
         case CHARACTER_PART.ARM_SUB:
             return "arm-sub";
         case CHARACTER_PART.BODY:
             return "body";
         case CHARACTER_PART.GLOVE_MAIN:
             return "glove";
         case CHARACTER_PART.GLOVE_SUB:
             return "glove";
         case CHARACTER_PART.HELM:
             return "helm";
         case CHARACTER_PART.NECK:
             return "neck";
         case CHARACTER_PART.LEG_0:
             return "leg0";
         case CHARACTER_PART.LEG_1:
             return "leg1";
         default:
             return "";
     }
 }
Ejemplo n.º 2
0
 public Sprite GetSprite_Armor(string _pak_name, CHARACTER_PART _armor_part, int _index, int _color)
 {
     Sprite value = _GetSprite_Armor(_pak_name, _armor_part, _index, _color);
     if (value == null && _index > 0)
     {
         value = _GetSprite_Armor(_pak_name, _armor_part, 0, _color);
     }
     if (value == null && _color > 0)
     {
         value = _GetSprite_Armor(_pak_name, _armor_part, 0, 0);
     }
     return value;
 }
Ejemplo n.º 3
0
 Sprite _GetSprite_Armor(string _pak_name, CHARACTER_PART _armor_part, int _index, int _color)
 {
     DevPart pak = null;
     if (m_package_list.TryGetValue(_pak_name, out pak)
         && pak.type == PACKAGE_TYPE.ARMOR)
     {
         int temp_index = _index * pak.color_count + _color;
         if (temp_index >= pak.items_armor.Count)
             return null;
         PackageData_Armor data = pak.items_armor[temp_index];
         switch (_armor_part)
         {
             case CHARACTER_PART.ARM_MAIN:
                 return data.sprite_arm_main;
             case CHARACTER_PART.ARM_SUB:
                 return data.sprite_arm_sub;
             case CHARACTER_PART.BODY:
                 return data.sprite_body;
             case CHARACTER_PART.GLOVE_MAIN:
                 return data.sprite_glove_main;
             case CHARACTER_PART.GLOVE_SUB:
                 return data.sprite_glove_sub;
             case CHARACTER_PART.HELM:
                 return data.sprite_helm;
             case CHARACTER_PART.LEG_0:
                 return data.sprite_leg0;
             case CHARACTER_PART.LEG_1:
                 return data.sprite_leg1;
             case CHARACTER_PART.NECK:
                 return data.sprite_neck;
             default:
                 break;
         }
     }
     return null;
 }
Ejemplo n.º 4
0
 public Sprite GetSprite_Unit(string _pak_name, CHARACTER_PART _armor_part, int _index, bool _equiped, bool _damaged)
 {
     Sprite value = _GetSprite_Unit(_pak_name, _armor_part, _index, _equiped, _damaged);
     if (value == null && _index > 0)
     {
         value = _GetSprite_Unit(_pak_name, _armor_part, 0, _equiped, _damaged);
     }
     return value;
 }
Ejemplo n.º 5
0
 public Sprite GetSprite_Unit(string _pak_name, CHARACTER_PART _armor_part, int _index)
 {
     return GetSprite_Unit(_pak_name, _armor_part, _index, false, false);
 }
Ejemplo n.º 6
0
 Sprite _GetSprite_Unit(string _pak_name, CHARACTER_PART _armor_part, int _index, bool _equiped, bool _damaged)
 {
     DevPart pak = null;
     if (m_package_list.TryGetValue(_pak_name, out pak)
         && pak.type == PACKAGE_TYPE.UNIT
         && _index < pak.items_unit.Count)
     {
         PackageData_Unit data = pak.items_unit[_index];
         switch (_armor_part)
         {
             case CHARACTER_PART.ARM_MAIN:
                 return data.sprite_arm_main;
             case CHARACTER_PART.ARM_SUB:
                 return data.sprite_arm_sub;
             case CHARACTER_PART.BODY:
                 return data.sprite_body;
             case CHARACTER_PART.EYE:
                 if (_damaged)
                     return data.sprite_eye_damage;
                 else
                     return data.sprite_eye_normal;
             case CHARACTER_PART.FACE:
                 if (_equiped)
                     return data.sprite_face_equiped;
                 else
                     return data.sprite_face_normal;
             case CHARACTER_PART.GLOVE_MAIN:
                 return data.sprite_glove_main;
             case CHARACTER_PART.GLOVE_SUB:
                 return data.sprite_glove_sub;
             case CHARACTER_PART.LEG_0:
                 return data.sprite_leg0;
             case CHARACTER_PART.LEG_1:
                 return data.sprite_leg1;
             default:
                 break;
         }
     }
     return null;
 }