Пример #1
0
 public virtual void OnEnable()
 {
     ConcaveShape = target as FSConcaveShapeComponent;
     EditTarget   = new SerializedObject(ConcaveShape);
     FSSettings.Load();
     categorySettings = FSSettings.CategorySettings;
 }
	public virtual void OnEnable()
	{
		target0 = target as FSConcaveShapeComponent;
		EditTarget = new SerializedObject(target0);
		FSSettings.Load();
		categorySettings = FSSettings.CategorySettings;
	}
Пример #3
0
    public static void Load()
    {
        // path setup
        string path = Application.dataPath + "/Editor/FarseerComponents/SerializedSettings";

        if (!Directory.Exists(path))
        {
            Directory.CreateDirectory(path);
        }

        //setup vars
        FileStream    fs;
        XmlSerializer xmls;

        //FSCategorySettings
        if (File.Exists(path + "/FSCategorySettings.cfg"))
        {
            xmls             = new XmlSerializer(typeof(FSCategorySettings));
            fs               = new FileStream(path + "/FSCategorySettings.cfg", FileMode.Open);
            categorySettings = xmls.Deserialize(fs) as FSCategorySettings;
            fs.Close();
        }
        else
        {
            categorySettings = new FSCategorySettings();
        }
    }
Пример #4
0
    public static void Load(FSSettingsPlatform platform)
    {
        // path setup
        string path = Application.dataPath + "/FarseerUnity/Editor/SerializedSettings";

        //Debug.Log("PATH: " +path);
        if (!Directory.Exists(path))
        {
            Directory.CreateDirectory(path);
        }

        //setup vars
        FileStream    fs;
        XmlSerializer xmls;

        //Debug.Log("PATH2: " +path + "/FSCoreSettings_" + platform.ToString() + ".cfg");
        //FSCoreSettings
        if (File.Exists(path + "/FSCoreSettings_" + platform.ToString() + ".cfg"))
        {
            //Debug.Log("EXISTS");
            xmls         = new XmlSerializer(typeof(FSCoreSettings));
            fs           = new FileStream(path + "/FSCoreSettings_" + platform.ToString() + ".cfg", FileMode.Open);
            coreSettings = xmls.Deserialize(fs) as FSCoreSettings;
            //Debug.Log(coreSettings);
            fs.Close();
        }
        else
        {
            coreSettings = new FSCoreSettings();
        }

        //FSCategorySettings
        if (File.Exists(path + "/FSCategorySettings.cfg"))
        {
            xmls             = new XmlSerializer(typeof(FSCategorySettings));
            fs               = new FileStream(path + "/FSCategorySettings.cfg", FileMode.Open);
            categorySettings = xmls.Deserialize(fs) as FSCategorySettings;
            fs.Close();
        }
        else
        {
            categorySettings = new FSCategorySettings();
        }

        lastPlatform = platform;
    }
Пример #5
0
    public static void Load()
    {
        // path setup
        string path = Application.dataPath + "/Editor/FarseerComponents/SerializedSettings";
        if(!Directory.Exists(path))
            Directory.CreateDirectory(path);

        //setup vars
        FileStream fs;
        XmlSerializer xmls;

        //FSCategorySettings
        if(File.Exists(path + "/FSCategorySettings.cfg"))
        {
            xmls = new XmlSerializer(typeof(FSCategorySettings));
            fs = new FileStream(path + "/FSCategorySettings.cfg", FileMode.Open);
            categorySettings = xmls.Deserialize(fs) as FSCategorySettings;
            fs.Close();
        }
        else
        {
            categorySettings = new FSCategorySettings();
        }
    }
 public void Setup()
 {
     FSSettings.Load();
     loadedFSCategorySettings = FSSettings.CategorySettings;
 }
Пример #7
0
 protected virtual void Awake()
 {
     target0 = target as FSCollisionGroup;
     FSSettings.Load();
     categorySettings = FSSettings.CategorySettings;
 }
Пример #8
0
 public void Setup()
 {
     FSSettings.Load();
     loadedFSCategorySettings = FSSettings.CategorySettings;
 }
Пример #9
0
    public static void Load(FSSettingsPlatform platform)
    {
        // path setup
        string path = Application.dataPath + "/FarseerUnity/Editor/SerializedSettings";
        if(!Directory.Exists(path))
            Directory.CreateDirectory(path);

        //setup vars
        FileStream fs;
        XmlSerializer xmls;

        //FSCoreSettings
        if(File.Exists(path + "/FSCoreSettings_" + platform.ToString() + ".cfg"))
        {
            xmls = new XmlSerializer(typeof(FSCoreSettings));
            fs = new FileStream(path + "/FSCoreSettings_" + platform.ToString() + ".cfg", FileMode.Open);
            coreSettings = xmls.Deserialize(fs) as FSCoreSettings;
            fs.Close();
        }
        else
        {
            coreSettings = new FSCoreSettings();
        }

        //FSCategorySettings
        if(File.Exists(path + "/FSCategorySettings.cfg"))
        {
            xmls = new XmlSerializer(typeof(FSCategorySettings));
            fs = new FileStream(path + "/FSCategorySettings.cfg", FileMode.Open);
            categorySettings = xmls.Deserialize(fs) as FSCategorySettings;
            fs.Close();
        }
        else
        {
            categorySettings = new FSCategorySettings();
        }

        lastPlatform = platform;
    }
Пример #10
0
 protected virtual void Awake()
 {
     target0 = target as FSCollisionGroup;
     FSSettings.Load();
     categorySettings = FSSettings.CategorySettings;
 }
Пример #11
0
 public virtual void OnEnable()
 {
     target0 = target as FSShapeComponent;
     FSSettings.Load();
     categorySettings = FSSettings.CategorySettings;
 }
Пример #12
0
	public virtual void OnEnable()
	{
		target0 = target as FSShapeComponent;
		FSSettings.Load();
		categorySettings = FSSettings.CategorySettings;
	}