Merge pull request #47 from IngenerkaTeamCenter/nikpopl-patch-2
Я чинил круг
This commit is contained in:
commit
3018ac4b2e
1 changed files with 19 additions and 11 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue