public void Initialize() { this._fullyVirtual = false; this._fullyNonVirtual = false; this._virtualMode = false; this._smallBios = new BitmapFont("smallBiosFont", 7, 6); this._parallax = new ParallaxBackground("background/virtual", 0.0f, 0.0f, 3); float speed1 = 0.4f; float distance1 = 0.8f; this._parallax.AddZone(0, distance1, speed1); this._parallax.AddZone(1, distance1, speed1); this._parallax.AddZone(2, distance1, speed1); this._parallax.AddZone(3, distance1, speed1); float distance2 = 0.6f; float num = (float)(((double)distance1 - (double)distance2) / 4.0); float speed2 = 0.6f; this._parallax.AddZone(4, distance1 - num * 1f, speed2, true); this._parallax.AddZone(5, distance1 - num * 2f, -speed2, true); this._parallax.AddZone(6, distance1 - num * 3f, speed2, true); this._parallax.AddZone(7, distance2, speed1); this._parallax.AddZone(8, distance2, speed1); this._parallax.AddZone(19, distance2, speed1); this._parallax.AddZone(20, distance2, speed1); this._parallax.AddZone(21, distance1 - num * 3f, -speed2, true); this._parallax.AddZone(22, distance1 - num * 2f, speed2, true); this._parallax.AddZone(23, distance1 - num * 1f, -speed2, true); this._parallax.AddZone(24, distance1, speed1); this._parallax.AddZone(25, distance1, speed1); this._parallax.AddZone(26, distance1, speed1); this._parallax.AddZone(27, distance1, speed1); this._parallax.AddZone(28, distance1, speed1); this._parallax.AddZone(29, distance1, speed1); this._parallax.AddZone(30, distance1, speed1); this._parallax.AddZone(31, distance1, speed1); this._parallax.AddZone(32, distance1, speed1); this._parallax.AddZone(33, distance1, speed1); this._parallax.AddZone(34, distance1, speed1); this._parallax.restrictBottom = false; this._visible = true; this._parallax.y = 0.0f; this._scanner = new Sprite("background/scanbeam"); this._backgroundColor = Color.Black; this._parallax.layer = Layer.Virtual; }
public static void InitializeBack() { VirtualBackground._para = new ParallaxBackground("background/virtual", 0.0f, 0.0f, 3); float speed1 = 0.4f; float distance1 = 0.8f; VirtualBackground._para.AddZone(0, distance1, speed1); VirtualBackground._para.AddZone(1, distance1, speed1); VirtualBackground._para.AddZone(2, distance1, speed1); VirtualBackground._para.AddZone(3, distance1, speed1); float distance2 = 0.6f; float num = (float)(((double)distance1 - (double)distance2) / 4.0); float speed2 = 1f; VirtualBackground._para.AddZone(4, distance1 - num * 1f, speed2, true); VirtualBackground._para.AddZone(5, distance1 - num * 2f, -speed2, true); VirtualBackground._para.AddZone(6, distance1 - num * 3f, speed2, true); VirtualBackground._para.AddZone(7, distance2, speed1); VirtualBackground._para.AddZone(8, distance2, speed1); VirtualBackground._para.AddZone(19, distance2, speed1); VirtualBackground._para.AddZone(20, distance2, speed1); VirtualBackground._para.AddZone(21, distance1 - num * 3f, -speed2, true); VirtualBackground._para.AddZone(22, distance1 - num * 2f, speed2, true); VirtualBackground._para.AddZone(23, distance1 - num * 1f, -speed2, true); VirtualBackground._para.AddZone(24, distance1, speed1); VirtualBackground._para.AddZone(25, distance1, speed1); VirtualBackground._para.AddZone(26, distance1, speed1); VirtualBackground._para.AddZone(27, distance1, speed1); VirtualBackground._para.AddZone(28, distance1, speed1); VirtualBackground._para.AddZone(29, distance1, speed1); VirtualBackground._para.AddZone(30, distance1, speed1); VirtualBackground._para.AddZone(31, distance1, speed1); VirtualBackground._para.AddZone(32, distance1, speed1); VirtualBackground._para.AddZone(33, distance1, speed1); VirtualBackground._para.AddZone(34, distance1, speed1); VirtualBackground._para.restrictBottom = false; VirtualBackground._para.layer = new Layer("VIRTUALPARALLAX", 95, new Camera(0.0f, 0.0f, 320f, 320f * Graphics.aspect)); }