mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-14 03:32:00 +00:00
16 lines
661 B
Plaintext
16 lines
661 B
Plaintext
/atom/proc/do_jiggle(targetangle = 45, timer = 20)
|
|
var/matrix/OM = matrix(transform)
|
|
var/matrix/M = matrix(transform)
|
|
var/halftime = timer * 0.5
|
|
M.Turn(pick(-targetangle, targetangle))
|
|
animate(src, transform = M, time = halftime, easing = ELASTIC_EASING)
|
|
animate(src, transform = OM, time = halftime, easing = ELASTIC_EASING)
|
|
|
|
/atom/proc/do_squish(squishx = 1.2, squishy = 0.6, timer = 20)
|
|
var/matrix/OM = matrix(transform)
|
|
var/matrix/M = matrix(transform)
|
|
var/halftime = timer * 0.5
|
|
M.Scale(squishx, squishy)
|
|
animate(src, transform = M, time = halftime, easing = BOUNCE_EASING)
|
|
animate(src, transform = OM, time = halftime, easing = BOUNCE_EASING)
|