2013-10-13 34 views
-1

如何獲得窗口中的固定位置?我使用2D相機,如果移動得分仍然在我身後。我試過,但它不起作用OFCR:我如何獲得窗口中的固定位置?

spriteBatch.DrawString(font, "Score: "+ score,//here i have to put the parameters of the position , Color.Gold); 
+0

請儘量不要問同樣的問題兩次(http://stackoverflow.com/questions/19345920/how-can-i-get-a-fixed-position-in-a-window-with-xna )。僅僅因爲有人在30分鐘內沒有回覆你的問題並不意味着你可以再次提問。 – davidsbro

回答

0

當使用2D相機,你需要使用另一個SpriteBatch你固定的圖形,否則你將繪製在屏幕上滑動的一切。

spriteBatch.Begin(); 
spriteBatch.DrawString(font, "Score: "+ score, new Vector2(x, y), color); 
spriteBatch.End(); 
相關問題