public static SkillUnit.SkillJump ConvertSkillJump(SkillJump unit) { SkillUnit.SkillJump oUnit = new SkillUnit.SkillJump(); oUnit.id = unit.id; oUnit.height = unit.height; oUnit.speed = unit.speed; oUnit.moveTime = unit.moveTime; oUnit.maxInfluence = unit.maxInfluence; oUnit.jumpType = (SkillUnit.SkillJump.JumpType)(int) unit.jumpType; oUnit.hitArea = ConvertSkillShape(unit.hitArea); return(oUnit); }
public SkillJump Copy() { SkillJump b = new SkillJump(); b.id = id; b.moveTime = moveTime; b.speed = speed; b.height = height; b.jumpType = jumpType; b.hitArea = hitArea.Copy(); b.maxInfluence = maxInfluence; return(b); }
public static void DrawSkillJump(SkillJump line) { EditorGUILayout.BeginVertical("Box"); line.id = EditorGUILayout.IntField(" id", line.id); line.moveTime = EditorGUILayout.IntField(" moveTime", line.moveTime); line.speed = EditorGUILayout.FloatField(" speed:", line.speed); line.height = EditorGUILayout.FloatField(" height:", line.height); line.maxInfluence = EditorGUILayout.IntField(" maxInfluence:", line.maxInfluence); SkillJump.JumpType bp = line.jumpType; int newbp = EditorGUILayout.Popup(" jumpType:", (int)bp, Enum.GetNames(typeof(SkillJump.JumpType))); if (newbp != (int)bp) { bp = (SkillJump.JumpType)newbp; } SkillShape hitarea = line.hitArea; DrawSkillShape(" hitArea:", hitarea); EditorGUILayout.EndVertical(); }