public DateCounter(TimeSpan timeAdded, IAstroObject tickableObject) { this.SpeedModiffer = 1f; this.timeAdded = timeAdded; this.tickableObject = tickableObject; this.date = StartingTime; //first we set the backing field this.Date = DateTime.Now; //then we set it again so we can change our object's position }
private TimeSpan timeAdded; //the increase of time every tick #endregion Fields #region Constructors public DateCounter(TimeSpan timeAdded, IAstroObject tickableObject) { this.SpeedModiffer = 1f; this.timeAdded = timeAdded; this.tickableObject = tickableObject; this.date = StartingTime; //first we set the backing field this.Date = DateTime.Now; //then we set it again so we can change our object's position }