/// <summary> /// Initializes the behavior /// </summary> protected override void Initialize() { base.Initialize(); this.objectPath = new ObjectPath(path, this.offsetRotation); this.screenplay = this.EntityManager.Find("ScreenplayManager").FindComponent<ScreenplayManager>(); this.screenplay.StartFrame = Math.Min(this.objectPath.Start, this.screenplay.StartFrame); this.screenplay.EndFrame = Math.Max(this.objectPath.End, this.screenplay.EndFrame); }
/// <summary> /// Initializes the behavior /// </summary> protected override void Initialize() { base.Initialize(); this.objectPath = new ObjectPath(path, this.OffsetOrientation); var screenPlayEntity = this.EntityManager.Find("ScreenplayManager"); if (screenPlayEntity != null) { this.screenplay = screenPlayEntity.FindComponent<ScreenplayManager>(); this.screenplay.StartFrame = Math.Min(this.objectPath.Start, this.screenplay.StartFrame); this.screenplay.EndFrame = Math.Max(this.objectPath.End, this.screenplay.EndFrame); } }