Compare commits
3 Commits
534a834213
...
602c9a26f2
Author | SHA1 | Date |
---|---|---|
Luna Brovchuk | 602c9a26f2 | |
Luna Brovchuk | 8b62f84ca3 | |
Luna Brovchuk | 573be1862c |
|
@ -3,7 +3,6 @@
|
||||||
[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 = 1
|
frame = 3
|
||||||
playing = true
|
playing = true
|
||||||
centered = false
|
centered = false
|
||||||
|
|
||||||
|
|
|
@ -14,20 +14,21 @@ func _ready():
|
||||||
hp = 7
|
hp = 7
|
||||||
|
|
||||||
func _physics_process(delta):
|
func _physics_process(delta):
|
||||||
if not shooting:
|
if Global.playing:
|
||||||
shooting_timer += delta
|
if not shooting:
|
||||||
if shooting_timer >= 2.0:
|
shooting_timer += delta
|
||||||
shooting = true
|
if shooting_timer >= 2.0:
|
||||||
shooting_timer = .0
|
shooting = true
|
||||||
if shooting:
|
shooting_timer = .0
|
||||||
attack_timer += delta
|
if shooting:
|
||||||
if attack_timer >= .5 and not shot:
|
attack_timer += delta
|
||||||
_shoot()
|
if attack_timer >= .5 and not shot:
|
||||||
shot = true
|
_shoot()
|
||||||
if attack_timer >= 1.0:
|
shot = true
|
||||||
attack_timer = 0
|
if attack_timer >= 1.0:
|
||||||
shooting = false
|
attack_timer = 0
|
||||||
shot = false
|
shooting = 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,6 +75,7 @@ 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