public static void DrawSkillBackStab(SkillBackStab line) { EditorGUILayout.BeginVertical("Box"); line.id = EditorGUILayout.IntField(" id", line.id); line.moveDelay = EditorGUILayout.IntField(" moveDelay", line.moveDelay); line.maxInfluence = EditorGUILayout.IntField(" maxInfluence:", line.maxInfluence); JSkillUnit.BasePoint bp = line.basePoint; int newbp = EditorGUILayout.Popup(" basePoint:", (int)bp, Enum.GetNames(typeof(JSkillUnit.BasePoint))); if (newbp != (int)bp) { bp = (JSkillUnit.BasePoint)newbp; } JSkillUnit.ReferPoint shape = line.referPoint; int newshape = EditorGUILayout.Popup(" referPoint:", (int)shape, Enum.GetNames(typeof(JSkillUnit.ReferPoint))); if (newshape != (int)shape) { shape = (JSkillUnit.ReferPoint)newshape; } SkillShape hitarea = line.hitArea; DrawSkillShape(" hitArea:", hitarea); EditorGUILayout.EndVertical(); }
//绘制形状 public static void DrawSkillShape(string title, SkillShape hitarea) { EditorGUILayout.BeginVertical("Box"); int newarea = EditorGUILayout.Popup(title, (int)hitarea.area, Enum.GetNames(typeof(SkillShape.Area))); if (newarea != (int)hitarea.area) { hitarea.area = (SkillShape.Area)newarea; } string p1 = ""; string p2 = ""; string p3 = ""; if (hitarea.area == SkillShape.Area.QUADRATE) { p1 = "长"; p2 = "宽"; } if (hitarea.area == SkillShape.Area.CIRCLE) { p1 = "半径"; } if (hitarea.area == SkillShape.Area.SECTOR) { p1 = "半径"; p3 = "弧度"; } if (hitarea.area == SkillShape.Area.TRIANGLE) { p1 = "高"; p2 = "底"; p3 = "1正2反"; } hitarea.param1 = EditorGUILayout.FloatField(" param1:" + p1, hitarea.param1); hitarea.param2 = EditorGUILayout.FloatField(" param2:" + p2, hitarea.param2); hitarea.param3 = EditorGUILayout.FloatField(" param3:" + p3, hitarea.param3); EditorGUILayout.EndVertical(); }
public static void DrawSkillAreaRandom(SkillAreaRand line) { EditorGUILayout.BeginVertical("Box"); line.id = EditorGUILayout.IntField(" id", line.id); line.unitID = EditorGUILayout.IntField(" unitID", line.unitID); line.unitCount = EditorGUILayout.IntField(" unitCount:", line.unitCount); JSkillUnit.BasePoint bp = line.basePoint; int newbp = EditorGUILayout.Popup(" basePoint:", (int)bp, Enum.GetNames(typeof(JSkillUnit.BasePoint))); if (newbp != (int)bp) { bp = (JSkillUnit.BasePoint)newbp; } JSkillUnit.ReferPoint shape = line.referPoint; int newshape = EditorGUILayout.Popup(" referPoint:", (int)shape, Enum.GetNames(typeof(JSkillUnit.ReferPoint))); if (newshape != (int)shape) { shape = (JSkillUnit.ReferPoint)newshape; } SkillShape hitarea = line.area; DrawSkillShape(" area:", hitarea); EditorGUILayout.EndVertical(); }
public static void ConvertSkillShape(SkillUnit.SkillShape oUnit, SkillShape unit) { oUnit.area = (SkillUnit.SkillShape.Area)(int) unit.area; oUnit.param1 = unit.param1; oUnit.param2 = unit.param2; oUnit.param3 = unit.param3; }
public static SkillUnit.SkillShape ConvertSkillShape(SkillShape unit) { SkillUnit.SkillShape oUnit = new SkillUnit.SkillShape(); oUnit.area = (SkillUnit.SkillShape.Area)(int) unit.area; oUnit.param1 = unit.param1; oUnit.param2 = unit.param2; oUnit.param3 = unit.param3; return(oUnit); }
public SkillShape Copy() { SkillShape b = new SkillShape(); b.area = area; b.param1 = param1; b.param2 = param2; b.param3 = param3; return(b); }
public static void DrawSkillFollow(SkillFollow line) { EditorGUILayout.BeginVertical("Box"); line.id = EditorGUILayout.IntField(" id", line.id); line.maxFollowTime = EditorGUILayout.IntField(" maxFollowTime", line.maxFollowTime); line.speed = EditorGUILayout.FloatField(" speed:", line.speed); line.waves = EditorGUILayout.IntField(" waves:", line.waves); line.waveDelay = EditorGUILayout.IntField(" waveDelay:", line.waveDelay); SkillShape hitarea = line.hitArea; DrawSkillShape(" hitArea:", hitarea); EditorGUILayout.EndVertical(); }
public static void DrawSkillHelix(SkillHelix line) { EditorGUILayout.BeginVertical("Box"); line.id = EditorGUILayout.IntField(" id", line.id); line.moveTime = EditorGUILayout.IntField(" moveTime", line.moveTime); line.maxRadius = EditorGUILayout.FloatField(" maxRadius:", line.maxRadius); line.maxInfluence = EditorGUILayout.IntField(" maxInfluence:", line.maxInfluence); line.canPierce = EditorGUILayout.Toggle(" canPierce:", line.canPierce); line.offset = EditorGUILayout.Vector3Field(" offset:", line.offset); SkillShape hitarea = line.hitArea; DrawSkillShape(" hitArea:", hitarea); EditorGUILayout.EndVertical(); }
//绘制弹道技能 public static void DrawSkillSingleLine(SkillLine 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.waves = EditorGUILayout.IntField(" waves:", line.waves); line.waveDelay = EditorGUILayout.IntField(" waveDelay:", line.waveDelay); line.maxInfluence = EditorGUILayout.IntField(" maxInfluence:", line.maxInfluence); line.canPierce = EditorGUILayout.Toggle(" canPierce:", line.canPierce); line.offset = EditorGUILayout.Vector3Field(" offset:", line.offset); SkillShape hitarea = line.hitArea; DrawSkillShape(" hitArea:", hitarea); EditorGUILayout.EndVertical(); }
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(); }