Guest User

Untitled

a guest
Nov 12th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. [CreateAssetMenu(menuName = "Unity Atoms/Examples/Intro/Game Actions/Decrease Players Health")]
  2. public class DecreasePlayersHealth : Collider2DAction
  3. {
  4. public override void Do(Collider2D collider)
  5. {
  6. if (collider.tag == "Player")
  7. {
  8. collider.GetComponent<PlayerHealth>().Health.Value -= 10;
  9. }
  10. }
  11. }
Add Comment
Please, Sign In to add comment