| 1 | use parent 'Action2'; | ||
| 2 | |||
| 3 | ### An Action on which you/first entity hits based on Action2 subclasses | ||
| 4 | |||
| 5 | sub new { | ||
| 6 | my $class = shift; | ||
| 7 | |||
| 8 | $self = $class->SUPER::new(@_); | ||
| 9 | |||
| 10 | bless $self, $class; | ||
| 11 | }; | ||
| 12 | |||
| 13 | sub takeHit { | ||
| 14 | $self = shift; | ||
| 15 | |||
| 16 | $self->{hitaction}->takeHit(@_); | ||
| 17 | }; | ||
| 18 | |||
| 19 | 1; | ||
| 20 |