Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions MovementScriptGenerator/ChainElementsEnum.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

namespace MovementScriptGenerator
{
enum ChainElementsEnum
{
Circle,
Spiral,
JTurn,
Group
}
}
78 changes: 0 additions & 78 deletions MovementScriptGenerator/Circle.cs

This file was deleted.

49 changes: 29 additions & 20 deletions MovementScriptGenerator/CircleControl.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Windows.Forms;
using MovementScriptGenerator.Modules;

namespace MovementScriptGenerator
{
public partial class CircleControl : UserControl
{
private static Circle circle = new Circle();

List<string> rotationTypes = new List<string>()
{
Expand All @@ -33,28 +24,46 @@ private void initializeComboBoxes()
cbRotation.SelectedIndex = 0;
}

public MovementScript CreateMovementScript()
public bool Populate(Circle original)
{
MovementScript movementScript = new MovementScript();
bool rotateClockwise = false;
if (cbRotation.SelectedIndex == 0)
try
{
rotateClockwise = true;
numFOV.Value = original.Fov;
numDuration.Value = (decimal)original.Duration;
numHeight.Value = (decimal)original.Height;
numRotX.Value = (decimal)original.RotX;
numRotZ.Value = (decimal)original.RotZ;
numDistance.Value = (decimal)original.Distance;
numStartingPoint.Value = (decimal)original.StartingPointDegree;
numSector.Value = (decimal)original.SectorDegrees;
numIterations.Value = original.Iterations;
cbRotation.SelectedIndex = original.RotateClockwise ? 0 : 1;
}
movementScript.frames = circle.GenerateFrames(
catch
{
return false;
}

return true;
}

public Circle CreateMove(string moveName)
{
Circle circle = new Circle(
moveName,
(int)numFOV.Value,
(float)numDuration.Value,
(float)numHeight.Value,
(float)numRotX.Value,
(float)numRotZ.Value,
(float)numDistance.Value,
(float)numStartingPoint.Value,
(float)numSector.Value,
(int)numIterations.Value,
(float)numHeight.Value,
rotateClockwise
);
cbRotation.SelectedIndex == 0
);

return movementScript;
return circle;
}
}
}
Loading