@startuml

skinparam classAttributeIconSize 0
skinparam guillemet false


participant "w : Wave" as w

participant "a: Animal" as a
participant "standingOn: Tile" as standingOn
[->w: hit(a)

opt w is SleepyWave
w->a ++: goToSleep(w.origin)
opt a is SleepyPanda
a->a++: moveTo(w.origin)

a-->a --
opt origin accepts panda
a->a ++: isAsleep = true;
a-->a --
a->a ++: stopLeading();
a-->a --
end
end
a-->w --
end

opt w is JumpyWave
w->a ++: jump()
opt a is JumpyPanda
a->standingOn ++: damage()
standingOn-->a --
a->a ++: stopLeading()
a -->a --
end
a-->w --
end

opt w is BeepWave
w->a ++: scare()
opt a is CowardPanda
a->a ++ : stopLeading()
a-->a --
end
a-->w --
end

[<-- w

@enduml