Exemplo n.º 1
0
        public void LoggingSettings_WhenAlways_ShouldGetHomePath()
        {
            //Arrange
            var loggingSettings = new LoggingSettings();
            var genericSettings = new GenericSettings();

            //Act
            var result = loggingSettings.homePath;

            //Assert
            Assert.Equal(genericSettings.homePath, result);
        }
    public override void OnInspectorGUI()
    {
        GenericSettings settings = (GenericSettings)target;

        settings.Narration    = EditorGUILayout.Toggle("Narration", settings.Narration);
        settings.UseRecording = EditorGUILayout.Toggle("Use Recording", settings.UseRecording);
        settings.Autoplay     = EditorGUILayout.Toggle("Autoplay", settings.Autoplay);
        settings.Arrows       = EditorGUILayout.Toggle("Arrows", settings.Arrows);
        settings.Music        = EditorGUILayout.Toggle("Music", settings.Music);
        settings.Sound        = EditorGUILayout.Toggle("Sound", settings.Sound);
        settings.Tutorials    = EditorGUILayout.Toggle("Tutorials", settings.Tutorials);
    }
Exemplo n.º 3
0
        public void FileGeneratorSettings_WhenAlways_ShouldGetHomePath()
        {
            //Arrange
            var fileGeneratorSettings = new FileGeneratorSettings();
            var genericSettings       = new GenericSettings();

            //Act
            var result = fileGeneratorSettings.homePath;

            //Assert
            Assert.Equal(genericSettings.homePath, result);
        }
Exemplo n.º 4
0
    /// <summary>
    /// Unity method.
    /// Awake this instance.
    /// </summary>
    protected virtual void Awake()
    {
        if (instance == null)
        {
            instance        = this;
            createdInstance = true;
        }

        // Initialize the wrappers you want to use
        AnimationWrapper.Instance.GetType();
        RenderWrapper.Instance.GetType();
        SoundWrapper.Instance.GetType();
        TextWrapper.Instance.GetType();
        LocalizationWrapper.Instance.GetType();
    }
Exemplo n.º 5
0
        public void SetSettings(GenericSettings s)
        {
            if (s.GetType() != SettingsType)
            {
                throw new Exception("Wrong type of settings used");
            }

            Profile p = ByName(ProfileManager.ScratchPadName);

            if (p == null)
            {
                p = genScratchpad();
                profiles.Add(p);
            }
            p.BaseSettings  = s;
            SelectedProfile = p;
        }
Exemplo n.º 6
0
 public void SetSettings(GenericSettings s)
 {
     bySettingsType(s.GetType()).SetSettings(s);
 }
Exemplo n.º 7
0
 public virtual bool Equals(GenericSettings other)
 {
     return PropertyEqualityTester.AreEqual(this, other);
 }
Exemplo n.º 8
0
 public bool Equals(GenericSettings other)
 {
     // This works for all known descendants
     return(other == null ? false : PropertyEqualityTester.AreEqual(this, other));
 }
Exemplo n.º 9
0
 public bool Equals(GenericSettings other)
 {
     return(other == null ? false : PropertyEqualityTester.AreEqual(this, other));
 }
Exemplo n.º 10
0
 public bool Equals(GenericSettings other)
 {
     return other == null ? false : PropertyEqualityTester.AreEqual(this, other);
 }
Exemplo n.º 11
0
 public bool Equals(GenericSettings other)
 {
     // This works for all known descendants
     return other == null ? false : PropertyEqualityTester.AreEqual(this, other);
 }
Exemplo n.º 12
0
 public virtual bool Equals(GenericSettings other)
 {
     return(PropertyEqualityTester.AreEqual(this, other));
 }
Exemplo n.º 13
0
	/// <summary>
	/// Unity method.
	/// Awake this instance.
	/// </summary>
	protected virtual void Awake()
	{
		if (instance == null) {
			instance = this;
			createdInstance = true;
		}
		
		// Initialize the wrappers you want to use
		AnimationWrapper.Instance.GetType();
		RenderWrapper.Instance.GetType();
		SoundWrapper.Instance.GetType();
		TextWrapper.Instance.GetType();
		LocalizationWrapper.Instance.GetType();
	}