Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- public class Player : MonoBehaviour
- {
- // Start is called before the first frame update
- void Start()
- {
- }
- void Update()
- {
- // Input w and print message..
- if (Input.GetKeyDown(KeyCode.W))
- {
- print("W is Pressed In print");
- Debug.Log("W is Pressed in Debug.Log");
- }
- // input Space and print
- if (Input.GetKeyDown(KeyCode.Space))
- {
- Debug.Log("Space Pressed");
- }
- // input BackSpace and print
- if (Input.GetKeyDown(KeyCode.Backspace))
- {
- Debug.Log("BackSpace Pressed");
- }
- ///////////////////////////////////////////////////////////
- if (Input.GetKey(KeyCode.LeftControl))
- {
- print("left Control -> getkey");
- }
- if (Input.GetKeyUp(KeyCode.Q))
- {
- print("pressed q -> getKeyUp");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement