Advertisement
Guest User

Untitled

a guest
Jan 19th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. // Use this for initialization
  2. void Start () {
  3. Anim = GetComponent<Animator> ();
  4.  
  5. }
  6.  
  7. // Update is called once per frame
  8. void Update () {
  9. Anim.SetBool ("Pressed", Pressed);
  10. }
  11. void OnTriggerStay2D(Collider2D other){
  12. if (Input.GetKey(KeyCode.W)){
  13. if (Pressed){
  14. Pressed = false;
  15. } else {
  16. Pressed = true;
  17. }
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement