コード例 #1
0
 public void LoadContent(ContentManager content)
 {
     PlayerProjectiles.LoadContent(content);
     mShipdata         = content.Load <ShipData>("PlayerShip");
     image             = content.Load <Texture2D>(mShipdata.spriteName);
     playerObject      = new AnimatedObject(image, image.Width, mShipdata.center, false, 0.1f, new Vector2(100, 100));
     Max_Speed         = mShipdata.maxSpeed;
     Max_Speed_Squared = Max_Speed * Max_Speed;
 }
コード例 #2
0
        public void LoadContent(ContentManager content)
        {
            EnemyProjectiles.LoadContent(content);
            mShipdata = content.Load <ShipData>("EnemyShip2");
            image     = content.Load <Texture2D>(mShipdata.spriteName);

            Velocity = Vector2.Zero;

            RandomizeMovement();

            enemyObject       = new AnimatedObject(image, image.Width, mShipdata.center, false, 0.1f, Position);
            Max_Speed         = mShipdata.maxSpeed;
            Max_Speed_Squared = Max_Speed * Max_Speed;
            shotCooldown      = mShipdata.shotCooldown;
        }
コード例 #3
0
ファイル: Explosion.cs プロジェクト: simonkwong/Shooter
 public Explosion(Texture2D texture, int width, Vector2 initialPosition, Vector2 initialVelocity)
 {
     Animation = new AnimatedObject(texture, width, new Vector2(width / 2, texture.Height / 2), true, 0.05f, initialPosition);
     Velocity  = initialVelocity;
     active    = true;
 }
コード例 #4
0
ファイル: EnemyProjectile.cs プロジェクト: simonkwong/Shooter
 public EnemyProjectile(Texture2D texture, int width, Vector2 initialPosition, Vector2 initialVelocity)
 {
     Animation = new AnimatedObject(texture, width, new Vector2(width / 2, texture.Height / 2), true, 0.1f, initialPosition);
     Velocity  = initialVelocity;
 }