Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. using UnityEngine;
  2.  
  3. public class Detonator : MonoBehaviour
  4. {
  5. public Explosion m_ExplosionScript;
  6.  
  7. private void Update()
  8. {
  9. if (Input.GetButtonDown("Fire1"))
  10. {
  11. m_ExplosionScript.Explode();
  12. CameraShake.Instance.ShakeOnce(1.0f, 30.0f);
  13. Destroy(gameObject);
  14. }
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement