Voxelers / 3d

3D in Voxelers
Apache License 2.0
9 stars 1 forks source link

Add a new animation to be fired when the player is destroyed #46

Closed acs closed 2 years ago

acs commented 2 years ago

The goal is to have 2 animations (related to #34):

acs commented 2 years ago

The same could be done for the mobs.

acs commented 2 years ago

Cool, just with 0.5h it is working. We just need to add the create the new animation and adding it to the game logic is pretty easy:

func die():
    emit_signal("hit")
    # Reproduce the killed animation
    $AnimationPlayer.play("killed")
    yield($AnimationPlayer, "animation_finished")
    queue_free()

animation

To convert the webm screencast generated by GNOME I have used:

ffmpeg -y -i ~/Videos/Screencasts/Screencast\ from\ 14-05-22\ 12\:03\:10.webm -vf palettegen /tmp/palette.png
ffmpeg -y -i ~/Videos/Screencasts/Screencast\ from\ 14-05-22\ 12\:03\:10.webm -i /tmp/palette.png -filter_complex paletteuse -r 10 animation.gif
acs commented 2 years ago

All done in https://github.com/Voxelers/godot-3d-dodge-the-creeps/commit/59b7b4270ae10506871e96776d92cf32bd13b765