Я чинил круг

Урааааааа, круг работает правильно!
This commit is contained in:
Nikita_Silantyev 2018-04-20 17:05:14 +04:00 committed by GitHub
parent 17be6b9daf
commit c297094832
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,8 +15,10 @@ namespace WindowsFormsApplication1
File.AppendAllText(filename, Environment.NewLine);
File.AppendAllText(filename, " " + name + ".texture = txLoadImage(\"Pictures\\\\" + Path.GetFileName(p.adress) + "\");" + Environment.NewLine);
File.AppendAllText(filename, Environment.NewLine);
File.AppendAllText(filename, " " + name + ".x = 50;" + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".y = 50;" + 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 + ".angle = 0;" + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".nomer_kadra = 0;" + Environment.NewLine);
File.AppendAllText(filename, Environment.NewLine);
@ -24,17 +26,23 @@ namespace WindowsFormsApplication1
public static void MovePerson(string filename, string name, Person p)
{
File.AppendAllText(filename, " " + name + ".angle++;" + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".x = 500 + 200 * cos (" + name + ".angle / 10);" + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".y = 300 + 200 * sin (" + name + ".angle / 10);" + Environment.NewLine);
File.AppendAllText(filename, " txTransparentBlt(txDC(), " + name + ".x, " + name + ".y, " + p.width + "," + p.height + "," + name + ".texture, " + p.width + "/" + p.sprite + " * " + name + ".nomer_kadra, 0, RGB(0, 255, 255));" + Environment.NewLine);
File.AppendAllText(filename, " if ((myTime >= " + p.time1 + ") && (myTime <= " + p.time2 + ")) {" + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".angle++;" + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".x = (" + p.x1 + " + " + p.x2 + ")/2 * cos (" + name + ".angle / 10);" + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".y = (" + p.y1 + " + " + p.y2 + ")/2 * sin (" + name + ".angle / 10);" + Environment.NewLine);
File.AppendAllText(filename, " txTransparentBlt(txDC(), " + name + ".x, " + name + ".y, " +
p.width + "/" + p.sprite + ", " +
p.height + "," +
name + ".texture, " +
p.width + "/" + p.sprite + " * " + name + ".nomer_kadra, 0, RGB(0, 255, 255));" + Environment.NewLine);
File.AppendAllText(filename, Environment.NewLine);
File.AppendAllText(filename, " " + name + ".nomer_kadra++;" + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".nomer_kadra++;" + Environment.NewLine);
File.AppendAllText(filename, Environment.NewLine);
File.AppendAllText(filename, " if (" + name + ".nomer_kadra > 2)" + Environment.NewLine);
File.AppendAllText(filename, " {" + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".nomer_kadra = 0;" + Environment.NewLine);
File.AppendAllText(filename, " }" + Environment.NewLine);
File.AppendAllText(filename, " if (" + name + ".nomer_kadra >= " + p.sprite + ")" + Environment.NewLine);
File.AppendAllText(filename, " {" + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".nomer_kadra = 0;" + Environment.NewLine);
File.AppendAllText(filename, " }" + Environment.NewLine);
File.AppendAllText(filename, " }" + Environment.NewLine)
File.AppendAllText(filename, Environment.NewLine);
}
}