0
我有下面這段代碼:多個字段的值
public GameMenu(Scene startScene)
{
this.StartSceneBackup = startScene;
this.StartSceneBackup.Entities[0].X = 200;
this.StartScene = startScene;
}
的StartSceneBackup變量是從來不碰,只有StartScene變量被訪問,但是當我改變通過X的值this.StartSceneBackup.Entities[0].X = 200;
它改變了值this.StartScene.Entities[0].X = 200;
這是爲什麼?