예제 #1
0
 /// <summary>
 /// Copies property values from the origin
 /// </summary>
 /// <param name="originWaypoint">Origin waypoint, properties will be copied from it to this waypoint</param>
 /// <param name="copyTrigger">Should triggers be copied with the waypoint</param>
 public void CopyProperties(ScenarioWaypoint originWaypoint, bool copyTrigger = false)
 {
     Speed        = originWaypoint.Speed;
     WaitTime     = originWaypoint.WaitTime;
     IndexInAgent = originWaypoint.IndexInAgent;
     if (copyTrigger)
     {
         LinkedTrigger.CopyProperties(originWaypoint.LinkedTrigger);
     }
 }
예제 #2
0
        /// <inheritdoc/>
        public override void CopyProperties(ScenarioElement origin)
        {
            var originWaypoint = origin.GetComponent <ScenarioWaypoint>();

            if (originWaypoint == null)
            {
                return;
            }
            //Clear triggers object
            LinkedTrigger.Deinitalize();
            LinkedTrigger.Initialize();
            CopyProperties(originWaypoint, true);
        }
예제 #3
0
        /// <inheritdoc/>
        public override void CopyProperties(ScenarioElement origin)
        {
            base.CopyProperties(origin);
            var originWaypoint = origin.GetComponent <ScenarioAgentWaypoint>();

            if (originWaypoint == null)
            {
                return;
            }

            //Clear triggers object
            LinkedTrigger.Deinitalize();
            LinkedTrigger.Initialize();
            WaitTime = originWaypoint.WaitTime;
            LinkedTrigger.CopyProperties(originWaypoint.LinkedTrigger);
        }