//마우스가 메뉴 위에 올려질 경우 메뉴에 빛을 주는 메소드. public void DrawMenuLight() { if (GetIndex() != -1) { Standard.DrawLight(MenuList[GetIndex()].drawingLayer, Color.White, 0.3f, Standard.LightMode.Absolute); } }
/// <summary> /// This is called when the game should draw itself. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(WallColor); Standard.DrawLight(MasterInfo.FullScreen, Tester.Room.RoomColor, Math.Max(0f, (float)(1 - Tester.Score.var / 200.0)), Standard.LightMode.Absolute); /* * Viewport Temp = Game1.graphics.GraphicsDevice.Viewport; * Game1.graphics.GraphicsDevice.Viewport = new Viewport(MasterInfo.FullScreen); * if (Tester.BeforeEndTimer<Tester.BeforeEndTimer_Max) * Standard.DrawLight(MasterInfo.FullScreen, Color.White, (float)(Tester.BeforeEndTimer_Max - Tester.BeforeEndTimer) / (float)(Tester.BeforeEndTimer_Max), Standard.LightMode.Absolute); * Game1.graphics.GraphicsDevice.Viewport = Temp;*/ // TODO: Add your drawing code here tester.Draw(); Standard.Draw(); if (Tester.GamePhase == Tester.Phase.Game) { Color ScoreColor = Color.White; if (!Tester.IsEndPhase) { Standard.DrawString("Bigfont", Tester.Score.ToString() + "/100", new Vector2(Tester.player.GetPos().X, Tester.player.GetPos().Y - 20), ScoreColor); /* * switch (Checker.Bloodthirst) * { * case 1: * Standard.DrawString("Bigfont", Tester.Score.ToString() + "/100", new Vector2(Tester.player.getPos().X, Tester.player.getPos().Y - 20), Color.Red*(float)(Tester.Score/100.0)); * break; * case 2: * Standard.DrawString("Bigfont", Tester.Score.ToString() + "/100", new Vector2(Tester.player.getPos().X, Tester.player.getPos().Y - 20), Color.Red * (float)(Tester.Score%75 / 75.0)); * break; * case 3: * Standard.DrawString("Bigfont", Tester.Score.ToString() + "/100", new Vector2(Tester.player.getPos().X, Tester.player.getPos().Y - 20), Color.Red * (float)(Tester.Score%50 / 50.0)); * break; * }*/ Standard.DrawString("Bigfont", Tester.Score.ToString() + "/100", new Vector2(Tester.player.GetPos().X, Tester.player.GetPos().Y - 20), Color.Red * (float)(Checker.BloodStack)); } Tester.BuffBubble.Draw(); if (Tester.FreezeTimer >= 0) { if (Tester.FreezeTimer < 150) { Standard.DrawLight(MasterInfo.FullScreen, Color.Black, 1f, Standard.LightMode.Absolute); } /* * DrawingLayer DeadEnd = new DrawingLayer("DeadEnd2", MasterInfo.FullScreen); * GraphicsDevice.Viewport = new Viewport(MasterInfo.FullScreen); * if (Tester.FreezeTimer<180) * DeadEnd.Draw(Color.DarkRed); * if (Tester.FreezeTimer < 130) * Standard.DrawAddon(DeadEnd, Color.DarkRed, 1f, "DeadEnd3"); * if (Tester.FreezeTimer < 80) * Standard.DrawAddon(DeadEnd, Color.DarkRed, 1f, "DeadEnd1"); */ } if (Tester.FreezeTimer < 0) { if (Standard.Pressing(Keys.A)) { Standard.DrawAddon(Tester.player.player, Color.Blue, (float)Tester.HeartSignal * (float)(Standard.FrameTimer % 30 / 8.0), "Player_Heart"); } else { Standard.DrawAddon(Tester.player.player, Color.White, (float)Tester.HeartSignal * (float)(Standard.FrameTimer % 30 / 8.0), "Player_Heart"); } } else if (Tester.FreezeTimer > Tester.FreezeTime - 60) { Standard.DrawAddon(Tester.player.player, Color.White, (float)Tester.HeartSignal * (float)(Standard.FrameTimer % 30 / 8.0), "HeartBite1"); } else if (Tester.FreezeTimer > Tester.FreezeTime - 110) { Standard.DrawAddon(Tester.player.player, Color.White, (float)Tester.HeartSignal * (float)(Standard.FrameTimer % 30 / 8.0), "HeartBite2"); } if (Standard.FrameTimer % 15 == 0) { Standard.FadeAnimation(new DrawingLayer("Player_Heart", Tester.player.player.GetBound()), 20, Color.Pink); } if (Tester.Sight < 0) { Standard.DrawAddon(Tester.player.player, Color.Red, 1f, "Player_Heart"); } if (Standard.FrameTimer % 60 == 0) { if (!Tester.SlowMode) { Standard.PlayFadedSE("HeartBeat", Math.Min((float)Tester.HeartSignal, 1f)); } else { Standard.PlayFadedSE("HeartBeat", 1f); } } if (Tester.PressedATimer == 10) { if (Checker.Weapon_Melee != 18) { Standard.PlayFadedSE("Oveclock", 0.75f); } } if (Tester.PressedATimer > 0 && Tester.ChainTimer % 80 == 10) { if (Checker.Weapon_Melee == 18) { Standard.PlayFadedSE("ChainChan", 1f); } } if (!Tester.GameOver) { if (Tester.player.player.GetSpriteName() == "Player_Ani_S01") { Standard.DrawAddon(Tester.player.player, Color.White, 1f, "MoonLight02"); } if (Tester.player.player.GetSpriteName() == "Player_Ani_S02") { Standard.DrawAddon(Tester.player.player, Color.White, 1f, "MoonLight01"); } } if (Tester.GameOver) { if (Tester.FreezeTimer == Tester.FreezeTime - 110) { DeadSceneEvent(); } if (Tester.FreezeTimer > 0 && Tester.FreezeTimer < Tester.FreezeTime - 110) { GraphicsDevice.Viewport = new Viewport(MasterInfo.FullScreen); Tester.KillCard.SetRatio(Math.Min((Tester.FreezeTime - 110 - Tester.FreezeTimer) * 6, 75) / 120.0); Tester.KillCard.SetCenter(new Point(500, 400)); Tester.KillCard.Draw(Tester.FixedCamera, Color.White * (float)(Tester.FreezeTimer / 75.0)); if (Tester.KillCard.GetSpriteName() == "SDead_11") { Standard.DrawAddon(Tester.FixedCamera, Tester.KillCard, Tester.Room.RoomColor, (float)(Tester.FreezeTimer / 75.0), "Sdead_Add"); } } } if (!Tester.GameOver && !Tester.ShowMenu && Tester.FreezeTimer < 0) { for (int i = 0; i < Tester.bludgers.Count; i++) { Tester.bludgers[i].Draw(); Standard.DrawAddon(Tester.bludgers[i].bludger, Color.LightYellow, 1f, "BludgerFace"); if (Tester.bludgers[i].FrozenTimer > 0) { Standard.FadeAnimation(new DrawingLayer("frozen", new Rectangle(Tester.bludgers[i].bludger.GetPos(), new Point(100, 100))), 8, Color.FloralWhite); } if (Tester.bludgers[i].FrozenTimer == 0 && !Tester.ShowMenu && !Tester.GameOver && Standard.FrameTimer % 3 == 0) { if (Standard.FrameTimer % 30 < 15) { Standard.FadeAnimation(new DrawingLayer("BludgerFire", new Rectangle(Tester.bludgers[i].bludger.GetPos(), new Point(100, 100))), 8, Tester.Bludger.BludgerColor); } else { Standard.FadeAnimation(new DrawingLayer("BludgerFire2", new Rectangle(Tester.bludgers[i].bludger.GetPos(), new Point(100, 100))), 16, Tester.Bludger.BludgerColor); } } } } Checker.ShowStatus(); Standard.ViewportSwapDraw(new Viewport(MasterInfo.FullScreen), () => { if (Tester.BeforeEndTimer < Tester.BeforeEndTimer_Max) { Standard.DrawLight(MasterInfo.FullScreen, Color.White, (float)(Tester.BeforeEndTimer_Max - Tester.BeforeEndTimer) / (float)(Tester.BeforeEndTimer_Max), Standard.LightMode.Absolute); } } ); } #region Debug Setting : DEMOSTRING /* * Standard.ViewportSwapDraw(new Viewport(MasterInfo.FullScreen), () => Standard.DrawString(Tester.FixedCamera, "DEMO PLAY", new Vector2(10, 10), Color.White)); */ #endregion if (Tester.GamePhase == Tester.Phase.Extra) { Standard.ViewportSwapDraw(new Viewport(MasterInfo.FullScreen), () => Standard.DrawString(Tester.FixedCamera, "Heart Coins : " + Math.Max(HeartShop.HeartCoin, 0).ToString(), new Vector2(200, 10), Color.White)); } base.Draw(gameTime); }