Пример #1
0
        private Vector2 RandomPostion(SpaceForceGame game)
        {
            int w = game.graphics.GraphicsDevice.DisplayMode.Width;
            int x = rand.Next(w);

            return(new Vector2(x, 0));
        }
Пример #2
0
 protected Entity(SpaceForceGame game)
 {
     this.game = game;
     SizeTexture();
     Collidable = true;
     SetupRand();
 }
Пример #3
0
 public BackgroundEntity(SpaceForceGame game) : base(game)
 {
     Collidable   = false;
     vel          = new Vector2(0, 1f);
     scale        = 3f;
     textureColor = new Color(110, 80, 210);
 }
Пример #4
0
 public ParticleEngine(List <Texture2D> textures, SpaceForceGame game)
 {
     this.game               = game;
     this.textures           = textures;
     this.particles          = new LinkedList <Particle>();
     this.dead               = new LinkedList <Particle>();
     exhastHandler           = new ExhastHandler(game, textures);
     rainbowHandler          = new RainbowHandler(game, textures);
     asteroidFragmentHandler = new AsteroidFragment(game);
 }
Пример #5
0
        public Enemy(SpaceForceGame game) : base(game)
        {
            //Mode = Mode.Wait;
            scale      = 0.6f;
            Collidable = true;

            PursueAi pursueAi = new PursueAi(this, 10)
            {
                Offset = new Vector2(0, 300f)
            };

            ai.Add(pursueAi);
            ai.Add(new FleeAi(this, 1));


            /*
             *
             *
             *                behavior.Add(Mode.Flee, new FleeAi(this));
             *                behavior.Add(Mode.Wait, new WaitAi(this));
             *                behavior.Add(Mode.Pursue, pursueAi);
             */
            target = game.player;
        }
Пример #6
0
 public RainbowHandler(SpaceForceGame game, List <Texture2D> textures)
 {
     this.textures = textures;
     this.game     = game;
 }
Пример #7
0
 public BackgroundPool(SpaceForceGame game) : base(game)
 {
     NumberOnScreen = 2;
 }
Пример #8
0
 public LifeGui(SpaceForceGame game) : base(game)
 {
 }
Пример #9
0
 public Asteroid(SpaceForceGame game) : base(game)
 {
     Mass = 1;
 }
Пример #10
0
 public Gui(SpaceForceGame game)
 {
     this.game = game;
 }
Пример #11
0
 public EntityPool(SpaceForceGame game)
 {
     this.game = game;
 }
Пример #12
0
 public Player(SpaceForceGame game, LaserPool laserPool) : base(game)
 {
     this.laserPool = laserPool;
     Life           = 5;
     scale          = 0.75f;
 }
Пример #13
0
 public AsteroidFragment(SpaceForceGame game)
 {
     this.game = game;
 }
Пример #14
0
 public EnemyShipPool(SpaceForceGame game) : base(game)
 {
 }
Пример #15
0
 public LaserPool(SpaceForceGame game) : base(game)
 {
 }
Пример #16
0
 public Laser(SpaceForceGame game) : base(game)
 {
     SetSize(6);
 }