aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLogan B <113468801+LoganLDB@users.noreply.github.com>2022-10-29 22:07:02 +0100
committerLogan B <113468801+LoganLDB@users.noreply.github.com>2022-10-29 22:07:02 +0100
commitb40da120e30d4521736c99392c08e97de2da34ae (patch)
tree1e6d367d9c6cbe5dfb36791dcf4eb89905f22ca5
parent136c6918c7d9f3ebe12c4535c438a2c67f01c110 (diff)
adjusting sprites
-rw-r--r--Bullet.tscn3
-rw-r--r--KinematicBody2D.gd2
-rw-r--r--Player.tscn4
-rw-r--r--assets/htm_tex.pngbin0 -> 422593 bytes
4 files changed, 5 insertions, 4 deletions
diff --git a/Bullet.tscn b/Bullet.tscn
index f79445f..1d8b9e4 100644
--- a/Bullet.tscn
+++ b/Bullet.tscn
@@ -1,7 +1,7 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://Bullet.gd" type="Script" id=1]
-[ext_resource path="res://icon.png" type="Texture" id=2]
+[ext_resource path="res://assets/bullet.png" type="Texture" id=2]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 31, 31 )
@@ -13,4 +13,5 @@ script = ExtResource( 1 )
shape = SubResource( 1 )
[node name="Sprite" type="Sprite" parent="."]
+scale = Vector2( 0.05, 0.05 )
texture = ExtResource( 2 )
diff --git a/KinematicBody2D.gd b/KinematicBody2D.gd
index 96484f3..4f2949c 100644
--- a/KinematicBody2D.gd
+++ b/KinematicBody2D.gd
@@ -34,5 +34,5 @@ func _physics_process(delta):
get_owner().add_child(obj)
var bodies = get_overlapping_bodies()
for body in bodies:
- if not "Bullet" in body.get_name():
+ if body.get_name() != "Bullet":
emit_signal("hit", delta)
diff --git a/Player.tscn b/Player.tscn
index 9fd285e..6c2c34a 100644
--- a/Player.tscn
+++ b/Player.tscn
@@ -1,7 +1,7 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://KinematicBody2D.gd" type="Script" id=1]
-[ext_resource path="res://icon.png" type="Texture" id=2]
+[ext_resource path="res://assets/htm_tex.png" type="Texture" id=2]
[sub_resource type="CircleShape2D" id=1]
@@ -13,5 +13,5 @@ shape = SubResource( 1 )
[node name="Sprite" type="Sprite" parent="CollisionShape2D"]
position = Vector2( -1, -4 )
-scale = Vector2( 0.515625, 0.53125 )
+scale = Vector2( 0.03, 0.03 )
texture = ExtResource( 2 )
diff --git a/assets/htm_tex.png b/assets/htm_tex.png
new file mode 100644
index 0000000..039e2e3
--- /dev/null
+++ b/assets/htm_tex.png
Binary files differ