Skip to content

Instantly share code, notes, and snippets.

@chuwilliamson
Created June 9, 2016 19:53
Show Gist options
  • Save chuwilliamson/3e6d9706b4b88836c7b952bc40b8212b to your computer and use it in GitHub Desktop.
Save chuwilliamson/3e6d9706b4b88836c7b952bc40b8212b to your computer and use it in GitHub Desktop.
Example Input
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