Add new bullet for railgun
This commit is contained in:
parent
1374ee3bb3
commit
807103c2a6
10 changed files with 100 additions and 39 deletions
BIN
assets/spritesheets/bullet-2.png
Normal file
BIN
assets/spritesheets/bullet-2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 330 KiB |
34
assets/spritesheets/bullet-2.png.import
Normal file
34
assets/spritesheets/bullet-2.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cd4drctpn8lgs"
|
||||
path="res://.godot/imported/bullet-2.png-219c6194fd5f314d45ef489e75c7a573.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/spritesheets/bullet-2.png"
|
||||
dest_files=["res://.godot/imported/bullet-2.png-219c6194fd5f314d45ef489e75c7a573.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
29
scenes/bullets/bullet_2.tscn
Normal file
29
scenes/bullets/bullet_2.tscn
Normal file
|
@ -0,0 +1,29 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://qv7jjmyhnrbo"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/bullets/bullet_1.gd" id="1_coxga"]
|
||||
[ext_resource type="Texture2D" uid="uid://cd4drctpn8lgs" path="res://assets/spritesheets/bullet-2.png" id="2_tr7nr"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_3cgpo"]
|
||||
radius = 6.0
|
||||
|
||||
[node name="bullet" type="Area2D"]
|
||||
script = ExtResource("1_coxga")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
position = Vector2(-2, -15)
|
||||
rotation = -0.508211
|
||||
scale = Vector2(0.05, 0.05)
|
||||
texture = ExtResource("2_tr7nr")
|
||||
hframes = 2
|
||||
frame = 1
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(18, -1)
|
||||
shape = SubResource("CircleShape2D_3cgpo")
|
||||
|
||||
[node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="."]
|
||||
position = Vector2(3, -1.5)
|
||||
scale = Vector2(2.2, 1.25)
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_Bullet_body_entered"]
|
||||
[connection signal="screen_exited" from="VisibleOnScreenNotifier2D" to="." method="_on_VisibilityNotifier2D_screen_exited"]
|
|
@ -1,7 +1,6 @@
|
|||
[gd_scene load_steps=14 format=3 uid="uid://biyhuyx177dw8"]
|
||||
[gd_scene load_steps=13 format=3 uid="uid://biyhuyx177dw8"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/towers/tower.gd" id="1_8623k"]
|
||||
[ext_resource type="PackedScene" uid="uid://dqa80ptcc8p70" path="res://scenes/bullets/bullet_1.tscn" id="2_1uwpq"]
|
||||
[ext_resource type="Texture2D" uid="uid://c02ebkmjpxium" path="res://assets/spritesheets/towers/railgun-1.png" id="3_vo8au"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_60mof"]
|
||||
|
@ -73,7 +72,6 @@ radius = 138.293
|
|||
|
||||
[node name="railgun-1" type="Node2D" groups=["Towers"]]
|
||||
script = ExtResource("1_8623k")
|
||||
bullet = ExtResource("2_1uwpq")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
position = Vector2(-1, 0)
|
||||
|
|
|
@ -83,9 +83,9 @@ var tower = [
|
|||
{
|
||||
"name": "Railgun",
|
||||
"asset": preload("res://scenes/towers/railgun_1.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_1.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_2.tscn"),
|
||||
"timer": 1,
|
||||
"speed": 3,
|
||||
"speed": 10,
|
||||
"damage": 40,
|
||||
"health": 100,
|
||||
"durability_reduction": 10,
|
||||
|
@ -107,9 +107,9 @@ var tower = [
|
|||
{
|
||||
"name": "Railgun (V2)",
|
||||
"asset": preload("res://scenes/towers/railgun_2.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_1.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_2.tscn"),
|
||||
"timer": 1,
|
||||
"speed": 3,
|
||||
"speed": 10,
|
||||
"damage": 40,
|
||||
"health": 100,
|
||||
"durability_reduction": 10,
|
||||
|
@ -131,9 +131,9 @@ var tower = [
|
|||
{
|
||||
"name": "Railgun (V3)",
|
||||
"asset": preload("res://scenes/towers/railgun_3.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_1.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_2.tscn"),
|
||||
"timer": 1,
|
||||
"speed": 3,
|
||||
"speed": 10,
|
||||
"damage": 40,
|
||||
"health": 100,
|
||||
"durability_reduction": 10,
|
||||
|
|
|
@ -113,9 +113,9 @@ var tower = [
|
|||
{
|
||||
"name": "Railgun",
|
||||
"asset": preload("res://scenes/towers/railgun_1.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_1.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_2.tscn"),
|
||||
"timer": 1,
|
||||
"speed": 3,
|
||||
"speed": 10,
|
||||
"damage": 40,
|
||||
"health": 100,
|
||||
"durability_reduction": 10,
|
||||
|
@ -137,9 +137,9 @@ var tower = [
|
|||
{
|
||||
"name": "Railgun (V2)",
|
||||
"asset": preload("res://scenes/towers/railgun_2.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_1.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_2.tscn"),
|
||||
"timer": 1,
|
||||
"speed": 3,
|
||||
"speed": 10,
|
||||
"damage": 40,
|
||||
"health": 100,
|
||||
"durability_reduction": 10,
|
||||
|
@ -161,9 +161,9 @@ var tower = [
|
|||
{
|
||||
"name": "Railgun (V3)",
|
||||
"asset": preload("res://scenes/towers/railgun_3.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_1.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_2.tscn"),
|
||||
"timer": 1,
|
||||
"speed": 3,
|
||||
"speed": 10,
|
||||
"damage": 40,
|
||||
"health": 100,
|
||||
"durability_reduction": 10,
|
||||
|
|
|
@ -95,9 +95,9 @@ var tower = [
|
|||
{
|
||||
"name": "Railgun",
|
||||
"asset": preload("res://scenes/towers/railgun_1.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_1.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_2.tscn"),
|
||||
"timer": 1,
|
||||
"speed": 3,
|
||||
"speed": 10,
|
||||
"damage": 40,
|
||||
"health": 100,
|
||||
"durability_reduction": 10,
|
||||
|
@ -119,9 +119,9 @@ var tower = [
|
|||
{
|
||||
"name": "Railgun (V2)",
|
||||
"asset": preload("res://scenes/towers/railgun_2.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_1.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_2.tscn"),
|
||||
"timer": 1,
|
||||
"speed": 3,
|
||||
"speed": 10,
|
||||
"damage": 40,
|
||||
"health": 100,
|
||||
"durability_reduction": 10,
|
||||
|
@ -143,9 +143,9 @@ var tower = [
|
|||
{
|
||||
"name": "Railgun (V3)",
|
||||
"asset": preload("res://scenes/towers/railgun_3.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_1.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_2.tscn"),
|
||||
"timer": 1,
|
||||
"speed": 3,
|
||||
"speed": 10,
|
||||
"damage": 40,
|
||||
"health": 100,
|
||||
"durability_reduction": 10,
|
||||
|
|
|
@ -101,9 +101,9 @@ var tower = [
|
|||
{
|
||||
"name": "Railgun",
|
||||
"asset": preload("res://scenes/towers/railgun_1.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_1.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_2.tscn"),
|
||||
"timer": 1,
|
||||
"speed": 3,
|
||||
"speed": 10,
|
||||
"damage": 40,
|
||||
"health": 100,
|
||||
"durability_reduction": 10,
|
||||
|
@ -125,9 +125,9 @@ var tower = [
|
|||
{
|
||||
"name": "Railgun (V2)",
|
||||
"asset": preload("res://scenes/towers/railgun_2.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_1.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_2.tscn"),
|
||||
"timer": 1,
|
||||
"speed": 3,
|
||||
"speed": 10,
|
||||
"damage": 40,
|
||||
"health": 100,
|
||||
"durability_reduction": 10,
|
||||
|
@ -149,9 +149,9 @@ var tower = [
|
|||
{
|
||||
"name": "Railgun (V3)",
|
||||
"asset": preload("res://scenes/towers/railgun_3.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_1.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_2.tscn"),
|
||||
"timer": 1,
|
||||
"speed": 3,
|
||||
"speed": 10,
|
||||
"damage": 40,
|
||||
"health": 100,
|
||||
"durability_reduction": 10,
|
||||
|
|
|
@ -101,9 +101,9 @@ var tower = [
|
|||
{
|
||||
"name": "Railgun",
|
||||
"asset": preload("res://scenes/towers/railgun_1.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_1.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_2.tscn"),
|
||||
"timer": 1,
|
||||
"speed": 3,
|
||||
"speed": 10,
|
||||
"damage": 40,
|
||||
"health": 100,
|
||||
"durability_reduction": 10,
|
||||
|
@ -125,9 +125,9 @@ var tower = [
|
|||
{
|
||||
"name": "Railgun (V2)",
|
||||
"asset": preload("res://scenes/towers/railgun_2.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_1.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_2.tscn"),
|
||||
"timer": 1,
|
||||
"speed": 3,
|
||||
"speed": 10,
|
||||
"damage": 40,
|
||||
"health": 100,
|
||||
"durability_reduction": 10,
|
||||
|
@ -149,9 +149,9 @@ var tower = [
|
|||
{
|
||||
"name": "Railgun (V3)",
|
||||
"asset": preload("res://scenes/towers/railgun_3.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_1.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_2.tscn"),
|
||||
"timer": 1,
|
||||
"speed": 3,
|
||||
"speed": 10,
|
||||
"damage": 40,
|
||||
"health": 100,
|
||||
"durability_reduction": 10,
|
||||
|
|
|
@ -143,9 +143,9 @@ var tower = [
|
|||
{
|
||||
"name": "Railgun",
|
||||
"asset": preload("res://scenes/towers/railgun_1.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_1.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_2.tscn"),
|
||||
"timer": 1,
|
||||
"speed": 3,
|
||||
"speed": 10,
|
||||
"damage": 40,
|
||||
"health": 100,
|
||||
"durability_reduction": 10,
|
||||
|
@ -167,9 +167,9 @@ var tower = [
|
|||
{
|
||||
"name": "Railgun (V2)",
|
||||
"asset": preload("res://scenes/towers/railgun_2.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_1.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_2.tscn"),
|
||||
"timer": 1,
|
||||
"speed": 3,
|
||||
"speed": 10,
|
||||
"damage": 40,
|
||||
"health": 100,
|
||||
"durability_reduction": 10,
|
||||
|
@ -191,9 +191,9 @@ var tower = [
|
|||
{
|
||||
"name": "Railgun (V3)",
|
||||
"asset": preload("res://scenes/towers/railgun_3.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_1.tscn"),
|
||||
"bullet": preload("res://scenes/bullets/bullet_2.tscn"),
|
||||
"timer": 1,
|
||||
"speed": 3,
|
||||
"speed": 10,
|
||||
"damage": 40,
|
||||
"health": 100,
|
||||
"durability_reduction": 10,
|
||||
|
|
Loading…
Reference in a new issue