From 26828da27bc8e27f830123a25df2588e073cdb31 Mon Sep 17 00:00:00 2001 From: Logan Date: Fri, 17 Jul 2020 15:43:22 -0500 Subject: [PATCH] Limited shooting speed --- art/Pedestal.png | Bin 0 -> 331 bytes art/Pedestal.png.import | 34 ++++++++++++++++++++++++++++++++++ characters/Player.tscn | 6 +++++- levels/test.tscn | 2 -- script/player.gd | 18 +++++++++--------- 5 files changed, 48 insertions(+), 12 deletions(-) create mode 100644 art/Pedestal.png create mode 100644 art/Pedestal.png.import diff --git a/art/Pedestal.png b/art/Pedestal.png new file mode 100644 index 0000000000000000000000000000000000000000..841052a4c2e507c4fe697fb557b2664fd05b7d11 GIT binary patch literal 331 zcmV-R0kr;!P)Px$1xZ9fR5*?8kxgpCKp2MKL>Hy#LJ_ja%7KKQpl1-WlAJ=a=oRz`E`p~BT}2Q< z>={JVs3XLUi`3aDrB;%zzJY1$c!9pF`DW&MzWD+EWBi<8j1@Y7bFMH-!5Az0gI8_G zmrh%e$N|C2glh#)E>k2Wf;~UL*Hy~`0J3)h%XW|*HeDe^&!mMo3X!Jz?f{Uc9B~xN zx=aJl4-iKoJU`G1Xb(xGV7r?u3%BC=0k*rjdV-5MD-vA@CPw~3qf#rLTWu{&nN5b+ z9}flq$VaR`JYq2&-Gvv^5k4-T>J=z;$HnSxjJ(MIgiXUl-Eo0+g6t%I3oN^N_XL*R d#BrU-`WvApX6p|Fvz7n=002ovPDHLkV1mc?hz 0: Spr.flip_h = false @@ -61,17 +61,17 @@ func jump(): CoyoteTimer.stop() func fire_projectile(): - var temp = projectile_ps.instance() - get_tree().current_scene.add_child(temp) - temp.global_position = ProjectileSpawn.global_position - temp.rotation_degrees = HoldPosition.rotation_degrees - temp.launch() - + if ShootDelay.is_stopped(): + var temp = projectile_ps.instance() + get_tree().current_scene.add_child(temp) + temp.global_position = ProjectileSpawn.global_position + temp.rotation_degrees = HoldPosition.rotation_degrees + temp.launch() + ShootDelay.start() func apply_gravity(delta, modifier = 1): velocity.y += gravity * delta * modifier - func apply_movement(): if velocity.x > -1 and velocity.x < 1: velocity.x = 0