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); }
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; }
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); }
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); }
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); }
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); }
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); }