Esempio n. 1
0
 public List <List <IntPoint> > GetDelPolys(CompEntityPoly compsToInspect)
 {
     return(GetDelPolysOfMe(this, new List <CompEntityPoly>()
     {
         compsToInspect
     }));
 }
Esempio n. 2
0
 public List <List <IntPoint> > ApplyEffectPref(List <List <IntPoint> > spaceSoFar,
                                                CompEntityPoly newAdder,
                                                bool withAdd = true)
 {
     return(ApplyMe(spaceSoFar, new List <CompEntityPoly>()
     {
         newAdder
     }, withAdd));
 }
Esempio n. 3
0
        public List <List <IntPoint> > GetAreaPoly(CompEntityPoly adder)
        {
            var polys = new List <List <IntPoint> >();

            if (adder is BubbleEntityPoly)
            {
                BumpersHandler.AddBumpsAreaForBubble(ref polys, this, adder as BubbleEntityPoly);
            }
            else
            {
                polys = new List <List <IntPoint> >()
                {
                    AreaCompPolyHandler.GetBumperPoly((BumpRigid)CompObj, adder.PositionXNACenter2D)
                };
            }
            //EntraDrawer.DrawIntoFileTesting(polys);
            return(polys);
        }
Esempio n. 4
0
        private void AddToLog(List <List <IntPoint> > initialPoly, CompEntityPoly adder)
        {
            List <PolyLog> polys       = this.EntraAgentSimple.PolysLogger.GetLog();
            APPair         addedAPPair = null;

            foreach (PolyLog polyLog in polys)
            {
                if (polyLog.Comp == this)
                {
                    foreach (APPair apPair in polyLog.ApPairs)
                    {
                        if (apPair.AdderComp == adder)
                        {
                            addedAPPair = apPair;
                        }
                    }
                    if (addedAPPair != null)
                    {
                        polyLog.ApPairs.Remove(addedAPPair);
                    }
                }
            }
            this.EntraAgentSimple.PolysLogger.Log(new PolyLog(this, initialPoly, adder));
        }
Esempio n. 5
0
 public override List <List <IntPoint> > ApplyEffect(List <List <IntPoint> > spaceSoFar, CompEntityPoly newAdder)
 {
     return(ApplyMe(spaceSoFar, new List <CompEntityPoly>()
     {
         newAdder
     }, true));
 }
Esempio n. 6
0
 public abstract List <List <IntPoint> > ApplyEffect(List <List <IntPoint> > spaceSoFar, CompEntityPoly adderComp);
Esempio n. 7
0
        public override List <List <IntPoint> > ApplyEffect(List <List <IntPoint> > spaceSoFar, CompEntityPoly adder)
        {
            List <List <IntPoint> > result = new List <List <IntPoint> >();
            var initialPoly = this.GetAreaPoly();

            EntraDrawer.DrawIntoFile(initialPoly);

            if (adder is BlowerEntityPoly)
            {
                AddBlowersEffect(ref initialPoly);
            }
            EntraDrawer.DrawIntoFile(initialPoly);
            this.EntraAgentSimple.PolysLogger.Log(new PolyLog(this, initialPoly, adder));

            result = EntraSolver.GetPolySolution(initialPoly, spaceSoFar, ClipType.ctUnion);
            EntraDrawer.DrawIntoFile(result);
            return(result);
        }
Esempio n. 8
0
 public override List <List <IntPoint> > ApplyEffect(List <List <IntPoint> > spaceSoFar, CompEntityPoly adder)
 {
     throw new NotImplementedException();
 }
        public override List <List <IntPoint> > ApplyEffect(List <List <IntPoint> > spaceSoFar, CompEntityPoly adder)
        {
            List <List <IntPoint> > result = new List <List <IntPoint> >();

            var initialPoly = this.GetAreaPoly();

            //BumpersHandler.ReAddNewlyAddedBumpsAreas(ref initialPoly, this);
            this.EntraAgentSimple.PolysLogger.Log(new PolyLog(this, initialPoly, adder));

            result = EntraSolver.GetPolySolution(initialPoly, spaceSoFar, ClipType.ctUnion);
            EntraDrawer.DrawIntoFile(result);
            return(result);
        }
Esempio n. 10
0
        public override List <List <IntPoint> > ApplyEffect(List <List <IntPoint> > spaceSoFar, CompEntityPoly adder)
        {
            var initialPoly = this.GetAreaPoly();

            this.EntraAgentSimple.PolysLogger.Log(new PolyLog(this, initialPoly, null));

            var result = EntraSolver.GetPolySolution(initialPoly, spaceSoFar, ClipType.ctUnion);

            return(result);
        }