Compare commits
No commits in common. "602c9a26f2db345f3495d9bddfeab0607c353d41" and "534a8342131667f1eb10fc13283c6ab3ae711ed6" have entirely different histories.
602c9a26f2
...
534a834213
|
@ -3,6 +3,7 @@
|
||||||
[ext_resource path="res://res/fonts/silkscreen/Silkscreen-Regular.ttf" type="DynamicFontData" id=1]
|
[ext_resource path="res://res/fonts/silkscreen/Silkscreen-Regular.ttf" type="DynamicFontData" id=1]
|
||||||
|
|
||||||
[sub_resource type="DynamicFont" id=1]
|
[sub_resource type="DynamicFont" id=1]
|
||||||
|
size = 8
|
||||||
font_data = ExtResource( 1 )
|
font_data = ExtResource( 1 )
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
|
|
|
@ -22,7 +22,7 @@ script = ExtResource( 2 )
|
||||||
use_parent_material = true
|
use_parent_material = true
|
||||||
frames = ExtResource( 1 )
|
frames = ExtResource( 1 )
|
||||||
animation = "idle"
|
animation = "idle"
|
||||||
frame = 3
|
frame = 1
|
||||||
playing = true
|
playing = true
|
||||||
centered = false
|
centered = false
|
||||||
|
|
||||||
|
|
|
@ -14,21 +14,20 @@ func _ready():
|
||||||
hp = 7
|
hp = 7
|
||||||
|
|
||||||
func _physics_process(delta):
|
func _physics_process(delta):
|
||||||
if Global.playing:
|
if not shooting:
|
||||||
if not shooting:
|
shooting_timer += delta
|
||||||
shooting_timer += delta
|
if shooting_timer >= 2.0:
|
||||||
if shooting_timer >= 2.0:
|
shooting = true
|
||||||
shooting = true
|
shooting_timer = .0
|
||||||
shooting_timer = .0
|
if shooting:
|
||||||
if shooting:
|
attack_timer += delta
|
||||||
attack_timer += delta
|
if attack_timer >= .5 and not shot:
|
||||||
if attack_timer >= .5 and not shot:
|
_shoot()
|
||||||
_shoot()
|
shot = true
|
||||||
shot = true
|
if attack_timer >= 1.0:
|
||||||
if attack_timer >= 1.0:
|
attack_timer = 0
|
||||||
attack_timer = 0
|
shooting = false
|
||||||
shooting = false
|
shot = false
|
||||||
shot = false
|
|
||||||
|
|
||||||
var player_position = player.global_position + Vector2(12, 12)
|
var player_position = player.global_position + Vector2(12, 12)
|
||||||
var angle = get_angle_to(player_position)
|
var angle = get_angle_to(player_position)
|
||||||
|
|
|
@ -75,7 +75,6 @@ func area_entered(area):
|
||||||
stunned_timer = .0
|
stunned_timer = .0
|
||||||
recharge_timer = .0
|
recharge_timer = .0
|
||||||
$Sprite.play("stun")
|
$Sprite.play("stun")
|
||||||
parent.call_deferred("free")
|
|
||||||
|
|
||||||
func get_recharge():
|
func get_recharge():
|
||||||
var recharge = 2.0
|
var recharge = 2.0
|
||||||
|
|
Loading…
Reference in New Issue