Example #1
0
        public static Vector2 ApplyDepthHook(On.RoomCamera.orig_ApplyDepth orig, RoomCamera camera, Vector2 ps, float depth)
        {
            if (!ShouldScroll(camera) || !origCameraPositions.ContainsKey(camera.room.abstractRoom.name))
            {
                return(orig(camera, ps, depth));
            }
            Vector2 realCameraPosition = new Vector2(0, 0);

            /*
             * foreach (Vector2 camPos in origCameraPositions[camera.room.abstractRoom.name])
             * {
             *  if (ps.x > camPos.x && ps.y > camPos.y && camPos.x + 1400 > ps.x && camPos.y + 800 > ps.y)
             *  {
             *      realCameraPosition = camPos;
             *  }
             * }
             */
            return(Custom.ApplyDepthOnVector(ps, /*realCameraPosition*/ DetermineOriginalCamPos(camera, ps) + new Vector2(700f, 533.3334f), depth));
        }