コード例 #1
0
ファイル: SunEngine.cs プロジェクト: doanhtdpl/pvz-the-birds
 public SunEngine(Game game, SunManager sunManager, Vector2 sunBankLocation)
     : base(game)
 {
     this.sunManager = sunManager;
     this.sunBankLocation = sunBankLocation;
     this.Initialize();
 }
コード例 #2
0
 public void Draw(SpriteBatch spriteBatch, SunManager sunManager)
 {
     spriteBatch.Draw(sprite.texture, sprite.position, sourceRectangle: sprite.rectangle, color: Color.White, rotation: sprite.rotation, origin: sprite.origin, scale: scalingFactor);
     //test
     // spriteBatch.Draw(sunTexture, sunManager.GetFirstObjectRect(), color: Color.White);
     //  spriteBatch.Draw(asteroidTexture, this.GetRect(), color: Color.White);
 }
コード例 #3
0
        // Constructor
        public PlantManager(Game game, Griding.Griding griding)
            : base(game)
        {
            this.bulletManager = new Bullets.BulletManager(game);
            this.griding = griding;
            this.sunManager = new SunManager(game);
            this.sunManager.SetGriding = griding;

            bulletManager.Griding = griding;

            this.Initialize();
        }
コード例 #4
0
        public void Update(GameTime gameTime, GraphicsDevice graphicsDevice, SunManager sunManager)
        {
            CalculateAsteroidRectangle(gameTime);
            CalculateAsteroidPosition(gameTime, graphicsDevice.Viewport);

            // Test
            //sunTexture = new Texture2D(graphicsDevice, sunManager.GetFirstObjectRect().Width, sunManager.GetFirstObjectRect().Height);
            //Color[] sunColorData = new Color[sunManager.GetFirstObjectRect().Width * sunManager.GetFirstObjectRect().Height];
            //for (int i = 0; i < sunColorData.Length; ++i) sunColorData[i] = Color.Chocolate;
            //sunTexture.SetData(sunColorData);

            //asteroidTexture = new Texture2D(graphicsDevice, this.GetRect().Width, this.GetRect().Height);
            //asteroidTexture.SetData(sunColorData);
        }
コード例 #5
0
 public Game1()
 {
     graphics              = new GraphicsDeviceManager(this);
     displayManager        = new DisplayManager();
     spaceManager          = new SpaceManager();
     sunManager            = new SunManager();
     orbitManager          = new OrbitManager();
     planetManager         = new PlanetManager();
     asteroidManager       = new AsteroidManager();
     scoreManager          = new ScoreManager();
     audioManager          = new AudioManager();
     menuManager           = new MenuManager();
     creditManager         = new CreditManager();
     Content.RootDirectory = "Content";
 }
コード例 #6
0
ファイル: PlantSun.cs プロジェクト: doanhtdpl/pvz-the-birds
 public PlantSunEngine(Game game, SunManager sunManager, Vector2 sunBankLocation, Vector2 position)
     : base(game, sunManager, sunBankLocation)
 {
     this.Position = position;
 }
コード例 #7
0
ファイル: FallSun.cs プロジェクト: doanhtdpl/pvz-the-birds
 public FallSunEngine(Game game, SunManager sunManager)
     : base(game, sunManager, sunManager.SunBankLocation)
 {
 }
コード例 #8
0
 public State_Evening(SunManager parent) : base(parent)
 {
 }
コード例 #9
0
 public State_EarlyMorning(SunManager parent) : base(parent)
 {
 }
コード例 #10
0
 public StateBase(SunManager parent)
 {
     parent_ = parent;
 }