Наследование: Game.GameObject
Пример #1
0
public void Start()
	{
		Ship ___ship01;
		___ship01 = new Ship();
		UnityParticleSystem = UnityParticleSystem.Find();
		ShipExplosions = (

Enumerable.Empty<ShipExplosion>()).ToList<ShipExplosion>();
		Ship = ___ship01;
		ScoreCounter = UnityScore.Find();
		LifeCounter = UnityLifeBar.Find();
		Explosions = (

Enumerable.Empty<Explosion>()).ToList<Explosion>();
		CollidingAsteroidsShip = (

Enumerable.Empty<Casanova.Prelude.Tuple<Ship, Asteroid>>()).ToList<Casanova.Prelude.Tuple<Ship, Asteroid>>();
		CollidingAsteroidsProjectile = (

Enumerable.Empty<Casanova.Prelude.Tuple<Beam, Asteroid>>()).ToList<Casanova.Prelude.Tuple<Beam, Asteroid>>();
		Camera = new MainCamera(___ship01.Position);
		Beams = (

Enumerable.Empty<Beam>()).ToList<Beam>();
		Asteroids = (

Enumerable.Empty<Asteroid>()).ToList<Asteroid>();
		
}
Пример #2
0
public void Start()
	{
		Ship = new Ship();
		Explosions = (

Enumerable.Empty<Explosion>()).ToList<Explosion>();
		CollidingAsteroidsProjectile = (

Enumerable.Empty<Casanova.Prelude.Tuple<Beam, Asteroid>>()).ToList<Casanova.Prelude.Tuple<Beam, Asteroid>>();
		Beams = (

Enumerable.Empty<Beam>()).ToList<Beam>();
		Asteroids = (

Enumerable.Empty<Asteroid>()).ToList<Asteroid>();
		
}
Пример #3
0
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);

            SpriteFont t1, t2, t3, t4;

            t1 = Content.Load<SpriteFont>("fonts/font16");
            t2 = Content.Load<SpriteFont>("fonts/font24");
            t3 = Content.Load<SpriteFont>("fonts/font32");
            t4 = Content.Load<SpriteFont>("fonts/font40");
            fonts = new SpriteFont[4] { t1, t2, t3, t4 };

            textures[(int)TexturesEnum.CORE_SMALL] = Content.Load<Texture2D>("images/coreSmall");
            textures[(int)TexturesEnum.STRAIGHT_GUN_SMALL] = Content.Load<Texture2D>("images/part1");

            playerShip = new Ship(new Vector2(400, 600));
            playerShip.parts.Add(new StraightGunSmall(new Vector2(0,-64), playerShip));
            
            playerShip.Rebuild();
            System.Diagnostics.Debug.WriteLine(playerShip.totalWeight + " " + playerShip.totalThrust + " " + playerShip.totalAccel + " " + playerShip.totalShield + " " + playerShip.totalShieldRegen + " " + playerShip.totalCore);//temp cancer
        }
Пример #4
0
public void Start()
	{
		Ship ___ship00;
		___ship00 = new Ship();
		UnityParticleSystem = UnityParticleSystem.Find();
		Ship = ___ship00;
		Explosions = (

Enumerable.Empty<Explosion>()).ToList<Explosion>();
		CollidingAsteroidsProjectile = (

Enumerable.Empty<Casanova.Prelude.Tuple<Beam, Asteroid>>()).ToList<Casanova.Prelude.Tuple<Beam, Asteroid>>();
		Camera = new MainCamera(___ship00.Position);
		Beams = (

Enumerable.Empty<Beam>()).ToList<Beam>();
		Asteroids = (

Enumerable.Empty<Asteroid>()).ToList<Asteroid>();
		
}
Пример #5
0
        private void ResetGame()
        {
            // Starting again.
            gameOverTime = 2000;
            GameStatus = 1;
            continueFading = false;
            continueFade = 0;

            timeSinceFire = 0;
            enemyCount = 2;
            killCount = 0;
            shotCount = 0;
            nextLevelCounter = 1000;

            gameObjects = new List<GameObject>();
            bullets = new List<Bullet>();

            this.ship = new Ship(this.shipTexture, new Vector2(350, 260));
            createEnemies();
        }
Пример #6
0
        /// <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()
        {
            // TODO: Add your initialization logic here
            rand = new Random();
            base.Initialize();

            this.background = new Background(this.backgroundTexture, Vector2.Zero);
            this.ship = new Ship(this.shipTexture, new Vector2(350, 260));
            this.explosions = new List<Explosion>();
            createEnemies();

            MediaPlayer.Play(this.music);
            MediaPlayer.IsRepeating = true;
        }
Пример #7
0
public void Start()
	{
		UnityParticleSystem = UnityParticleSystem.Find();
		Ship = new Ship();
		
}
Пример #8
0
public Bullet(UnityEngine.Vector3 pos, Ship owner)
	{JustEntered = false;
 frame = World.frame;
		UnityBullet = UnityBullet.Instantiate(pos);
		Removed = false;
		Owner = owner;
		
}
Пример #9
0
public Player(System.Int32 index)
	{JustEntered = false;
 frame = World.frame;
		Score = 0;
		PlayerShip = new Ship(new UnityEngine.Vector3((-5f) * ((index) + (1)),-2f,-15f));
		PlayerID = 1;
		Heart3 = new Life("HealthBar/Life3");
		Heart2 = new Life("HealthBar/Life2");
		Heart1 = new Life("HealthBar/Life1");
		
}
Пример #10
0
public void Start()
	{
		Ship = new Ship();
		
}
Пример #11
0
 public InputController(Ship ship) : base(ship)
 {
     cur = Keyboard.GetState();
     pre = cur;
 }
Пример #12
0
 public AIController(Ship ship) : base(ship)
 {
     this.ship = ship;  
 }
Пример #13
0
 public Controller(Ship ship)
 {
     this.ship = ship;
 }