/// <summary> Removes the given position </summary>
 /// <param name="position"> The position to remove </param>
 public void RemovePosition(MultiPositionValue position)
 {
     if (multiPosition == null)
     {
         multiPosition = new MultiPosition(transform);
     }
     multiPosition.RemovePosition(position);
 }
Exemple #2
0
 /// <summary> Removes the given position </summary>
 /// <param name="pos"> The vector to remove </param>
 public void RemovePosition(MultiPositionValue pos)
 {
     if (positions == null)
     {
         return;
     }
     if (positions.Contains(pos))
     {
         positions.Remove(pos);
         Update();
     }
 }
Exemple #3
0
        /// <summary> Adds position to use </summary>
        /// <param name="value"> Vector to apply </param>
        /// <returns> The MultiPositionValue reference </returns>
        public MultiPositionValue AddNewPosition(Vector3 value)
        {
            if (positions == null)
            {
                positions = new List <MultiPositionValue>();
            }
            MultiPositionValue pos = new MultiPositionValue {
                position = value
            };

            positions.Add(pos);
            Update();
            return(pos);
        }