示例#1
0
 public void Draw()
 {
     Screen.Draw(_charTexture, WorldPosition, Origin.Center, ((Direction == -1) ? SpriteEffects.FlipHorizontally : SpriteEffects.None), .150001f);
     if (Settings.IsDebugMode)
     {
         Hitbox.Draw(Color.Red * .5f, 2, SpriteEffects.None, .15f);
     }
 }
示例#2
0
 public virtual void Draw(WriteableBitmap bitmap)
 {
     if (CollisionState == State.Close)
     {
         Hitbox.Draw(bitmap, (255 << 24) | (255 << 16) | (165 << 8));//pomarańczowy
     }
     else
     {
         Hitbox.Draw(bitmap, (255 << 24) | (255 << 16));//czerwony
     }
 }
示例#3
0
 public override void Draw(WriteableBitmap bitmap)
 {
     if (CollisionState == State.Normal)
     {
         Hitbox.Draw(bitmap, (255 << 24) | (153 << 8) | 255);
     }
     else
     {
         base.Draw(bitmap);
     }
 }
示例#4
0
        /// <summary>
        /// Display sprite on screen
        /// </summary>
        /// <param name="spriteBatch"></param>
        public virtual void Draw(SpriteBatchProxy spriteBatch)
        {
            if (IsOnScreen())
            {
                spriteBatch.Draw(Application.MagicContentManager.GetTexture(assetName), dRect, sRect, Color, (float)rotation, spriteOrigin, flip, 1.0f);

                if (Application.IsDebugMode)
                {
                    if (hitbox != null)
                    {
                        hitbox.Draw(spriteBatch);
                    }
                    if (awarenessbox != null)
                    {
                        awarenessbox.Draw(spriteBatch);
                    }
                }
            }
        }
示例#5
0
 public void ClearHitboxGraphics(WriteableBitmap bitmap) => Hitbox.Draw(bitmap, 0); //przezroczysty
示例#6
0
 public void Draw()
 {
     OnDraw?.Invoke();
     Hitbox.Draw(Raylib.Color.LIME);
 }