2009-05-23から1日間の記事一覧
private static readonly Point InvalidPosition = new Point(-1, -1); というものが気になってしまった。 private const Point InvalidPosition = new Point(-1, -1); じゃないのかと。 しかしnewできるものはconst宣言できないというので、ははあ、ならば…
public Vector2 Velocity { get { return velocity; } private set { Velocity = value; } } Vector2 velocity; このように書くとスタックオーバーフローのランタイムエラーが出る。 正解は public Vector2 Velocity { get { return velocity; } private set…
相変わらずPlatformerをいじっている。 XNA2.0には GraphicsDevice.Viewport.TitleSafeArea というものがない。 TitleSafeAreaというのはつまりビューポートの中で、アナログディスプレイで表示したときに、 テキストを表示して良い安全範囲ということだろう…