Created
May 5, 2017 23:22
-
-
Save unity3dcollege/30428711ba3418c3fbc5d6d3f831484c 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 System; | |
using UnityEngine; | |
public class Shootable : MonoBehaviour, ITakeShot | |
{ | |
public static event Action<Shootable, RaycastHit> OnAnyTookShot = (shootable, impactPoint) => { }; | |
public event Action<RaycastHit> OnTookShot = (impactPoint) => { }; | |
public void TakeShot(RaycastHit hit) | |
{ | |
OnTookShot(hit); | |
OnAnyTookShot(this, hit); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment