注意,這是一條編程求助視頻?。?!急需大佬們幫忙

以下是我寫的代碼邏輯, X軸y軸就是移動(dòng)的gUI的位置,isfollowing是用來確定x軸移動(dòng)方向的,比如x軸是每幀+3或-3
if (this.x軸 >= (float)(Screen.width / 2 - 250) && this.x軸 <= (float)(Screen.width / 2 - 250 + 500) && this.y軸 >= 0f && this.y軸 <= (float)(Screen.height / 2 - 150))
{
this.x上 = true;
}
else
{
this.x上 = false;
}
if (this.x軸 >= (float)(Screen.width / 2 - 250) && this.x軸 <= (float)(Screen.width / 2 - 250 + 500) && this.y軸 >= (float)(Screen.height / 2 - 150 + 330) && this.y軸 <= (float)Screen.height)
{
this.x下 = true;
}
else
{
this.x下 = false;
}
if (this.y軸 >= (float)(Screen.height / 2 - 150) && this.y軸 <= (float)(Screen.height / 2 - 150 + 330) && this.x軸 >= 0f && this.x軸 <= (float)(Screen.width / 2 - 250))
{
this.y左 = true;
}
else
{
this.y左 = false;
}
if (this.y軸 >= (float)(Screen.height / 2 - 150) && this.y軸 <= (float)(Screen.height / 2 - 150 + 330) && this.x軸 >= (float)(Screen.width / 2 - 250 + 500) && this.x軸 <= (float)Screen.width)
{
this.y右 = true;
}
else
{
this.y右 = false;
}
if (!this.isfollowing && !this.ismoving)
{
this.x軸 += 3f;
}
if (this.isfollowing && !this.ismoving)
{
this.x軸 -= 3f;
}
if (this.x軸 > (float)(Screen.width / 2 - 250) && this.y左)
{
this.isfollowing = true;
}
if (this.x軸 < (float)(Screen.width / 2 - 250 + 500) && this.y右)
{
this.isfollowing = false;
}
if (this.x軸 > (float)Screen.width)
{
this.isfollowing = true;
}
if (this.x軸 <= 0f)
{
this.isfollowing = false;
}
if (!this.yisfollowing && !this.ismoving)
{
this.y軸 += 3f;
}
if (this.yisfollowing && !this.ismoving)
{
this.y軸 -= 3f;
}
if (this.y軸 > (float)(Screen.height / 2 - 150) && this.x上)
{
this.yisfollowing = true;
}
if (this.y軸 < (float)(Screen.height / 2 - 150 + 330) && this.x下)
{
this.yisfollowing = false;
}
if (this.y軸 >= (float)Screen.height)
{
this.yisfollowing = true;
}
if (this.y軸 <= 0f)
{
this.yisfollowing = false;
}