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 ResetScene() { CameraManager.getInstance().camera.Focus = pole; bg.Scale(0.5f, 0.5f); pole.Translate(400, 240); }