Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(player.transform.position.x== 0)
- {
- if (Input.GetKeyDown(KeyCode.A))
- {
- player.transform.Translate(-1,0,0);
- }
- if (Input.GetKeyDown(KeyCode.D))
- {
- player.transform.Translate(+1,0,0);
- }
- }
- if (player.transform.position.x == -1)
- {
- if (Input.GetKeyDown(KeyCode.A))
- {
- }
- if (Input.GetKeyDown(KeyCode.D))
- {
- player.transform.Translate(+1, 0, 0);
- }
- }
- if (player.transform.position.x == +1)
- {
- if (Input.GetKeyDown(KeyCode.A))
- {
- player.transform.Translate(-1, 0, 0);
- }
- if (Input.GetKeyDown(KeyCode.D))
- {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement