Add files via upload

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

View file

@ -22,12 +22,12 @@ namespace WindowsFormsApplication1
File.AppendAllText(filename, Environment.NewLine);
}
public static void MovePerson(string filename, string name)
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 + ".x, 55, 86, " + name + ".texture, 55 * " + name + ".nomer_kadra, 0, RGB(0, 255, 255));" + 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, Environment.NewLine);
File.AppendAllText(filename, " " + name + ".nomer_kadra++;" + Environment.NewLine);
File.AppendAllText(filename, Environment.NewLine);

View file

@ -192,10 +192,14 @@ namespace WindowsFormsApplication1
if (pNomer == -120)
{
persons[nomerPersa].adress = openFileDialog1.FileName;
persons[nomerPersa].width = openSpace.Image.Width.ToString();
persons[nomerPersa].height = openSpace.Image.Height.ToString();
}
else
{
persons[pNomer].adress = openFileDialog1.FileName;
persons[pNomer].width = openSpace.Image.Width.ToString();
persons[pNomer].height = openSpace.Image.Height.ToString();
}
}
@ -260,7 +264,7 @@ namespace WindowsFormsApplication1
}
else if (persons[nomer].moveside == "Кругами")
{
Circle.MovePerson(filename, Person.PersonName(nomer));
Circle.MovePerson(filename, Person.PersonName(nomer), persons[nomer]);
}
else if (persons[nomer].moveside == "Диагонально")
{

View file

@ -29,6 +29,8 @@ namespace WindowsFormsApplication1
public String sprite;
public String moveside;
public String charname;
public String height;
public String width;
public static string PersonName(int nomer)
{