コード例 #1
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         game.Run();
     }
 }
コード例 #2
0
        public static void LoadStaticAssets(Game1 parent)
        {
            Assets = new Dictionary<Asset, Texture2D>();
            Assets.Add(Asset.SplashScreen, parent.Content.Load<Texture2D>("splash"));
            Assets.Add(Asset.OpenGraveTile, parent.Content.Load<Texture2D>("OpenGraves"));
            Assets.Add(Asset.ClosedGraveTile, parent.Content.Load<Texture2D>("ClosedGraves"));
            Assets.Add(Asset.Mask, parent.Content.Load<Texture2D>("mask"));
            Assets.Add(Asset.UpLadderTile, parent.Content.Load<Texture2D>("UpLadder"));
            Assets.Add(Asset.DownLadderTile, parent.Content.Load<Texture2D>("DownLadder"));
            Assets.Add(Asset.NullCaveTile, parent.Content.Load<Texture2D>("Null"));
            Assets.Add(Asset.EmptyCaveTile, parent.Content.Load<Texture2D>("Empty"));
            Assets.Add(Asset.CaveEntrance, parent.Content.Load<Texture2D>("Entrance"));
            Assets.Add(Asset.CaveExit, parent.Content.Load<Texture2D>("Exit"));
            Assets.Add(Asset.UpLadderExitTile, parent.Content.Load<Texture2D>("UpLadderExit"));
            Assets.Add(Asset.UpLadderEntrance, parent.Content.Load<Texture2D>("UpLadderEntrance"));
            Assets.Add(Asset.CaveShaft, parent.Content.Load<Texture2D>("Shaft"));
            Assets.Add(Asset.Robot, parent.Content.Load<Texture2D>("Robot"));
            Assets.Add(Asset.UpDownLadder, parent.Content.Load<Texture2D>("UpDownLadder"));
            Assets.Add(Asset.ThoughtBubble, parent.Content.Load<Texture2D>("ThoughtBubble"));

            Songs = new Dictionary<AssetSong, Song>();
            Songs.Add(AssetSong.Intro, parent.Content.Load<Song>("Intro"));
            Songs.Add(AssetSong.Surface, parent.Content.Load<Song>("Surface"));
            Songs.Add(AssetSong.Cave, parent.Content.Load<Song>("Cave"));

            Fonts = new Dictionary<AssetFont, SpriteFont>();
            Fonts.Add(AssetFont.Default, parent.Content.Load<SpriteFont>("Default"));
            Fonts.Add(AssetFont.Twitter, parent.Content.Load<SpriteFont>("Twitter"));
        }
コード例 #3
0
 public override void Update(Game1 parent, KeyboardState prevKeys)
 {
     this.parent = parent;
 }
コード例 #4
0
 public override void Render(Game1 parent, SpriteBatch sb)
 {
 }
コード例 #5
0
 public abstract void Update(Game1 parent, KeyboardState prevState);
コード例 #6
0
 public abstract void Render(Game1 parent, SpriteBatch sb);