Beispiel #1
0
        public Mod()
		{
            this.loadGuiSkin();
			//recordFolder = this.OwnFolder() + Path.DirectorySeparatorChar + "Records";
            string homePath = (Environment.OSVersion.Platform == PlatformID.Unix ||Environment.OSVersion.Platform == PlatformID.MacOSX)? Environment.GetEnvironmentVariable("HOME") : Environment.ExpandEnvironmentVariables("%HOMEDRIVE%%HOMEPATH%");
            recordFolder = homePath + Path.DirectorySeparatorChar + "ScrollsRecords";

            if (!Directory.Exists(recordFolder + Path.DirectorySeparatorChar))
			{
				Directory.CreateDirectory(recordFolder + Path.DirectorySeparatorChar);
			}
			player = new Player(recordFolder);
            sttngs = new Settings(recordFolder);

			try {
				App.Communicator.addListener(this);
			} catch {}

			new Thread (new ThreadStart (parseRecords)).Start ();
            Console.WriteLine("loaded Recorder");
		}
Beispiel #2
0
		public Recorder(String saveFolder, Mod uiClass, Settings stngs)
		{
            this.settings = stngs;
			this.saveFolder = saveFolder;
			//App.Communicator.addListener(this);
			this.comm = App.Communicator;
            this.comm.addListener(this);
                /*IpPort address = App.SceneValues.battleMode.address;
                if (!address.Equals(App.Communicator.getAddress()))
                {
                    this.comm = App.SceneValues.battleMode.specCommGameObject.GetComponent<MiniCommunicator>();
                    this.comm.addListener(this);
                    this.comm.setEnabled(true, true);
                }
                */
            this.uiClass = uiClass;
            this.recording = true;
			//timestamp = DateTime.Now;
            

            gsc = new GameStateCreator();

		}