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();
        }
Пример #2
0
 public static SkillUnit.SkillAreaRand ConvertSkillAreaRand(SkillAreaRand unit)
 {
     SkillUnit.SkillAreaRand oUnit = new SkillUnit.SkillAreaRand();
     oUnit.id         = unit.id;
     oUnit.referPoint = (SkillUnit.SkillUnit.ReferPoint)(int) unit.referPoint;
     oUnit.basePoint  = (SkillUnit.SkillUnit.BasePoint)(int) unit.basePoint;
     oUnit.unitID     = unit.unitID;
     oUnit.unitCount  = unit.unitCount;
     oUnit.area       = ConvertSkillShape(unit.area);
     return(oUnit);
 }
Пример #3
0
        public SkillAreaRand Copy()
        {
            SkillAreaRand b = new SkillAreaRand();

            b.id         = id;
            b.referPoint = referPoint;
            b.basePoint  = basePoint;
            b.unitID     = unitID;
            b.unitCount  = unitCount;
            b.area       = area.Copy();
            return(b);
        }