public override void Initialize() { bg = new GameSprite("select\\background"); bg.Scale(0.5f, 0.5f); AddSceneObject(bg); pole = new GameObject2D(); pole.Translate(400, 240); AddSceneObject(pole); level1 = new GameAnimatedSprite("select\\levelunlockanimated", 4, 80, new Point(78, 76)); level1.Origin = new Vector2(39, 38); level1.Translate(811, 597); AddSceneObject(level1); level2 = new GameSprite("select\\levellock"); level2.Origin = new Vector2(39, 38); level2.Translate(800, 778); AddSceneObject(level2); level3 = new GameSprite("select\\levellock"); level3.Origin = new Vector2(39, 38); level3.Translate(693, 755); AddSceneObject(level3); level4 = new GameSprite("select\\levellock"); level4.Origin = new Vector2(39, 38); level4.Translate(1083, 831); AddSceneObject(level4); level1_b = new GameButton("select\\levelunlock", false, true, true); level1_b.Origin = new Vector2(39, 38); level1_b.Translate(811, 597); level1_b.OnClick += () => { if (!isLevelSelected) { SceneManager.push.Play(); CameraManager.getInstance().camera.SetScreenCenter(4, 2); CameraManager.getInstance().camera.Focus = level1_b; level1.PlayAnimation(true); SetBoxDraw(true); isLevelSelected = true; } }; AddSceneObject(level1_b); InitiateBox(); }
public override void Initialize() { bg = new Background0(); AddSceneObject(bg); light = new GameSprite("title\\lighting"); AddSceneObject(light); back = new GameSprite("title\\background"); back.CanDraw = false; AddSceneObject(back); scroll = new GameAnimatedSprite("title\\scroll", 6, 80, new Point(640, 384), 3); scroll.Scale(1.25f, 1.25f); scroll.PlayAnimation(true); AddSceneObject(scroll); scrollUp = new GameAnimatedSprite("title\\scrollup", 6, 80, new Point(640, 384), 3); scrollUp.Scale(1.25f, 1.25f); scrollUp.CanDraw = false; AddSceneObject(scrollUp); logo = new GameSprite("title\\logo"); logo.Origin = new Vector2(275.5f, 74.5f); logo.Translate(400, 240); logo.Scale(0.8f, 0.8f); AddSceneObject(logo); tap = new GameButton("title\\tap", true, false, true); tap.Origin = new Vector2(191.5f, 32); tap.Translate(400, 400); tap.OnClick += () => { SceneManager.paper.Play(); bg.UpdateBackgroundSpeed(0); back.CanDraw = true; tap.CanDraw = false; scroll.CanDraw = false; logo.CanDraw = false; scrollUp.CanDraw = true; scrollUp.PlayAnimation(false); }; AddSceneObject(tap); base.Initialize(); }
public override void Initialize() { block = new GameSprite("level1\\block"); block.Origin = new Vector2(0, 25); block.CreateBoundingRect(50, 50, new Vector2(0, -25), false); block.Scale(scale); block.Translate(position); block.CanDraw = false; AddChild(block); noteIn = new Note(position, "level1\\note"); AddChild(noteIn); noteOut = new Note(position + scale * new Vector2(50, 0), "level1\\noteend"); AddChild(noteOut); base.Initialize(); }
public override void ResetScene() { CameraManager.getInstance().camera.Focus = pole; bg.Scale(0.5f, 0.5f); pole.Translate(400, 240); }