public static void DrawSkillArea(SkillArea line)
        {
            EditorGUILayout.BeginVertical("Box");
            line.id           = EditorGUILayout.IntField("  id", line.id);
            line.moveDelay    = EditorGUILayout.IntField("  moveDelay", line.moveDelay);
            line.waves        = EditorGUILayout.IntField("  waves:", line.waves);
            line.waveDelay    = EditorGUILayout.IntField("  waveDelay:", line.waveDelay);
            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();
        }
예제 #2
0
 public static SkillUnit.SkillArea ConvertSkillArea(SkillArea unit)
 {
     SkillUnit.SkillArea oUnit = new SkillUnit.SkillArea();
     oUnit.id           = unit.id;
     oUnit.referPoint   = (SkillUnit.SkillUnit.ReferPoint)(int) unit.referPoint;
     oUnit.basePoint    = (SkillUnit.SkillUnit.BasePoint)(int) unit.basePoint;
     oUnit.waves        = unit.waves;
     oUnit.waveDelay    = unit.waveDelay;
     oUnit.maxInfluence = unit.maxInfluence;
     oUnit.hitArea      = ConvertSkillShape(unit.hitArea);
     return(oUnit);
 }
예제 #3
0
        public SkillArea Copy()
        {
            SkillArea b = new SkillArea();

            b.id           = id;
            b.moveDelay    = moveDelay;
            b.referPoint   = referPoint;
            b.basePoint    = basePoint;
            b.waves        = waves;
            b.waveDelay    = waveDelay;
            b.maxInfluence = maxInfluence;
            b.hitArea      = hitArea.Copy();
            return(b);
        }