Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class ButtonDown : MonoBehaviour {
- public GameObject button;
- public float speed = 0.0f;
- public int movement = 0;
- public PlaySound2 z;
- void OnMouseDown()
- {
- button.transform.position -= button.transform.up * speed * movement;
- z.a16 = true;
- Debug.Log("Down");
- }
- void OnMouseUp()
- {
- button.transform.position += button.transform.up * speed * movement;
- Debug.Log("Up");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement