Пример #1
0
 public abstract void GetPathWithInsideViaPoint(Vec2 source, Vec2 target, Queue<Vec2> path, int playerIndex, bool spawnLower);
Пример #2
0
 // gets a path
 public abstract void GetPath(Vec2 source, Vec2 target, Queue<Vec2> path);
Пример #3
0
 static public Vec2 operator -(Vec2 vec0, Vec2 vec1)
 {
     Vec2 returnVec = new Vec2(vec0.X-vec1.X, vec0.Y-vec1.Y);
     return returnVec;
 }
Пример #4
0
 static public Vec2 operator *(Vec2 vec0, float s)
 {
     Vec2 returnVec = new Vec2(vec0.X * s, vec0.Y * s);
     return returnVec;
 }
Пример #5
0
 static public float Dot(Vec2 vec0, Vec2 vec1)
 {
     return vec0.X * vec1.X + vec0.Y * vec1.Y;
 }
Пример #6
0
        public bool Equals(Vec2 p)
        {
            // If parameter is null return false:
            if ((object)p == null)
            {
                return false;
            }

            // Return true if the fields match:
            return (mX == p.mX) && (mY == p.mY);
        }