Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [CreateAssetMenu(menuName = "Unity Atoms/Examples/Intro/Game Actions/Decrease Players Health")]
- public class DecreasePlayersHealth : Collider2DAction
- {
- public override void Do(Collider2D collider)
- {
- if (collider.tag == "Player")
- {
- collider.GetComponent<PlayerHealth>().Health.Value -= 10;
- }
- }
- }
Add Comment
Please, Sign In to add comment