This commit is contained in:
Mikhail Abramov 2018-04-17 19:48:49 +03:00 committed by GitHub
parent df0b816676
commit f5bb8d775e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 7 deletions

View file

@ -167,9 +167,10 @@ namespace WindowsFormsApplication1
File.AppendAllText(filename, Environment.NewLine);
File.AppendAllText(filename, " " + name + ".x = " + p.x1 + "; " + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".y = " + p.y1 + "; " + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".x2 = " + p.x2 + "; " + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".y2 = " + p.y2 + "; " + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".nomer_kadra = 0; " + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".texture = txLoadImage(\"Pictures\\\\" + Path.GetFileName(p.adress) + "\"); " + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".gr_dvigx = 1000; " + Environment.NewLine);
}
private void go_pryamo(string filename, string name)
@ -234,7 +235,7 @@ namespace WindowsFormsApplication1
}
else if (persons[nomer].moveside == "Волнами")
{
Sinus.CreatePerson(filename, Person.PersonName(nomer), persons[nomer].coord);
Sinus.CreatePerson(filename, Person.PersonName(nomer), persons[nomer]);
}
else if (persons[nomer].moveside == "Кругами")
{

View file

@ -8,15 +8,15 @@ namespace WindowsFormsApplication1
{
public class Sinus
{
public static void CreatePerson(string filename, string name, string xBeg)
public static void CreatePerson(string filename, string name, Person p)
{
File.AppendAllText(filename, " Person " + name + ";" + Environment.NewLine);
File.AppendAllText(filename, Environment.NewLine);
File.AppendAllText(filename, " " + name + ".texture = txLoadImage(\"Pictures\\\\Personaj.bmp\");" + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".x = " + xBeg + ";" + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".y = " + xBeg + ";" + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".texture = txLoadImage(\"Pictures\\\\" + Path.GetFileName(p.adress) + "\"); " + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".x = " + p.x1 + ";" + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".y = " + p.y1 + ";" + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".nomer_kadra = 0;" + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".nach_dv = " + name + ".y;" + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".nach_dv = (" + p.y1 + "+" + p.y2 + ")/2;" + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".ampl_y = 150;" + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".ampl_x = 10;" + Environment.NewLine);
}