我需要讓我的精靈,每次我按下空間拍攝。我敢肯定,我創建了質感和繪製它(我的播放器類中),但每次有人讀bulletTexture.width時候它總是返回null。我希望有些人能幫助我。 這裏是我的代碼一個完整的破敗: Player.cs從SpriteManager類 using System;
using System.Collections.Generic;
using System.Lin
縮放一個Texture2D我具有與1280×720的分辨率的窗口餘繪製爲隨後一個160×80按鈕(I意譯有點這裏): currentwindowwidth = 1280;
// The scale in this instance would be 1.0f
scale = currentwindowwidth/1280f;
b.position = new Vector2(640, 650