private void Start()
 {
     wayPoints ??= new[] { platform };
     if (wayPoints.Length == 1)
     {
         type = PlatformMovementType.SinglePass;
     }
     _platformIter = type switch
     {
         PlatformMovementType.Loop => new LoopPlatformIter(wayPoints),
         PlatformMovementType.PingPong => new PingPongPlatformIter(wayPoints),
         _ => new SingPassPlatformIter(wayPoints)
     };
 }
        private static PlatformMovementBaseData GetPlatformMovementData(XElement movementElement)
        {
            if (movementElement == null)
            {
                return(null);
            }

            PlatformMovementType type = movementElement.GetEnum <PlatformMovementType>("type");

            XElement propertiesElement             = movementElement.Element("properties");
            Dictionary <string, string> properties = GetPropertiesData(propertiesElement);

            return(new PlatformMovementBaseData(type, properties));
        }
 public PlatformMovementBaseData(PlatformMovementType type, Dictionary<string, string> properties)
 {
     Type = type;
     Properties = properties;
 }
 public PlatformMovementBaseData(PlatformMovementType type, Dictionary <string, string> properties)
 {
     Type       = type;
     Properties = properties;
 }