예제 #1
0
        public override void Draw(GameTime gameTime)
        {
            base.Draw(gameTime);

            this.barraEnergia.Draw(gameTime, getBatch());
            getBatch().Begin();
            setPosition(getPosition());
            Texture2D _img = getImagem();
            Rectangle?rect = null;

            getBatch().Draw(_img, getPosition(), rect, Color.White,
                            (float)Math.Atan2(direcao.Y, direcao.X),
                            new Vector2(_img.Width / 2, _img.Height / 2),
                            1.0f,
                            SpriteEffects.None,
                            0.0f);
            getBatch().End();

            if (_antiRocket != null)
            {
                _antiRocket.Update(gameTime);
                _antiRocket.Draw(gameTime);

                if (!_antiRocket.getSituacao())
                {
                    _antiRocket.Dispose();
                    _antiRocket = null;
                }
            }
        }
예제 #2
0
 public override void poderEspecial()
 {
     if (_antiRocket == null)
     {
         _antiRocket = getantiRocket();
         _antiRocket.setPosition(getPosition());
         _antiRocket.ativarantiRocket();
     }
 }
예제 #3
0
 public void setantiRocket(antiRocket antiRocket)
 {
     this.antiRocket = antiRocket;
 }