// Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.S))
     {
         GameObject[] ships = GameObject.FindGameObjectsWithTag("Surface");
         //Debug.Log("number of ships is: " + ships.Length);
         //Debug.Log("Saving");
         scenarioFactory.SaveScenario("Test");
     }
     else if (Input.GetKeyDown(KeyCode.L))
     {
         //Debug.Log("Loading");
         scenarioFactory.LoadScenario("Test");
     }
 }
示例#2
0
 public void Load(string fileName)
 {
     editor.Reset(sceneFactory.LoadScenario(fileName));
     currentFileName = fileName;
 }