示例#1
0
        public SkillHelix Copy()
        {
            SkillHelix b = new SkillHelix();

            b.id           = id;
            b.moveTime     = moveTime;
            b.maxRadius    = maxRadius;
            b.maxInfluence = maxInfluence;
            b.canPierce    = canPierce;
            b.hitArea      = hitArea.Copy();
            b.offset       = offset;
            return(b);
        }
        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();
        }
示例#3
0
        public static SkillUnit.SkillHelix ConvertSkillHelix(SkillHelix unit)
        {
            SkillUnit.SkillHelix oUnit = new SkillUnit.SkillHelix();
            oUnit.id        = unit.id;
            oUnit.moveTime  = unit.moveTime;
            oUnit.canPierce = unit.canPierce;
            oUnit.offset    = new Math.Vector3f();

            oUnit.offset.x = unit.offset.x;
            oUnit.offset.y = unit.offset.y;
            oUnit.offset.z = unit.offset.z;

            oUnit.maxRadius    = unit.maxRadius;
            oUnit.maxInfluence = unit.maxInfluence;
            oUnit.hitArea      = ConvertSkillShape(unit.hitArea);
            return(oUnit);
        }
示例#4
0
        public static SkillHelix ConvertSkillHelix(SkillUnit.SkillHelix unit)
        {
            SkillHelix oUnit = new SkillHelix();

            oUnit.id        = unit.id;
            oUnit.moveTime  = unit.moveTime;
            oUnit.canPierce = unit.canPierce;
            oUnit.offset    = Vector3.zero;
            if (unit.offset != null)
            {
                oUnit.offset = new Vector3(unit.offset.x, unit.offset.y, unit.offset.z);
            }
            oUnit.maxRadius    = unit.maxRadius;
            oUnit.maxInfluence = unit.maxInfluence;
            oUnit.hitArea      = ConvertSkillShape(unit.hitArea);
            return(oUnit);
        }