Esempio n. 1
0
        /// <summary>
        /// Sets the axis sources.
        /// </summary>
        /// <param name="clearOnly">Whether to only clear the existing sources and not add new ones.</param>
        public virtual void SetAxisSources(bool clearOnly = false)
        {
            if (lateralAxis != null)
            {
                lateralAxis.ClearSources();
                if (!clearOnly && facade.LateralAxis != null)
                {
                    lateralAxis.AddSource(facade.LateralAxis);
                }
            }

            if (longitudinalAxis != null)
            {
                longitudinalAxis.ClearSources();
                if (!clearOnly && facade.LongitudinalAxis != null)
                {
                    longitudinalAxis.AddSource(facade.LongitudinalAxis);
                }
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Sets the adds the <see cref="source"/> to the Sources collection of the <see cref="target"/> <see cref="FloatAction"/>.
 /// </summary>
 /// <param name="source">The <see cref="FloatAction"/> to add as a source.</param>
 /// <param name="target">The <see cref="FloatAction"/> to have the Sources collection updated.</param>
 protected virtual void SetInputSource(FloatAction source, FloatAction target)
 {
     target.ClearSources();
     target.AddSource(source);
 }