我需要从不同的类中更改多个Game1变量.我一直这样做:
public class Game1 : Microsoft.Xna.Framework.Game
{
public int test1;
public int test2;
}
public class Player
{
public Player(Game1 game)
{
game.test1 = 5;
game.test2 = 10;
}
}
Run Code Online (Sandbox Code Playgroud)
这是不好的做法,如果是这样,有另一种方法吗?