/// <summary>
 /// constructor taking a serializable task
 /// </summary>
 public MovingTask(TaskList tl, SerializableTask task) : base(tl, task)
 {
     Position      = task.Position;
     Rotation      = task.Rotation;
     SnapThreshold = task.SnapThreshold;
     MoveType      = task.MoveType;
 }
 /// <summary>
 /// constructor that takes a task and serialize it into its internal data structure
 /// </summary>
 public SerializableTask(Task t)
 {
     TaskDelay   = t.TaskDelay;
     GOName      = t.GOName;
     TypeName    = t.GetType().Name;
     GameObject  = t.GameObject;
     TaskName    = t.TaskName;
     Description = t.Description;
     TaskEvents  = new List <SerializableTaskEvent>();
     foreach (var taskEvent in t.TaskEvents)
     {
         TaskEvents.Add(new SerializableTaskEvent(taskEvent));
     }
     switch (TypeName)
     {
     case "MovingTask":
     {
         MovingTask castedTask = t as MovingTask;
         Position      = castedTask.Position;
         Rotation      = castedTask.Rotation;
         SnapThreshold = castedTask.SnapThreshold;
         MoveType      = castedTask.MoveType;
     } break;
     }
 }
 /// <summary>
 /// constructor that takes a task and serialize it into its internal data structure
 /// </summary>
 public SerializableTask(Task t)
 {
     GOName      = t.GOName;
     TypeName    = t.GetType().Name;
     GameObject  = t.GameObject;
     TaskName    = t.TaskName;
     Description = t.Description;
     if (t.TaskEvent != null)
     {
         TaskEvent = new SerializableTaskEvent(t.TaskEvent);
     }
     switch (TypeName)
     {
     case "MovingTask":
     {
         MovingTask castedTask = t as MovingTask;
         Position      = castedTask.Position;
         Rotation      = castedTask.Rotation;
         SnapThreshold = castedTask.SnapThreshold;
         MoveType      = castedTask.MoveType;
     } break;
     }
 }