コード例 #1
0
ファイル: HauntedHouse.cs プロジェクト: CharlesMicou/Projects
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // Make sure to initialize krpyton, unless it has been added to the Game's list of Components
            this.krypton.Initialize();
            krypton.SpriteBatchCompatablityEnabled = true;
            krypton.CullMode = CullMode.None;
            krypton.AmbientColor = new Color(10, 20, 10);

            //Sprites list
            sprites = new List<Sprite>();

            //Create camera
            camera = new Camera2D(GraphicsDevice);

            //Set vertical scale
            verticalUnits = GraphicsDevice.Viewport.Height;

            base.Initialize();
        }
コード例 #2
0
ファイル: HauntedHouse.cs プロジェクト: callumlawson/Projects
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // Make sure to initialize krpyton, unless it has been added to the Game's list of Components
            krypton.Initialize();
            krypton.SpriteBatchCompatablityEnabled = true;
            krypton.CullMode = CullMode.None;
            krypton.Bluriness = 3;
            krypton.AmbientColor = new Color(15, 15, 15);

            ambiantLight.Initialize();
            //ambiantLight.SpriteBatchCompatablityEnabled = true;
            //ambiantLight.CullMode = CullMode.None;
            ambiantLight.Bluriness = 0;
            ambiantLight.AmbientColor = new Color(40, 40, 40);
            //ambiantLight.AmbientColor = new Color(255, 255, 255);

            //Sprites list
            sprites = new List<Sprite>();

            //Create camera
            camera = new Camera2D(GraphicsDevice);

            //Set vertical scale
            verticalUnits = GraphicsDevice.Viewport.Height;

            // TODO: use this.Content to load your game content here
            level = Content.Load<Level>("Levels/newTest");
            level.Intialise(krypton, this.Content, this.GraphicsDevice, this.screenDebuger , sprites);

            base.Initialize();
        }