/*
© 2017 Altavant Technologies Inc.
Web: http://www.altavant.com
*/

namespace Altavant.Fusion.Core.Props
{
	public class FloatProperty : Property
	{
		private float _value;

		public FloatProperty()
		{
			
		}

		public FloatProperty(float value)
		{
			_value = value;
		}

		public override PropertyType Type
		{
			get
			{
				return PropertyType.Float;
			}
		}

		public float Value
		{
			get
			{
				return _value;
			}
			set
			{
				_value = value;
			}
		}

		public override void Write(Utils.StreamWriter writer)
		{
			base.Write(writer);

			writer.Write(_value); 
		}

		public override void Read(Utils.StreamReader reader)
		{
			_value = reader.ReadFloat();
		}
	}
}