ç§ã¯åžžã«ããã°ã©ãã³ã°ã®æ¹æ³ãåŠã³ããã£ãã®ã§ãããæãåºæ¿çãªåŠç¿ããã»ã¹ã¯ã²ãŒã ã®äœæã§ãããªããªãããã®åä»ãªéã§ããªãã®äœåã®èŠèŠçã§å ·äœçãªçµæãåŸãããšãã§ããããã§ãã ããã¯ãåŠç¿ããã»ã¹ã«ãšã£ãŠéåžžã«éèŠã§ããããã«ãããèå³ãåºæ¿ããå ãžé²ãæ欲ãé«ããããšãã§ããŸãã
ããŒãœãã«ã³ã³ãã¥ãŒã¿ãŒãšé»è©±ã®äž¡æ¹ã§Windowsãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®ãŠãŒã¶ãŒãšããŠãCïŒãéžæããããšãæãè«ççã§ãããšå€æããŸããã ä»äºã«åãæãã£ãåŸãããã°ã©ãã³ã°ã®åéã§ã®ãããªãçºå±ãèŠæ®ããŠããã€ã¯ããœããã®èšèªãéçºç°å¢ãããã³ãšã³ã·ã¹ãã å šäœã®åºæ¬çãªæ©èœã調æ»ãããšããç®æšãèšå®ããŸããã
ã¢ãã€ã«ã²ãŒã ã®éçºãæ¬æ°ãªæèœã®ããã°ã©ãã£ãã¯ãã¶ã€ããŒã®ã¬ãŒã«ãã¬ã³ããšã¢ã€ãã¢ãšé¡æãå ±æãããäžçæé«ãã®ã²ãŒã ã®äœæãéå§ããããšã«ããŸããã
ç§ãã¡ã®åªåã®çµæããµãŒãããŒãã£ã®ã©ã€ãã©ãªãªãã§CïŒãšXAMLã®ã¿ã§èšè¿°ããããèŠèŠèšæ¶ããã¬ãŒãã³ã°ããããã®ã·ã³ãã«ã§æ°åããªãã²ãŒã ãåŸãŸããã ãã¬ã€ã€ãŒã«ã¯ãç»é¢äžã®åã®äœçœ®ãèšå ¥ããæéãäžããããŸãããã®åŸãã¡ã¢ãªããåã埩å ããå¿ èŠããããŸãã ã²ãŒã ã«ã¯10ã®ã¬ãã«ããããããããã®ã¬ãã«ã§åã®æ°ãå¢ããŸãã è©Šè¡ã¯ãç»é¢äžã®ãªããžã§ã¯ãã®æ°ããã1ã€ãŸãã¯2ã€å€ãäžããããŸãã ã²ãŒã ãå®äºããããã«ããã¬ãŒã€ãŒã«ã¯5ã€ã®ã©ã€ãããããŸãã
æåã®ã²ãŒã ã®éçºãšå ¬éã«ããã次ã®éèŠãªç¹ãç解ããå°ãçµéšãç©ãããšãã§ããŸããã
1ïŒCïŒèšèªãXAMLãããã³WinRTãã©ãããã©ãŒã å šäœã®åºæ¬çãªç¥èã
2ïŒã¢ããªã±ãŒã·ã§ã³ã®ããŒã«ã©ã€ãº[ ãªã³ã¯ ]ã
3ïŒè©äŸ¡ã¡ã«ããºã ã®è¿œå [ ãªã³ã¯ ]ã
4ïŒã¢ã«ãŠã³ããäœæããWindowsã¹ãã¢ã«å ¬éããŸãã
5ïŒAdDuplexãSmaatoãMicrosoft Advertisingåºåãæ§æããMicrosoftåºå仲ä»è [ link ã link ã link ]ãä»ããŠã¢ããªã±ãŒã·ã§ã³ã«è¿œå ããŸãã
æåã®ã²ãŒã ãå ¬éããããŸã§ã«ã次ã®ãããžã§ã¯ãã«å¿ èŠãªãã®ã«ã€ããŠã®æ°ããã¢ã€ãã¢ãšç解ããããã圢æãããŸããã å°æ¥ã®ã²ãŒã ã®åºæ¬çãªèŠä»¶ãèªåã§æ±ºå®ããŸããã
1ïŒç®¡çã¯ãã¯ã³ã¯ãªãã¯ïŒ1æ¬ã®æïŒã§å®è¡ããå¿ èŠããããŸãã
2ïŒã¬ãã«ãªãã§ã次ã®ã·ãŒã³ãå«ãïŒéå§ç»é¢ãã¡ãã¥ãŒãæ瀺ãã²ãŒã ãäžæåæ¢ãåèµ·åã
3ïŒãã€ã³ãã®æ倧æ°ãèšé²ããããšãç®çãšãããç¡éã§ãªããã°ãªããŸããã
4ïŒæ¥œããææŠçã§ãªããã°ãªããŸããã
5ïŒãã¡ããçŸããã
ã²ãŒã ã®ã³ã³ã»ããã¯æ¬¡ã®ãšããã§ããç»é¢ã®äžå€®ã«ãªããžã§ã¯ãïŒãã³ã¢ããšåŒã³ãŸãïŒããããä»ã®ãªããžã§ã¯ããé£ç¶ããŠä»»æã®æ¹åã«ç§»åãããã¬ã€ã€ãŒã®ã¿ã¹ã¯ã¯ã³ã¢ãä¿è·ããããšã§ãã ã³ã¢ã«é£ãã§ãããªããžã§ã¯ãã®åå°ãæåãããã³ã«ãã¬ã€ã€ãŒã«ãã€ã³ããäžãããã倱æã¯æåã«ã€ãªãããã²ãŒã ãæ°ãã«å§ãŸããŸãã
ãã¶ã€ããŒã¯å¿è匷ã責任ãæã£ãŠç§ã®ããŠã£ãã·ã¥ãªã¹ããã®å®è£ ã«ã¢ãããŒãããSFã¹ã¿ã€ã«ã®ã³ã³ã»ããã²ãŒã ãäœæããŸããã
ãã£ã®ã¥ã¢ã®ãã¶ã€ã³ã«ãããäž»èŠãªæ±ºå®ã«èœã¡çããåŸã圌ãã¯çã ããã»ã©ã«ã©ãŒã¹ããŒã ãéžæããŸããã
ãã€ãã£ãã®éçºããŒã«ãæ®ããããããŸããã§ãã-ç¿åŸããç¥èãçµ±åããå¿ èŠããããŸããã ãããã£ãŠãCïŒã®æ¢åã®ç¡æãšã³ãžã³ã®åæãç¶ããŸããã éžæããéã®æ±ºå®èŠå ã®1ã€ã¯ãå€æ°ã®ãã¬ãŒãã³ã°è³æãšãµã³ãã«ã®å ¥æå¯èœæ§ã§ããã ãã®çµæã圌ã¯ãã€ãŠäººæ°ã®ãã£ãMicrosoft XNA 4ãã¬ãŒã ã¯ãŒã¯ã®ã¯ãã¹ãã©ãããã©ãŒã ãªãŒãã³ãœãŒã¹å®è£ ã§ããMonogameãéžæããŸããã
MonoGameã¯ãç°ãªããã©ãããã©ãŒã ã ãã§ãªããç°ãªããã©ãããã©ãŒã ã§ãéçºããæ©äŒãæäŸããŸãã ããŠã³ããŒãããŒãžã®å ¬åŒWebãµã€ãã§ãWindowsãMacOSãLinuxãªã©ã®ããŸããŸãªOSã®ããã±ãŒãžãèŠã€ããããšãã§ããŸãã Linuxããã³MacOSã§ã¯ã Xamarin Studioãå¿ èŠã§ãã Windows 8.1ã§ã®éçºã«ã¯ãå®å šã«æ©èœããç¡æã®Visual Studio Community 2013ã«å«ãŸããWindows 8.1 SDKãããã³Windows 10ãWindows 10 SDKããã³Visual Studio Community 2015ã«ããããå«ãŸããWindows 8.1 SDKãå¿ èŠã§ãã
åå¿è ã¯ãWindows Phone 8.1çšã®æ¢è£œã®MonoGameã²ãŒã ãã³ãã¬ãŒããVisual Studio Community 2013ã§ã®ã¿å©çšå¯èœã§ããããšãèæ ®ããå¿ èŠããããŸãã2015ããŒãžã§ã³ã§ã¯ããã§ã«UAPã¢ããªã±ãŒã·ã§ã³ã®ãã³ãã¬ãŒãã衚瀺ãããŸãã
ãšã³ãžã³ã«ã€ããŠç°¡åã«
MonoGameã¯ã²ãŒã ãµã€ã¯ã«ã¢ãã«ãå®è£ ããŸãã
[ ãœãŒã¹ãªã³ã¯ ]
1ïŒ InitializeïŒïŒã¡ãœããã§ã¯ã䜿çšãããå€æ°ãšãªããžã§ã¯ããåæåãããã²ãŒã ã®åæç¶æ ã«ãªããŸãã
2ïŒæ¬¡ã«ã LoadContentïŒïŒã¡ãœããã§ãã²ãŒã ã§äœ¿çšãããããŸããŸãªãªãœãŒã¹ïŒãªãŒãã£ãªãã¡ã€ã«ãç»åãã¡ã€ã«ãªã©ïŒãã¢ããªã±ãŒã·ã§ã³ã«ããŒããããŸãã
3ïŒ UpdateïŒïŒããã³DrawïŒ ïŒã¡ãœããã¯ãã²ãŒã ã«ãŒããè¡šããŸãã UpdateïŒïŒã¡ãœããã®äžå®ã®åšæïŒããã©ã«ãã§ã¯1ç§ããã60åïŒã§ãã²ãŒã ãªããžã§ã¯ãã®èª¿æ»ãå®è¡ãããããšãã°ãã£ã©ã¯ã¿ãŒã®äœçœ®ãªã©ã®èšç®ãå®è¡ãããŸãã DrawïŒïŒã¡ãœããã¯ãã·ãŒã³ãšã²ãŒã ãªããžã§ã¯ãã®åæç»ã®ã¿ãè¡ããŸãã ã©ã¡ãã®ã¡ãœããããã©ã¡ãŒã¿ãŒãšããŠGameTimeãªããžã§ã¯ããåãå ¥ããŸã-ã²ãŒã ã®éå§ããçµéããæéãä¿åããŸãã
4ïŒã²ãŒã ã«ãŒããçµäºãããšãå¶åŸ¡ã¯UnloadContentïŒïŒã¡ãœããã«æž¡ãããŸãã ãã®ã¡ãœããã¯ã以åã«äœ¿çšããããªãœãŒã¹ãã¢ã³ããŒãããŸãã
5ïŒãã®åŸãã²ãŒã ãçµäºããã¢ããªã±ãŒã·ã§ã³ãéããŸãã
MonoGameãããžã§ã¯ããäœæãããšãããã®ã¢ã«ãŽãªãºã ã¯ã¯ã©ã¹Game1 {}ã§æ瀺ãããŸãã
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; namespace Game1 { public class Game1 : Game { GraphicsDeviceManager graphics; SpriteBatch spriteBatch; public Game1() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; } // protected override void Initialize() { base.Initialize(); } // protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); } // protected override void UnloadContent() { } // , protected override void Update(GameTime gameTime) { base.Update(gameTime); } // protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.CornflowerBlue); base.Draw(gameTime); } } }
ã°ããŒãã«å€æ°GraphicsDeviceManager graphicsã䜿çšãããšãã³ã³ãã¥ãŒã¿ãŒãã¹ããŒããã©ã³ãã¿ãã¬ãããã²ãŒã ã³ã³ãœãŒã«ã®ã°ã©ãã£ãã¯ããã€ã¹ã«ã¢ã¯ã»ã¹ã§ããŸãã å¥ã®ã°ããŒãã«ãªããžã§ã¯ã-SpriteBatch spriteBatchã¯ãã¹ãã©ã€ãã®æç»ã«äœ¿çšãããŸã-ã²ãŒã ã§äœ¿çšãããç»åã
ã³ã³ãã³ããªããžã§ã¯ãã¯ãã²ãŒã ã³ã³ãã³ããžã®ã¢ã¯ã»ã¹ãæäŸããŸãã ãããžã§ã¯ãã«ããŸããŸãªãã¯ã¹ãã£ããªãŒãã£ãªãã¡ã€ã«ããã©ã³ããªã©ãè¿œå ããããšã«æ³šæããŠãã ããã MonoGame Pipeline-ãœãŒã¹ãã¡ã€ã«ã.xnbãã¡ã€ã«ã«å€æãããŠãŒãã£ãªãã£ãä»ããŠè¡ãããŸããããã«ãããã¢ããªã±ãŒã·ã§ã³ã¯çŽæ¥åäœããŸãã
ã€ã³ã¿ãŒãããã§ã®äœæ¥ã®ååã«é¢ããå€ãã®è³æãšè¯ãæèšãããã®ã§ãããã«ã€ããŠã¯è©³ãã説æããŸããã ã²ãŒã éçºè ãçŽé¢ããªããã°ãªããªãäž»ãªã¿ã¹ã¯ã«ã€ããŠèª¬æãããããããŸãšããŠãèšäºã§çŽ¹ä»ãããŠããã²ãŒã ã®äŸã«é¢ãããœãªã¥ãŒã·ã§ã³ãæäŸããããšæããŸãã
ç»é¢è§£å床ã«äŸåããªãã°ã©ãã£ãã¯ã¹
ã°ã©ãã£ãã¯ã®ã¹ã±ãŒãªã³ã°ã«ã¯ããã¯ãã«å€æè¡åã䜿çšãããšäŸ¿å©ã§ãã ãããè¡ãã«ã¯ãã²ãŒã ã¯ã©ã¹ã®ãã£ãŒã«ãã§ãå€æããããã¯ã¹ãã£ã«ã¢ã¯ã»ã¹ããããã®Matrixã¿ã€ãã®å€æ°ãšãç»é¢ã®ã¹ã±ãŒãªã³ã°ãããå¢çã®å€ãæ ŒçŽããããã®Rectangleã¿ã€ãã®å€æ°ãäœæããŸãã
private readonly Rectangle screenBounds; private readonly Matrix screenXform;
ã¯ã©ã¹ã³ã³ã¹ãã©ã¯ã¿ãŒã§ãã°ã©ãã£ãã¯ã¹ã±ãŒã«å€ãä¿åããããã®å€æ°ãäœæããŸããããã¯ãããã€ã¹ã®ç»é¢è§£å床ãšãã¯ã¹ãã£ãŒè§£å床ã®é«ãã®æ¯çãšããŠå®çŸ©ã§ããŸãã ãã®äŸã§ã¯ã1920Ã1080ãã¯ã»ã«ã®è§£å床ã®ãã¯ã¹ãã£ã䜿çšããããããå€ã¯1080ã§ãã 次ã«ãXYZ軞ã«æ²¿ã£ãŠå€æãããªãã¯ã¹ã®ã¹ã±ãŒã«å€ãèšå®ããŸãã
var screenScale = graphics.PreferredBackBufferHeight / 1080.0f; screenXform = Matrix.CreateScale(screenScale, screenScale, 1.0f);
ã²ãŒã ã«ãŒããã¬ã³ããªã³ã°ãã段éïŒ DrawïŒïŒã¡ãœããïŒã§ããªãŒããŒããŒããããSpriteBatch.BeginïŒïŒã¡ãœãã[ link ]ã®ãã©ã¡ãŒã¿ãŒãšããŠã¹ã±ãŒã«å€ã䜿çšããŸãã
spriteBatch.Begin(SpriteSortMode.Deferred, null, null, null, null, null, screenXform);
ããã«äœæ¥ããããããããã«ãçŸåšã®çž®å°ºã«åŸã£ãŠç»é¢ã®å¢çãšäžå¿ãèšå®ã§ããããã«ãªããŸããã
screenBounds = new Rectangle(0, 0, (int)Math.Round(graphics.PreferredBackBufferWidth / screenScale), (int)Math.Round(graphics.PreferredBackBufferHeight / screenScale)); center = screenBounds.Center.ToVector2();
次ã«ãã¿ããã¹ã¯ãªãŒã³ãæ£ããæ©èœããããã«ã InitializeïŒïŒã¡ãœããã§ã¯ãªãã¯ãåŠçããããã®å¢çãèšå®ããå¿ èŠããããŸãã
TouchPanel.DisplayWidth = screenBounds.Width; TouchPanel.DisplayHeight = screenBounds.Height;
é³ãæ±ãããšã®ãã¥ã¢ã³ã¹
Windowsã¹ãã¢ã§ã¢ããªã±ãŒã·ã§ã³ã®èªå®ã«åæ Œããã«ã¯ãMicrosoftã®æšå¥šäºé [ link ã link ]ã«åŸãå¿ èŠããããŸãã
ãµãŠã³ãã®æäœã«é¢ããŠã¯ãèµ·åããŠããã¢ããªã±ãŒã·ã§ã³ãŸãã¯ã²ãŒã ããŠãŒã¶ãŒã®é³æ¥œãåçããŠããå ŽåããŠãŒã¶ãŒã®é³æ¥œãäžæããªãã§ãã ããã ãããè¡ãã«ã¯ã InitializeïŒïŒã¡ãœããã§ã²ãŒã ãéå§ãããšãã«ç¢ºèªããŸãã
if (MediaPlayer.GameHasControl) { MediaPlayer.Stop(); }
奜ã¿ã®ã«ãŒã«ã¯ããŠãŒã¶ãŒãã¡ãã£ã¢ãã¬ãŒã€ãŒã§é³æ¥œãåæ¢ããŠã²ãŒã ã§ãªã³ã«ãããã©ããã®åé¡ã«ãªãããšã«ã泚æããŠãã ããã ããšãã°ããããã¢ãããŠã£ã³ããŠã䜿çšããŠããã®æ©èœãå®è£ ãããšäŸ¿å©ã§ãã
ã²ãŒã ã§ããã¯ã°ã©ãŠã³ããã¥ãŒãžãã¯ãŸãã¯ãµãŠã³ããšãã§ã¯ããåçããã«ã¯ãããµãŠã³ããã/ãµãŠã³ããªããã¢ãŒããèæ ®ããŠã UpdateïŒïŒã¡ãœããã®åçã³ãã³ãã¯æ¬¡ã®ããã«ãªããŸãã
if (!isMuted && MediaPlayer.State != MediaState.Playing && MediaPlayer.GameHasControl) { MediaPlayer.Play(backGroundMusic); }
ãã©ã³ãã®äœ¿çš
ãã©ã³ãã¯ãã²ãŒã ã®ä»ã®ã³ã³ãã³ããšåæ§ã«ããã€ãã©ã€ã³ãŠãŒãã£ãªãã£ããããŠã³ããŒãããå¿ èŠããããŸãã ãã ãããã®å Žåãç¹å®ã®ãã©ã³ãã¯ããŒããããŸãããã䜿çšããããã©ã³ããèšè¿°ããæ°ããèŠçŽ ãäœæãããŸãã 以åã¯ãéžæãããã©ã³ãã¯æ¢ã«ã·ã¹ãã ãã©ã³ããã©ã«ããŒã«ããå¿ èŠããããŸããã
SpriteFont Descriptionãéžæããååãèšå®ããŸãã OKãã¯ãªãã¯ããŸãã
ç»åã®ã¹ã±ãŒãªã³ã°æã«ãã©ã³ãã®è¡šç€ºå質ã倱ãããªãããã«ããã«ã¯ã次ã®å³ã«ç€ºãããã«ããã¯ã¹ãã£åœ¢åŒãCompressedããColorã«å€æŽããå¿ èŠããããŸãã
[ ãã«ã]ãã¯ãªãã¯ããŠãããžã§ã¯ããã©ã«ããŒã«ç§»åãã[ ã³ã³ãã³ã]ãµããã©ã«ããŒãéããŸãã ããã«ã¯ãçæããã* .spritefontãã¡ã€ã«ãå«ãŸããŠããå¿ èŠããããŸãããã®ãã¡ã€ã«ã¯ã 䜿ããããããã¹ããšãã£ã¿ãŒã§éãå¿ èŠããããŸãïŒäŸ¿å®äžãåãVisual Studioã§éããŸãïŒã 以äžã®ã¿ã°ã§ã¯ãã·ã¹ãã ãã©ã«ããŒå ã®ãã©ã³ãã¿ã€ããµã€ãºãæå®ã§ããŸãã
<!-- Modify this string to change the font that will be imported. --> <FontName>Arial</FontName> <!-- Size is a float value, measured in points. Modify this value to change the size of the font. --> <Size>12</Size>
ã¬ã³ãŒããä¿åãã
ã²ãŒã ã®çµæãä¿åããã«ã¯ãXML圢åŒã䜿çšãããšäŸ¿å©ã§ãã ãããã®ã¢ããªã±ãŒã·ã§ã³ãªãœãŒã¹ã«ã¢ã¯ã»ã¹ããã«ã¯ ã ã·ãªã¢ã«åã䜿çšãããŸãã ããŒã¿ã®èªã¿åã/æžã蟌ã¿æã®ã²ãŒã ã®é 延ããªããã«ã¯ãéåæã¢ãããŒãã䜿çšããå¿ èŠããããŸãã
äžèšãå®è£ ããããã«ãã²ãŒã ã¯ã©ã¹ã«ããã€ãã®ã¡ãœãããèšè¿°ããŸãã
public async void LoadHighScore() { await readXMLAsync(); } public async void SaveHighScore() { await writeXMLAsync(); } private async Task writeXMLAsync() { var serializer = new DataContractSerializer(typeof(Int16)); using (var stream = await ApplicationData.Current.LocalFolder.OpenStreamForWriteAsync( "highscore.xml", CreationCollisionOption.ReplaceExisting)) { serializer.WriteObject(stream, highscore); } } private async Task readXMLAsync() { var serializer = new DataContractSerializer(typeof(Int16)); // bool existed = await FileExists(ApplicationData.Current.LocalFolder, "highscore.xml"); if (existed) { using (var stream = await ApplicationData.Current.LocalFolder.OpenStreamForReadAsync("highscore.xml")) { highscore = (Int16)serializer.ReadObject(stream); } } } // public async Task<bool> FileExists(StorageFolder folder, string fileName) { return (await folder.GetFilesAsync()).Any(x => x.Name == fileName); }
ã²ãŒã ã·ãŒã³ã®ç§»è¡
å®è£ æ¹æ³ã¯å€æ°ãããŸãããåçŽãªã²ãŒã ã®å Žåã¯åæã䜿çšãããšäŸ¿å©ã§ãã ãããè¡ãã«ã¯ãã²ãŒã ã¯ã©ã¹ã§ãã²ãŒã ã®ç¶æ ãå«ãåæã宣èšãããã®ã€ã³ã¹ã¿ã³ã¹ãäœæããŸãã
enum GameState { Menu, Gameplay, EndOfGame, } GameState state;
次ã«ãã°ã©ãã£ãã¯ã¹ã®èšç®ãšæç»ã®æ®µéã§ãã²ãŒã ã®çŸåšã®ç¶æ ã®ããŒã¿ãåŠçãããããã«ã UpdateïŒïŒããã³DrawïŒ ïŒã¡ãœãããå€æŽããŸã ã
æŽæ°ïŒïŒã¡ãœããïŒ
void Update(GameTime deltaTime) { base.Update(deltaTime); switch (state) { case GameState.Menu: UpdateMenu(deltaTime); break; case GameState.Gameplay: UpdateGameplay(deltaTime); break; case GameState.EndOfGame: UpdateEndOfGame(deltaTime); break; } }
æç»ïŒïŒã¡ãœããïŒ
void Draw(GameTime deltaTime) { base.Draw(deltaTime); switch (state) { case GameState.Menu: DrawMenu(deltaTime); break; case GameState.Gameplay: DrawGameplay(deltaTime); break; case GameState.EndOfGame: DrawEndOfGame(deltaTime); break; } }
ã²ãŒã ã®ç¶æ éã®é·ç§»ãã²ãŒã ã·ãŒã³ã®èšç®ããã³ã¬ã³ããªã³ã°ã®ããžãã¯ãå®è£ ããæ°ããã¡ãœãããå®çŸ©ããŸãã
void UpdateMenu(GameTime deltaTime) { // if (pushedStartGameButton) state = GameState.GamePlay; } void UpdateGameplay(GameTime deltaTime) { // , . if (playerDied) state = GameState.EndOfGame; } void UpdateEndOfGame(GameTime deltaTime) { // , if (pushedMenuButton) state = GameState. Menu; else if (pushedRestartLevelButton) { ResetLevel(); state = GameState.Gameplay; } } void DrawMenu(GameTime deltaTime) { // , .. } void DrawGameplay(GameTime deltaTime) { // , .. void DrawEndOfGame(GameTime deltaTime) { // , .. }
ãããã«
ããããããã®èšäºã§åŒ·èª¿ããããã€ã³ãã®ããã€ãã¯æçœã«èŠãããããããŸããããåŠç¿ããã»ã¹ã§ã¯ããããã®è³ªåã«å¯Ÿããçããæ¢ãã®ã«ããªãã®æéãè²»ãããŸããã äžèšã®è³æãåå¿è ã®éçºè ã«ãšã£ãŠæçšã§ãããæåã®åäœãè¿ éã«äœæããã®ã«åœ¹ç«ã€ããšãé¡ã£ãŠããŸãã
ç§ãããç§ã¯æ¬¡ã®ããšãã¢ããã€ã¹ããããšæããŸããããªããå§ãããšããèãã®äœæ¥ãå¿ ãçµããŠãåé¡ãçµããããŠãã ããã ã²ãŒã ãŸãã¯ã¢ããªã±ãŒã·ã§ã³ã«æäœéå¿ èŠãªæ©èœãèªåã§æ±ºå®ããŸããããã«ãããæåã®ããŒãžã§ã³ã®ãªãªãŒã¹åã«ã¿ã¹ã¯ãæå®ããŠäœæ¥éãæžããããšãã§ããŸãã ç¡éã«æ¹åã§ããŸããã次ã®åé¡ã®ããã«ããã³ããæ®ããŸããããããªããšããã®ãããªããã»ã¹ã§åããªããªããæçµçã«èå³ã倱ãå¯èœæ§ããããŸãã
é«å質ã®è£œåãäœãããåªããŸãã ããã¯ãã²ãŒã ã®ãã¹ãŠã®èŠçŽ ïŒãããžã§ã¯ãã¢ãŒããã¯ãã£ãã³ãŒãããã¯ã¹ãã£ããµãŠã³ããé³æ¥œïŒã«é©çšãããŸãã ãããè¡ãã«ã¯ãããªãã®åã«çãã質åã«å¯Ÿããå°éçãªçããæ¢ããé¢é£ããæç®ãèªãã§ãã ããã
çµéšè±å¯ãªéçºè ã®ã³ââã¡ã³ãã«æè¬ããå·çäœæ¥ã«é¢ããæ¬ é¥ãã¢ããã€ã¹ãææããŸãã
PSæçµçã«äœãèµ·ãã£ãã®ãïŒ