Posição do conjunto de unidades
// To set the position of a gameobject use the following
GameObject.transform.position = new Vector3(x, y, z);
SkelliBoi
// To set the position of a gameobject use the following
GameObject.transform.position = new Vector3(x, y, z);
public class bbo2 : MonoBehaviour
{
private const float _minimumHeldDuration = 0.25f;
private float _holdPressedTime = 0.5f;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
if (Input.GetButton("m"))
{
if (Time.timeSinceLevelLoad - _holdPressedTime > _minimumHeldDuration)
{
transform.position += new Vector3(10f, 0, 0) * Time.deltaTime;
}
}
}
}