Exemple #1
0
        public virtual Vector2 CheckCol(Col other)
        {
            if (!IsAlive())
            {
                return(Vector2.Zero);
            }

            Vector2 output = Vector2.Zero;

            foreach (Col e in cols)
            {
                output += e.CheckCol(other);
            }

            if (output != Vector2.Zero)
            {
                ActorColGeneric(output);
            }

            return(output);
        }
Exemple #2
0
        protected bool CheckColBounds(Col other)
        {
            if (TL.X > other.BR.X)
            {
                return(false);
            }
            if (BR.X < other.TL.X)
            {
                return(false);
            }
            if (TL.Y > other.BR.Y)
            {
                return(false);
            }
            if (BR.Y < other.TL.Y)
            {
                return(false);
            }

            return(true);
        }
Exemple #3
0
        public virtual Vector2 CheckTrig(Col other)
        {
            if (!IsAlive())
            {
                return(Vector2.Zero);
            }

            Vector2 output = Vector2.Zero;

            foreach (Col e in trigs)
            {
                /*Console.WriteLine(other.TL.X + "," + other.TL.Y + " - " + other.BR.X + "," + other.BR.Y + " +++ " +
                 *                e.TL.X + "," + e.TL.Y + " - " + e.BR.X + "," + e.BR.Y);
                 */
                output += e.CheckCol(other);
            }

            if (output != Vector2.Zero)
            {
                ActorColGeneric(output);
            }

            return(output);
        }