Created
September 4, 2019 20:15
-
-
Save kleberandrade/a8381664bf2a46b14233b2b7e2302e6f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class Detonator : MonoBehaviour | |
{ | |
public Explosion m_ExplosionScript; | |
private void Update() | |
{ | |
if (Input.GetButtonDown("Fire1")) | |
{ | |
m_ExplosionScript.Explode(); | |
CameraShake.Instance.ShakeOnce(1.0f, 30.0f); | |
Destroy(gameObject); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment