public static StickManager GetStick()
 {
     if (_stickmanager == null)
     {
         _stickmanager = new StickManager();
     }
     return(_stickmanager);
 }
 public void DrawMoodie()
 {
     try
     {
         StickManager stick = StickManager.GetStick();
         using (Sprite DrawMoodie = new Sprite(GameAppFramework.GetGameAppFramework().Device))
         {
             DrawMoodie.Begin(SpriteFlags.AlphaBlend);
             Matrix matrix = new Matrix();
             matrix = Matrix.Transformation2D(new Vector2(0, 0), 0f, new Vector2(1.0f, 1.0f), new Vector2(stick.X + 45, stick.Y + 100), 0.0f, new Vector2(0, 0));
             DrawMoodie.Transform = matrix;
             DrawMoodie.Draw(texture, new Rectangle(0, 0, 0, 0), new Vector3(0, 0, 0), new Vector3(x, y, 0), Color.White);
             DrawMoodie.End();
         }
     }
     catch (Exception ex) { }
 }
Example #3
0
        public void Render()
        {
            StickManager stick = StickManager.GetStick();

            using (Sprite DrawPlayer = new Sprite(GameAppFramework.GetGameAppFramework().Device))
            {
                try
                {
                    DrawPlayer.Begin(SpriteFlags.AlphaBlend);
                    Matrix matrix = new Matrix();
                    matrix = Matrix.Transformation2D(new Vector2(0, 0), 0f, new Vector2(1.0f, 1.0f), new Vector2(GetPlayerX() + 25, GetPlayerY() + 25), 0.1f, new Vector2(0, 0));//(float)(Math.PI - playerRotationAngle), new Vector2(0,0));
                    DrawPlayer.Transform = matrix;
                    DrawPlayer.Draw(_player.getTexture(), new Rectangle(0, 0, 0, 0), new Vector3(0, 0, 0), new Vector3(GetPlayerX(), GetPlayerY(), 0), Color.White);
                    DrawPlayer.End();
                }
                catch (Exception e) { }
            }
        }