Ejemplo n.º 1
0
    public override void UpdateBinding()
    {
        if (_hexProperty != null)
        {
            _hexProperty.OnChange -= OnChange;
            _hexProperty = null;
        }
        if (_colorProperty != null)
        {
            _colorProperty.OnChange -= OnChange;
            _colorProperty = null;
        }

        var context = GetContext();
        if (context == null)
        {
            Debug.LogWarning("iGuiColorBinding.UpdateBinding - context is null");
            return;
        }

        _colorProperty = context.FindProperty<Color>(Path, this);
        if (_colorProperty == null)
            _hexProperty = context.FindProperty<string>(Path, this);

        if (_colorProperty != null)
            _colorProperty.OnChange += OnChange;
        if (_hexProperty != null)
            _hexProperty.OnChange += OnChange;

        OnChange();
    }
Ejemplo n.º 2
0
	protected override void Unbind()
	{
		base.Unbind();
		
		if (_masterVolumeProperty != null)
			_masterVolumeProperty.OnChange -= ApplyVolume;
		_masterVolumeProperty = null;	
	}
Ejemplo n.º 3
0
	protected override void Unbind()
	{
		base.Unbind();

		if (_shader != null)
		{
			_shader.OnChange -= OnChange;
			_shader = null;
		}
	}
Ejemplo n.º 4
0
	protected override void Unbind()
	{
		base.Unbind();

		if (_clip != null)
		{
			_clip.OnChange -= OnChange;
			_clip = null;
		}
	}
Ejemplo n.º 5
0
	protected override void Unbind()
	{
		base.Unbind();
		
		if (_texture != null)
		{
			_texture.OnChange -= OnChange;
			_texture = null;
		}
	}
Ejemplo n.º 6
0
	protected override void Bind()
	{
		var context = GetContext(MasterVolume);
		if (context != null)
			_masterVolumeProperty = context.FindProperty<float>(MasterVolume, this);
		
		if (_masterVolumeProperty != null)
			_masterVolumeProperty.OnChange += ApplyVolume;

		base.Bind();
	}
Ejemplo n.º 7
0
 protected override void Unbind()
 {
     if (_hexProperty != null)
     {
         _hexProperty.OnChange -= OnChange;
         _hexProperty = null;
     }
     if (_colorProperty != null)
     {
         _colorProperty.OnChange -= OnChange;
         _colorProperty = null;
     }
 }
Ejemplo n.º 8
0
	protected override void Bind()
	{
		base.Bind();

		var context = GetContext(Path);
		if (context == null)
		{
			Debug.LogWarning("NguiTexture.UpdateBinding - context is null");
			return;
		}

		_shader = context.FindProperty<Shader>(Path, this);

		if (_shader != null)
		{
			_shader.OnChange += OnChange;
		}
	}
Ejemplo n.º 9
0
	protected override void Bind()
	{
		base.Bind();

		var context = GetContext(Path);
		if (context == null)
		{
			Debug.LogWarning("NguiAnimation.UpdateBinding - context is null");
			return;
		}

		_clip = context.FindProperty<string>(Path, this);

		if (_clip != null)
		{
			_clip.OnChange += OnChange;
		}
	}
Ejemplo n.º 10
0
	private void Bind(NguiDataContext context)
	{
		_v3property = context.FindProperty<Vector3>(Path, this);
		if (_v3property != null)
		{
			_v3property.OnChange += OnChange;
			return;
		}
		
		_v2property = context.FindProperty<Vector2>(Path, this);
		if (_v2property != null)
		{
			_v2property.OnChange += OnChange;
			return;
		}
		
		_t2property = context.FindProperty<Texture2D>(Path, this);
		if (_t2property != null)
		{
			_t2property.OnChange += OnChange;
			return;
		}
		
		_transformProperty = context.FindProperty<Transform>(Path, this);
		if (_transformProperty != null)
		{
			_transformProperty.OnChange += OnChange;
			return;
		}
		
		_componentProperty = context.FindProperty<Component>(Path, this);
		if (_componentProperty != null)
		{
			_componentProperty.OnChange += OnChange;
			return;
		}

		_gameObjectProperty = context.FindProperty<GameObject>(Path, this);
		if (_gameObjectProperty != null)
		{
			_gameObjectProperty.OnChange += OnChange;
			return;
		}
	}
Ejemplo n.º 11
0
    public override void UpdateBinding()
    {
        if (_property != null)
            _property.OnChange -= OnChange;

        var context = GetContext();
        if (context == null)
        {
            Debug.LogWarning("iGuiClockTimeBinding.UpdateBinding - context is null");
            return;
        }

        _property = context.FindProperty<DateTime>(Path, this);

        if (_property != null)
        {
            _property.OnChange += OnChange;
        }
        OnChange();
    }
Ejemplo n.º 12
0
    protected override void Bind()
    {
        var context = GetContext(Path);
        if (context == null)
        {
            Debug.LogWarning("NguiColorBinding.UpdateBinding - context is null");
            return;
        }

        _colorProperty = context.FindProperty<Color>(Path, this);
        if (_colorProperty == null)
            _hexProperty = context.FindProperty<string>(Path, this);

        if (_colorProperty != null)
            _colorProperty.OnChange += OnChange;
        if (_hexProperty != null)
            _hexProperty.OnChange += OnChange;

        OnChange();
    }
Ejemplo n.º 13
0
    public override void UpdateBinding()
    {
        if (_texture != null)
        {
            _texture.OnChange -= OnChange;
            _texture = null;
        }

        var context = GetContext();
        if (context == null)
        {
            Debug.LogWarning("iGuiTexture.UpdateBinding - context is null");
            return;
        }

        _texture = context.FindProperty<Texture2D>(Path, this);

        if (_texture != null)
        {
            _texture.OnChange += OnChange;
        }
        OnChange();
    }
Ejemplo n.º 14
0
	protected override void Unbind()
	{
		base.Unbind();
		
		if (_gameObjectProperty != null)
			_gameObjectProperty.OnChange -= OnChange;
		if (_componentProperty != null)
			_componentProperty.OnChange -= OnChange;
		if (_transformProperty != null)
			_transformProperty.OnChange -= OnChange;
		if (_v3property != null)
			_v3property.OnChange -= OnChange;
		if (_v2property != null)
			_v2property.OnChange -= OnChange;
		if (_t2property != null)
			_t2property.OnChange -= OnChange;
		
		_gameObjectProperty = null;
		_componentProperty = null;
		_transformProperty = null;
		_v3property = null;
		_v2property = null;
		_t2property = null;
	}