Exemplo n.º 1
0
 public TriggerButtonPress(Vector2 position, Vector2 size, Button b, params Door[] doors)
 {
     Doors = new List<Door>();
     Doors.AddRange(doors);
     Button = b;
     BBox = new AABB(position.X - size.X / 2, position.X + size.X / 2, position.Y + size.Y / 2, position.Y - size.Y / 2);
 }
Exemplo n.º 2
0
        public static bool IsColliding(AABB box1, AABB box2)
        {
            if (box1.Left > box2.Right) return false;
            if (box1.Right < box2.Left) return false;
            if (box1.Top < box2.Bottom) return false;
            if (box1.Bottom > box2.Top) return false;

            return true;
        }
Exemplo n.º 3
0
 public TriggerEndgame(Vector2 position, Vector2 size)
 {
     BBox = new AABB(position.X - size.X / 2, position.X + size.X / 2, position.Y + size.Y / 2, position.Y - size.Y / 2);
 }
Exemplo n.º 4
0
 public TriggerChangeArea(Vector2 position, Vector2 size, Area area)
 {
     Area = area;
     BBox = new AABB(position.X - size.X / 2, position.X + size.X / 2, position.Y + size.Y / 2, position.Y - size.Y / 2);
 }
Exemplo n.º 5
0
 public TriggerPickup(Vector2 position, Vector2 size, Entity ent)
 {
     Ent = ent;
     BBox = new AABB(position.X - size.X / 2, position.X + size.X / 2, position.Y + size.Y / 2, position.Y - size.Y / 2);
 }
Exemplo n.º 6
0
 public TriggerDoorOpen(Vector2 position, Vector2 size, Door door, string lockCode)
 {
     Door = door;
     LockCode = lockCode;
     BBox = new AABB(position.X - size.X / 2, position.X + size.X / 2, position.Y + size.Y / 2, position.Y - size.Y / 2);
 }
Exemplo n.º 7
0
 public TriggerReading(Vector2 position, Vector2 size, string text)
 {
     readingText = text;
     BBox = new AABB(position.X - size.X / 2, position.X + size.X / 2, position.Y + size.Y / 2, position.Y - size.Y / 2);
 }