aboutsummaryrefslogtreecommitdiff
path: root/src/MTools/Anim/MPath.pm
diff options
context:
space:
mode:
Diffstat (limited to 'src/MTools/Anim/MPath.pm')
-rw-r--r--src/MTools/Anim/MPath.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/MTools/Anim/MPath.pm b/src/MTools/Anim/MPath.pm
index d24e740..910cfb5 100644
--- a/src/MTools/Anim/MPath.pm
+++ b/src/MTools/Anim/MPath.pm
@@ -177,7 +177,14 @@ sub __event {
}
for (my $i = 0; $i < @targets; $i++)
{
- $targets [$i] -> translate ($x - $self -> {__x}, $y - $self -> {__y});
+ if (ref($targets [$i]) eq '')
+ {
+ translate ($targets [$i], $x - $self -> {__x}, $y - $self -> {__y});
+ }
+ else
+ {
+ $targets [$i] -> translate ($x - $self -> {__x}, $y - $self -> {__y});
+ }
}
$self -> {__x} = $x;
$self -> {__y} = $y;