public Skill(EFFECT_TYPE skill_effect, ITEM_FEATURES right, ITEM_FEATURES left, ACTOR_STATUS_TYPE idle, ACTOR_STATUS_TYPE injury, ACTOR_STATUS_TYPE knockout) { _SkillEffect = skill_effect; _Idle = idle; _Right = right; _Left = left; _Knockout = knockout; _Injury = injury; }
private ACTOR_STATUS_TYPE _GetWeaponIdle(ITEM_FEATURES features) { switch (features) { case ITEM_FEATURES.WEAPON_AXE: return(ACTOR_STATUS_TYPE.BATTLE_AXE_IDLE); case ITEM_FEATURES.WEAPON_TWOHANDSWORD: return(ACTOR_STATUS_TYPE.TWO_HAND_SWORD_IDLE); default: return(ACTOR_STATUS_TYPE.MELEE_IDLE); } }
public Skill GetSkill() { var rightItem = Find(EQUIP_PART.RIGHT_HAND); var leftItem = Find(EQUIP_PART.LEFT_HAND); if (rightItem != null) { var rightFeatures = rightItem.GetPrototype().Features; ITEM_FEATURES leftFeatures = ITEM_FEATURES.NONE; if (leftItem != null) { leftFeatures = leftItem.GetPrototype().Features; } var effect = rightItem.Effects.FirstOrDefault(e => _Skills.Any(s => s.Effect == e.Type)); var val = (from skill in _Skills where skill.Conform(effect.Type, rightFeatures, leftFeatures) select skill).FirstOrDefault(); if (val != default(Skill)) { return(val); } } return(_Skills[0]); }
public bool Conform(EFFECT_TYPE effect, ITEM_FEATURES right_features, ITEM_FEATURES left_features) { return(effect == _SkillEffect && right_features == _Right && left_features == _Left); }
public bool Conform(EFFECT_TYPE effect, ITEM_FEATURES right_features, ITEM_FEATURES left_features) { return effect == _SkillEffect && right_features == _Right && left_features == _Left; }
public Skill(EFFECT_TYPE skill_effect, ACTOR_STATUS_TYPE status_idle, ITEM_FEATURES right, ITEM_FEATURES left) { _SkillEffect = skill_effect; _StatusIdle = status_idle; _Right = right; _Left = left; }
public void OnGUI() { EditorGUILayout.BeginVertical(); EditorGUILayout.BeginHorizontal(); if (GUILayout.Button("Load")) { var path = EditorUtility.OpenFilePanel("select", "", "txt"); _ItemSet = new ItemPrototypeSet(Regulus.Utility.Serialization.Read <ItemPrototype[]>(path)); } if (GUILayout.Button("Save")) { var path = EditorUtility.SaveFilePanel("select", "", "items.txt", "txt"); Regulus.Utility.Serialization.Write(_ItemSet.GetItems().ToArray(), path); } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); _Begin = EditorGUILayout.IntField("Begin", _Begin); _End = EditorGUILayout.IntField("End", _End); EditorGUILayout.EndHorizontal(); var set = _ItemSet.GetItems().Skip(_Begin).Take(_End - _Begin).ToArray(); var length = set.Length; var fieldLength = 5; var lineLength = length / fieldLength; EditorGUILayout.BeginVertical(); for (int i = 0; i <= lineLength; i++) { int index = i * fieldLength; int end = index + fieldLength; EditorGUILayout.BeginHorizontal(); for (; index < end && index < length; index++) { EditorGUILayout.SelectableLabel(set[index].Name); } EditorGUILayout.EndHorizontal(); } EditorGUILayout.EndVertical(); EditorGUILayout.BeginHorizontal(); _ItemName = EditorGUILayout.TextField("Name", _ItemName); _EquipPart = (EQUIP_PART)EditorGUILayout.EnumPopup("EquipPart", _EquipPart); _ItemFeatures = (ITEM_FEATURES)EditorGUILayout.EnumPopup("Features", _ItemFeatures); _Description = EditorGUILayout.TextField("Description", _Description); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); if (GUILayout.Button("Set/Add")) { _ItemSet.Add(new ItemPrototype() { Name = _ItemName, Features = _ItemFeatures, EquipPart = _EquipPart }); } if (GUILayout.Button("Load")) { var item = _ItemSet.Find(_ItemName); _ItemFeatures = item.Features; _Description = item.Description; _EquipPart = item.EquipPart; } if (GUILayout.Button("Remove")) { _ItemSet.Remove(_ItemName); } EditorGUILayout.EndHorizontal(); EditorGUILayout.EndVertical(); }