예제 #1
0
        /*
         * <WAHL>
         * Wird benötigt wenn eine Partikel Engine eingebaut wird.
         * private Explosion explosion;
         * */

        /// <summary>
        /// Erstellt eine Representation der Spielerfigur.
        /// </summary>
        public PlayerRepresentation(Player playerGameItem, GraphicsDeviceManager graphics)
        {
            this.graphics        = graphics;
            this.model           = ViewContent.RepresentationContent.PlayerModel;
            GameItem             = playerGameItem;
            this.playerTexture   = ViewContent.RepresentationContent.PlayerTexture;
            this.shieldTexture   = ViewContent.RepresentationContent.ShipShieldTexture;
            this.lastPosition    = PlaneProjector.Convert2DTo3D(GameItem.Position);
            this.World           = Matrix.CreateWorld(this.lastPosition, Vector3.Forward, Vector3.Up);
            this.invincibleCount = 0;

            //[Anji] Schiffs-Antrieb
            this.playerShipEngine = (PlayerShipEngine)createParticleEngine(ViewContent.RepresentationContent.ShipEngineTexture, PlaneProjector.ToScreenCoordinates(lastPosition, graphics), 0.5f, Color.LightBlue); //new Color(190,195,217));
        }
예제 #2
0
 /*
  * <WAHL>
  * Muss implementiert werden wegen des Interfaces. Wird später benötigt wenn eine Partikel Engine eingebaut wird.
  * */
 private ParticleEngine createParticleEngine(Texture2D texture, Vector2 location, float size, Color color)
 {
     this.playerShipEngine = new PlayerShipEngine(texture, location, size, color, graphics);
     return(playerShipEngine);
 }