Files
Savina Rizdafayi d7120c397a Initial commit
2025-07-12 19:53:40 +07:00

17 lines
368 B
C#

using UnityEngine;
using UnityEngine.InputSystem;
public class PlayerBergerak : MonoBehaviour
{
public float speed = 1.5f;
void Update()
{
if (Keyboard.current.spaceKey.wasPressedThisFrame || Gamepad.current?.buttonSouth.isPressed == true)
{
transform.Translate(transform.forward * speed * Time.deltaTime);
}
}
}