Created
June 9, 2016 19:53
-
-
Save chuwilliamson/3e6d9706b4b88836c7b952bc40b8212b to your computer and use it in GitHub Desktop.
Example Input
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using UnityEngine; | |
class TranInputController : MonoBehaviour | |
{ | |
Animator anim; | |
void Update() | |
{ | |
if(Input.GetKeyDown(KeyCode.D)) | |
{ | |
anim.SetTrigger("moveforward"); | |
} | |
if (Input.GetKeyDown(KeyCode.A)) | |
{ | |
} | |
if (Input.GetKeyDown(KeyCode.W)) | |
{ | |
anim.SetTrigger("jump"); | |
} | |
if (Input.GetKeyDown(KeyCode.S)) | |
{ | |
} | |
if (Input.GetKeyDown(KeyCode.K)) | |
{ | |
} | |
if (Input.GetKeyDown(KeyCode.L)) | |
{ | |
} | |
if (Input.GetKeyDown(KeyCode.W)) | |
{ | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment