コード例 #1
0
ファイル: Game1.cs プロジェクト: RShadowhand/game_prototypes
        protected override void LoadContent()
        {
            ce                = new CollisionEngine(this);
            spriteBatch       = new SpriteBatch(GraphicsDevice);
            font              = Content.Load <SpriteFont>("Font");
            tPlayer           = Content.Load <Texture2D>("dama");
            enemySpawner      = new Spawner(graphics);
            player            = new Player(tPlayer, new Vector2(-350, 274), graphics);
            player.invincible = true;
            bgHandler.LoadContent(Content);
            r       = Color.LightGreen.R;
            g       = Color.LightGreen.G;
            b       = Color.LightGreen.B;
            a       = Color.LightGreen.A;
            bgC     = c = Color.FromNonPremultiplied(r, g, b, a);
            playerC = Color.White;
            if (playerCU == false)
            {
                playerC = Color.White;
            }

            player.LoadContent(Content);
            ce.LoadContent(Content);
            enemySpawner.LoadContent(Content);
        }
コード例 #2
0
 public Game1()
     : base()
 {
     graphics = new GraphicsDeviceManager(this);
     Content.RootDirectory = "Content";
     ce = new CollisionEngine(this);
 }