public override void Initialize() { bg = new GameSprite("menu\\background"); AddSceneObject(bg); scroll = new GameSprite("menu\\scroll"); AddSceneObject(scroll); play = new GameButton("menu\\explore", true, false, true); play.Color = Color.White * 0.1f; play.Origin = new Vector2(216.5f, 55); play.Translate(400, 130); play.OnClick += () => { SceneManager.push.Play(); SceneManager.SetActiveScene("LevelSelect"); SceneManager.ActiveScene.ResetScene(); }; AddSceneObject(play); setting = new GameButton("menu\\settings", true, false, true); setting.Color = Color.White * 0.1f; setting.Origin = new Vector2(148, 37.5f); setting.Translate(400, 235); setting.OnClick += () => { SceneManager.push.Play(); SceneManager.SetActiveScene("OptionScene"); SceneManager.ActiveScene.ResetScene(); }; AddSceneObject(setting); codex = new GameButton("menu\\archive", true, false, true); codex.Color = Color.White * 0.1f; codex.Origin = new Vector2(148, 46); codex.Translate(400, 350); codex.OnClick += () => { SceneManager.push.Play(); SceneManager.SetActiveScene("Archive"); SceneManager.ActiveScene.ResetScene(); }; AddSceneObject(codex); decor1 = new GameAnimatedSprite("menu\\decor", 9, 80, new Point(441, 39), 1); decor1.Color = Color.White * 0.1f; decor1.Origin = new Vector2(220.5f, 19.5f); decor1.Translate(400, 50); decor1.PlayAnimation(true); AddSceneObject(decor1); decor2 = new GameAnimatedSprite("menu\\decor", 9, 80, new Point(441, 39), 1); decor2.Color = Color.White * 0.1f; decor2.Origin = new Vector2(220.5f, 19.5f); decor2.Translate(400, 430); decor2.PlayAnimation(true); AddSceneObject(decor2); base.Initialize(); }
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() { bg = new GameSprite("archive\\kalsel"); AddSceneObject(bg); jukung = new GameButton("archive\\jukung", false, false, true); jukung.Origin = new Vector2(120.5f, 153.5f); jukung.Translate(150, 300); jukung.OnClick += () => { if (!isCodexUp) { SceneManager.push.Play(); isCodexUp = true; jukungcodex.CanDraw = true; } }; AddSceneObject(jukung); babi = new GameButton("archive\\babi", false, false, true); babi.Origin = new Vector2(120.5f, 153.5f); babi.Translate(410, 300); babi.OnClick += () => { if (!isCodexUp) { SceneManager.push.Play(); isCodexUp = true; babicodex.CanDraw = true; } }; AddSceneObject(babi); pinang = new GameButton("archive\\pinang", false, false, true); pinang.Origin = new Vector2(120.5f, 153.5f); pinang.Translate(660, 300); pinang.OnClick += () => { if (!isCodexUp) { SceneManager.push.Play(); isCodexUp = true; pinangcodex.CanDraw = true; } }; AddSceneObject(pinang); jukungcodex = new GameSprite("archive\\jukungcodex"); jukungcodex.CanDraw = false; AddSceneObject(jukungcodex); babicodex = new GameSprite("archive\\babicodex"); babicodex.CanDraw = false; AddSceneObject(babicodex); pinangcodex = new GameSprite("archive\\pinangcodex"); pinangcodex.CanDraw = false; AddSceneObject(pinangcodex); base.Initialize(); }
public void InitiateBox() { box = new GameSprite("select\\infobox"); box.Origin = new Vector2(182.5f, 182.5f); box.Translate(550, 220); box.CanDraw = false; AddHUDObjectFront(box); star1 = new GameSprite("select\\star1"); star1.Origin = new Vector2(36.5f, 36.5f); star1.Translate(550, 290); star1.CanDraw = false; AddHUDObjectFront(star1); star2 = new GameSprite("select\\star1"); star2.Origin = new Vector2(36.5f, 36.5f); star2.Translate(480, 290); star2.CanDraw = false; AddHUDObjectFront(star2); star3 = new GameSprite("select\\star1"); star3.Origin = new Vector2(36.5f, 36.5f); star3.Translate(620, 290); star3.CanDraw = false; AddHUDObjectFront(star3); song = new SpriteFonts("font\\fontbold"); song.Translate(435, 95); song.Color = Color.SaddleBrown; song.Text = "AMPAR-AMPAR\n PISANG"; song.CanDraw = false; AddHUDObjectFront(song); line1 = new GameSprite("select\\line"); line1.Origin = new Vector2(132, 4.5f); line1.Translate(550, 180); line1.CanDraw = false; AddHUDObjectFront(line1); region = new SpriteFonts("font\\font"); region.Translate(440, 195); region.Color = Color.SaddleBrown; region.Text = "South Kalimantan"; region.CanDraw = false; AddHUDObjectFront(region); line2 = new GameSprite("select\\line"); line2.Origin = new Vector2(132, 4.5f); line2.Translate(550, 240); line2.CanDraw = false; AddHUDObjectFront(line2); text = new SpriteFonts("font\\font"); text.Translate(15, 15); text.Color = Color.SaddleBrown; text.Text = "Select Level/Region..."; AddHUDObjectFront(text); play = new GameButton("select\\playbutton", true, false, true); play.Origin = new Vector2(90.5f, 44.5f); play.Translate(550, 385); play.CanDraw = false; play.OnClick += () => { if (isLevelSelected) { SceneManager.push.Play(); SceneManager.SetActiveScene("Level1"); SceneManager.ActiveScene.ResetScene(); SceneManager.PlaySong(2); play.CanDraw = false; } }; AddHUDObjectFront(play); }
public override void Initialize() { // set game speed SceneManager.RenderContext.GameSpeed = 100; random = new Random(); notes = new List <Note>(); longNotes = new List <LongNote>(); bg = new Background1(); AddHUDObjectBack(bg); pipe = new Pipe("level1\\pipe", 50); AddHUDObjectBack(pipe); indicator = new Indicator(); AddHUDObjectFront(indicator); text = new SpriteFonts("font\\font"); text.Color = Color.SaddleBrown; text.Translate(580, 10); AddHUDObjectBack(text); fire = new GameButton("level1\\invisbutton", false, false, false); fire.CanDraw = false; fire.Translate(400, 0); fire.OnEnter += () => { if (!isFailed && !isFinished) { SceneManager.Vibrator.Start(TimeSpan.FromMilliseconds(100)); indicator.Pushed(); //Debug.WriteLine(MediaPlayer.PlayPosition); if (LongNoteCheck() == 0) { //Debug.WriteLine(mainChar.Sprite.Position.X); SpawnScore(NoteCheck()); } else { //Debug.WriteLine(mainChar.Sprite.Position.X); mainChar.LightOnForever(); SceneManager.pulse2.Play(); } } }; fire.OnClick += () => { if (!isFailed && !isFinished) { //Debug.WriteLine(mainChar.Sprite.Position.X); indicator.Pulled(); SpawnScore(NoteCheckOut()); } }; fire.OnLeave += () => { indicator.Pulled(); }; AddHUDObjectBack(fire); InitiateScoring(); InitiateNote(); InitiateLongNote(); mainChar = new MainCharacter(50, 300, indicator); AddSceneObject(mainChar); failed = new GameSprite("level1\\boxfailed"); failed.Origin = new Vector2(181, 149.5f); failed.Translate(400, -300); failed.CanDraw = false; AddHUDObjectFront(failed); finished = new GameSprite("level1\\boxfinished"); finished.Origin = new Vector2(230, 181); finished.Translate(400, -300); finished.CanDraw = false; AddHUDObjectFront(finished); note = new SpriteFonts("font\\fontsmall"); note.Color = Color.Goldenrod; note.Translate(265, 280); AddHUDObjectFront(note); star1 = new GameAnimatedSprite("level1\\star", 12, 40, new Point(73, 73), 6); star1.Origin = new Vector2(36.5f, 36.5f); star1.Translate(400, -290); star1.CanDraw = false; AddHUDObjectFront(star1); star2 = new GameAnimatedSprite("level1\\star", 12, 40, new Point(73, 73), 6); star2.Origin = new Vector2(36.5f, 36.5f); star2.Translate(470, -290); star2.CanDraw = false; AddHUDObjectFront(star2); star3 = new GameAnimatedSprite("level1\\star", 12, 40, new Point(73, 73), 6); star3.Origin = new Vector2(36.5f, 36.5f); star3.Translate(330, -290); star3.CanDraw = false; AddHUDObjectFront(star3); next = new GameButton("level1\\next", true, false, false); next.CanDraw = false; next.Translate(420, -215); next.OnClick += () => { SceneManager.push.Play(); SceneManager.SetActiveScene("LevelSelect"); SceneManager.ActiveScene.ResetScene(); SceneManager.PlaySong(1); }; AddHUDObjectFront(next); retry = new GameButton("level1\\retry", true, false, false); retry.CanDraw = false; retry.Translate(295, -215); retry.OnClick += () => { }; AddHUDObjectFront(retry); base.Initialize(); }