コード例 #1
0
    public void DrawShape(Color color)
    {
        if (!SystemConfig.IsOpenEffectDrawLine)
        {
            return;
        }
        if (this.fixBasePoint == null)
        {
            return;
        }
        GraghShape graghShape = this.graghShape;

        if (graghShape != GraghShape.Sector)
        {
            if (graghShape == GraghShape.Rect)
            {
                this.DrawRect(color);
            }
        }
        else if (this.IsCircle)
        {
            this.DrawCircle(color);
        }
        else
        {
            this.DrawSector(color);
        }
    }
コード例 #2
0
 public GraghMessage(XPoint theFixBasePoint, GraghShape theGraghShape, float theRange, float theAngle, float theWidth, float theHeight)
 {
     this.fixBasePoint = theFixBasePoint;
     this.graghShape   = theGraghShape;
     this.range        = theRange;
     this.angle        = theAngle;
     this.width        = theWidth;
     this.height       = theHeight;
     this.forward      = Quaternion.Euler(this.fixBasePoint.rotation.get_eulerAngles().x, this.fixBasePoint.rotation.get_eulerAngles().y, this.fixBasePoint.rotation.get_eulerAngles().z) * Vector3.get_forward();
 }
コード例 #3
0
    public bool InArea(Vector3 position, float hitRange = 0f)
    {
        if (this.fixBasePoint == null)
        {
            return(false);
        }
        GraghShape graghShape = this.graghShape;

        if (graghShape != GraghShape.Sector)
        {
            return(graghShape == GraghShape.Rect && this.InRectArea(position, hitRange));
        }
        if (this.IsCircle)
        {
            return(this.InCircleArea(position, hitRange));
        }
        return(this.InSectorArea(position, hitRange));
    }
コード例 #4
0
        protected List <Vector3> GetAccuratePointByWarningMessage(WarningMessage message)
        {
            List <Vector3> list       = new List <Vector3>();
            GraghShape     graghShape = message.graghShape;

            if (graghShape != GraghShape.Sector)
            {
                if (graghShape == GraghShape.Rect)
                {
                    list.AddRange(this.GetAccuratePointByRectangle(this.ownerActor.FixTransform.get_position(), message.fixBasePoint, message.width, message.height, XUtility.GetHitRadius(this.ownerActor.FixTransform), message.casterRadius));
                }
            }
            else if (message.IsCircle)
            {
                list.AddRange(this.GetAccuratePointByCircle(this.ownerActor.FixTransform.get_position(), message.fixBasePoint, message.range, XUtility.GetHitRadius(this.ownerActor.FixTransform), message.casterRadius));
            }
            else
            {
                list.AddRange(this.GetAccuratePointBySector(this.ownerActor.FixTransform.get_position(), message.fixBasePoint, message.range, message.angle, XUtility.GetHitRadius(this.ownerActor.FixTransform), message.casterRadius));
            }
            return(list);
        }
コード例 #5
0
 public WarningMessage(XPoint theFixBasePoint, GraghShape theAreaShape, float theRange, float theAngle, float theWidth, float theHeight, float theCasterRadius) : base(theFixBasePoint, theAreaShape, theRange, theAngle, theWidth, theHeight)
 {
     this.casterRadius = theCasterRadius;
 }