private void Save() { GameStateModel model = new GameStateModel(); model.lastPosition = new GameStateModel.SerializableVector3(inst_character.transform.position); model.currentHP = inst_character.hp; //TODO 1125 : 아이템에 관한 부분이 빠짐 추가해야함. GameStateModel.SerializeAndMakeFile(selectedPath, model); if (checkDialog.IsOpen) //여기도 코드 더러움 { checkDialog.CloseDialog(); } CloseMenu(); }
private void DebugSerialize() { GameStateModel model = new GameStateModel(); GameStateModel.SerializableVector3 vec = new GameStateModel.SerializableVector3(); vec.x = 10.0f; vec.y = 20.0f; vec.z = 5.0f; Dictionary <string, int> test = new Dictionary <string, int>(); test.Add("Hi", 3); test.Add("Hello", 2); model.lastPosition = vec; model.itemList = test; model.currentHP = 70.0f; GameStateModel.SerializeAndMakeFile("Save", model); }