如何设置元素重叠序列(z-index)WinForm?
主页
/
user-349244
Віталій Яцук's questions
由于某种原因,平滑按钮移动代码不起作用。代码本身
private static void AnimationTransform (Button cont, Point firstPoint, Point endPoint, int frame, float seconds)
{
cont.Location = firstPoint;
seconds = seconds * 1000;
float delay = seconds / frame;
Point distance = new Point(endPoint.X - firstPoint.X, endPoint.Y - firstPoint.Y);
(float, float) frameDistance = (distance.X / frame, distance.Y / frame);
(float, float) currPoint = (firstPoint.X, firstPoint.Y);
for (int i = 0; i < frame; i ++)
{
Thread.Sleep((int)delay);
currPoint = (currPoint.Item1 + frameDistance.Item1, currPoint.Item2 + frameDistance.Item2);
cont.Location = new Point((int)currPoint.Item1, (int)currPoint.Item1);
}
cont.Location = endPoint;
}
private void button10_Click(object sender, EventArgs e)
{
AnimationTransform(button11, button10.Location, button11.Location, 50, 6);
}
问题是什么?
我需要更改 Unity 的 KeyCode,但 Studio 发誓该文件是只读的。有什么方法可以编辑文件吗?
整个问题都在标题中。如何在不使用 Unity3d 中的 Update & Start 的情况下在开始或每一帧调用函数(如果重要的话)。
但是,整个问题都在标题中。哪个更快:
if (gameObject.tag == "Player")
或者
if (gameObject == playerObject) //playerObject переменная типа GameObject