Exemple #1
0
		/**
		 * <summary>Creates a new instance of the 'Object: Check track position' Action</summary>
		 * <param name = "dragObject">The moveable object to query</param>
		 * <param name = "trackRegionID">The ID of the track's region</param>
		 * <returns>The generated Action</returns>
		 */
		public static ActionTrackCheck CreateNew (Moveable_Drag dragObject, int trackRegionID)
		{
			ActionTrackCheck newAction = (ActionTrackCheck) CreateInstance <ActionTrackCheck>();
			newAction.method = TrackCheckMethod.WithinTrackRegion;
			newAction.dragObject = dragObject;
			newAction.snapID = trackRegionID;
			return newAction;
		}
Exemple #2
0
		/**
		 * <summary>Creates a new instance of the 'Object: Check track position' Action</summary>
		 * <param name = "dragObject">The moveable object to query</param>
		 * <param name = "trackPosition">The track position to check for</param>
		 * <param name = "condition">The condition to make</param>
		 * <param name = "errorMargin">The maximum difference between the queried track position, and the true track position, for the condition to be met</param>
		 * <returns>The generated Action</returns>
		 */
		public static ActionTrackCheck CreateNew (Moveable_Drag dragObject, float trackPosition, IntCondition condition = IntCondition.MoreThan, float errorMargin = 0.05f)
		{
			ActionTrackCheck newAction = (ActionTrackCheck) CreateInstance <ActionTrackCheck>();
			newAction.method = TrackCheckMethod.PositionValue;
			newAction.dragObject = dragObject;
			newAction.checkPosition = trackPosition;
			newAction.errorMargin = errorMargin;
			return newAction;
		}