Compare commits
3 Commits
5044b6a29b
...
797a133252
Author | SHA1 | Date |
---|---|---|
Luna Brovchuk | 797a133252 | |
Luna Brovchuk | 3175d16cbd | |
Luna Brovchuk | 55409a144d |
|
@ -25,6 +25,7 @@ flip_h = true
|
|||
use_parent_material = true
|
||||
frames = ExtResource( 1 )
|
||||
animation = "idle"
|
||||
frame = 4
|
||||
playing = true
|
||||
centered = false
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
[ext_resource path="res://res/shaders/colorize.tres" type="Material" id=3]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 3.5, 3.5 )
|
||||
extents = Vector2( 4, 4 )
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=2]
|
||||
extents = Vector2( 7, 11 )
|
||||
|
@ -48,7 +48,7 @@ tracks/0/loop_wrap = true
|
|||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0, 2 ),
|
||||
"times": PoolRealArray( 0, 0.9 ),
|
||||
"transitions": PoolRealArray( 1, 1 ),
|
||||
"update": 1,
|
||||
"values": [ true, false ]
|
||||
|
@ -77,7 +77,7 @@ playing = true
|
|||
centered = false
|
||||
|
||||
[node name="WallCollision" type="CollisionShape2D" parent="."]
|
||||
position = Vector2( 11.5, 20.5 )
|
||||
position = Vector2( 11, 20 )
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="EnemyCollision" type="Area2D" parent="."]
|
||||
|
@ -86,6 +86,12 @@ shape = SubResource( 1 )
|
|||
position = Vector2( 12, 12 )
|
||||
shape = SubResource( 2 )
|
||||
|
||||
[node name="DirtCollision" type="Area2D" parent="."]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="DirtCollision"]
|
||||
position = Vector2( 11, 20 )
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
autoplay = "RESET"
|
||||
anims/RESET = SubResource( 4 )
|
||||
|
|
|
@ -68,8 +68,8 @@ func _shoot():
|
|||
bullet = bullet_preload.instance()
|
||||
bullet.target = target
|
||||
get_parent().add_child(bullet)
|
||||
bullet.global_position.x = self.global_position.x + 8
|
||||
bullet.global_position.y = self.global_position.y + 8
|
||||
bullet.global_position.x = self.global_position.x + 12
|
||||
bullet.global_position.y = self.global_position.y - 4
|
||||
|
||||
func _draw():
|
||||
if target != null and is_instance_valid(target):
|
||||
|
@ -96,7 +96,7 @@ func _physics_process(delta):
|
|||
if recharge_timer <= get_recharge():
|
||||
recharge_timer += delta
|
||||
|
||||
var areas = $EnemyCollision.get_overlapping_areas()
|
||||
var areas = $DirtCollision.get_overlapping_areas()
|
||||
slowed = false
|
||||
for area in areas:
|
||||
if area.get_parent().is_in_group("trash_drop"):
|
||||
|
@ -113,7 +113,7 @@ func _physics_process(delta):
|
|||
|
||||
velocity = move_and_slide(velocity * speed_multiplier)
|
||||
choose_target()
|
||||
|
||||
|
||||
if target != null and is_instance_valid(target):
|
||||
target.material = outline_material
|
||||
|
||||
|
|
Loading…
Reference in New Issue