Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Use this for initialization
- void Start () {
- Anim = GetComponent<Animator> ();
- }
- // Update is called once per frame
- void Update () {
- Anim.SetBool ("Pressed", Pressed);
- }
- void OnTriggerStay2D(Collider2D other){
- if (Input.GetKey(KeyCode.W)){
- if (Pressed){
- Pressed = false;
- } else {
- Pressed = true;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement