KE
Size: a a a
KE
mm
private bool canMoving = false;
private void Update()
{
if(Input.GetKeyDown(KeyCode.Z))
{
canMoving = !canMoving;
}
if(canMoving == true)
{
if(Vector3.Distance(Player.transform.position, Enemy.transform.position) <= 1)
{
canMoving = false;
return;
}
Player.transform.position = Vector2.MoveTowards(Player.transform.position, Enemy.transform.position, moveSpeed * Time.deltaTime);
}
}
Т
MW
Т
MW
MW
MW
MW
MW
Т
ДН
ДН
E
H
H
H
H
YY
A