//public void draw(MVector3 pos, MRectangle srcRect, MVector2 scale, // MVector2 translate, MVector3 drawCenter, float angle, MVector4 color) public static void draw(int textureID, int pos, int srcRect, int scale, int translate, int drawCenter, float angle, int color) { //m_graphicHandlerRef.getSpriteBatch().Draw(m_texture, m_graphicHandlerRef.getGameInstance().Window.ClientBounds, Color.White); Rectangle? rect; MRectangle trueRect = MRectangle.getFromStorage(srcRect); if (trueRect != null) { rect = trueRect.getRawData(); } else { rect = null; } Vector2 scaleParam = MVector2.getFromStorage(scale).getRawData(); SpriteEffects sEffect = generateSpriteEffect(ref scaleParam); Vector2 translateParam = MVector3.getFromStorage(pos).getRawAxistedVec2() + MVector2.getFromStorage(translate).getRawData(); m_graphicHandlerRef.getSpriteBatch() .Draw( MTexture.getFromStorage(textureID).m_texture, translateParam, rect, MVector4.getFromStorage(color).getColor(), angle, MVector3.getFromStorage(drawCenter).getRawVec2(), scaleParam, sEffect, 0.0f); }
public static int getHeight(int ID) { return(MTexture.getFromStorage(ID).m_texture.Height); }
public static int getWidth(int ID) { return(MTexture.getFromStorage(ID).m_texture.Width); }