Esempio n. 1
0
        /// <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);
        }
Esempio n. 2
0
        /// <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);
            }
        }