Added some projectile sprites
This commit is contained in:
@@ -13,6 +13,9 @@ const ENEMY_PROJECTILE_LAYER = 16
|
|||||||
@export_range(0, 10) var piercing: int = 0
|
@export_range(0, 10) var piercing: int = 0
|
||||||
|
|
||||||
|
|
||||||
|
@onready var collision : CollisionShape2D = $CollisionShape2D
|
||||||
|
|
||||||
|
|
||||||
var direction : Vector2
|
var direction : Vector2
|
||||||
var ship_velocity: Vector2
|
var ship_velocity: Vector2
|
||||||
|
|
||||||
@@ -32,6 +35,8 @@ var _velocity: Vector2
|
|||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
_velocity = direction.normalized() * speed + ship_velocity
|
_velocity = direction.normalized() * speed + ship_velocity
|
||||||
|
_update_collision_rotation(_velocity)
|
||||||
|
|
||||||
_apply_collision_mask()
|
_apply_collision_mask()
|
||||||
|
|
||||||
|
|
||||||
@@ -55,6 +60,10 @@ func _apply_collision_mask() -> void:
|
|||||||
collision_mask &= ~ENEMY_LAYER
|
collision_mask &= ~ENEMY_LAYER
|
||||||
|
|
||||||
|
|
||||||
|
func _update_collision_rotation(velocity: Vector2) -> void:
|
||||||
|
collision.rotation = velocity.angle() - 0.5 * PI
|
||||||
|
|
||||||
|
|
||||||
func _on_screen_exited() -> void:
|
func _on_screen_exited() -> void:
|
||||||
queue_free()
|
queue_free()
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,6 @@
|
|||||||
[node name="AbstrastProjectile" type="Area2D"]
|
[node name="AbstrastProjectile" type="Area2D"]
|
||||||
script = ExtResource("1_4b2nh")
|
script = ExtResource("1_4b2nh")
|
||||||
|
|
||||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
shape = SubResource("CircleShape2D_4b2nh")
|
shape = SubResource("CircleShape2D_4b2nh")
|
||||||
|
|
||||||
|
|||||||
@@ -48,11 +48,9 @@ func _create_projectile(ship_velocity: Vector2) -> Node:
|
|||||||
Belonging.PLAYER:
|
Belonging.PLAYER:
|
||||||
projectile.direction = Vector2.RIGHT
|
projectile.direction = Vector2.RIGHT
|
||||||
projectile.collide_enemies = true
|
projectile.collide_enemies = true
|
||||||
projectile.rotation_degrees = 90
|
|
||||||
Belonging.ENEMY:
|
Belonging.ENEMY:
|
||||||
projectile.direction = Vector2.LEFT
|
projectile.direction = Vector2.LEFT
|
||||||
projectile.collide_player = true
|
projectile.collide_player = true
|
||||||
projectile.rotation_degrees = -90
|
|
||||||
|
|
||||||
if sector_angle > 0:
|
if sector_angle > 0:
|
||||||
var sector_rad := deg_to_rad(sector_angle)
|
var sector_rad := deg_to_rad(sector_angle)
|
||||||
|
|||||||
@@ -1,16 +1,18 @@
|
|||||||
[gd_scene load_steps=7 format=3 uid="uid://cgi7wd84kjnyw"]
|
[gd_scene load_steps=8 format=3 uid="uid://cgi7wd84kjnyw"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://ybkqaynvpcjm" path="res://game/entities/weapons/abstract_projectile.tscn" id="1_20qwt"]
|
[ext_resource type="PackedScene" uid="uid://ybkqaynvpcjm" path="res://game/entities/weapons/abstract_projectile.tscn" id="1_20qwt"]
|
||||||
[ext_resource type="Script" uid="uid://dfdh0o88as054" path="res://game/entities/weapons/cannon/cannon_projectile.gd" id="2_x3axw"]
|
[ext_resource type="Script" uid="uid://dfdh0o88as054" path="res://game/entities/weapons/cannon/cannon_projectile.gd" id="2_x3axw"]
|
||||||
[ext_resource type="Script" uid="uid://dftb7hg5f06b5" path="res://game/health_system/damage/explosion_damage.gd" id="3_lb11p"]
|
[ext_resource type="Script" uid="uid://dftb7hg5f06b5" path="res://game/health_system/damage/explosion_damage.gd" id="3_lb11p"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://oj86smpsipw4" path="res://images/projectiles.png" id="4_bb01p"]
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_bb01p"]
|
[sub_resource type="Resource" id="Resource_bb01p"]
|
||||||
script = ExtResource("3_lb11p")
|
script = ExtResource("3_lb11p")
|
||||||
value = 50
|
value = 50
|
||||||
metadata/_custom_type_script = "uid://dftb7hg5f06b5"
|
metadata/_custom_type_script = "uid://dftb7hg5f06b5"
|
||||||
|
|
||||||
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_x3axw"]
|
[sub_resource type="AtlasTexture" id="AtlasTexture_ugryq"]
|
||||||
size = Vector2(6, 6)
|
atlas = ExtResource("4_bb01p")
|
||||||
|
region = Rect2(32, 16, 16, 16)
|
||||||
|
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_lb11p"]
|
[sub_resource type="CircleShape2D" id="CircleShape2D_lb11p"]
|
||||||
radius = 2.0
|
radius = 2.0
|
||||||
@@ -20,8 +22,8 @@ script = ExtResource("2_x3axw")
|
|||||||
damage = SubResource("Resource_bb01p")
|
damage = SubResource("Resource_bb01p")
|
||||||
speed = 600
|
speed = 600
|
||||||
|
|
||||||
[node name="Sprite2D" parent="." index="0"]
|
[node name="Sprite2D" type="Sprite2D" parent="." index="0"]
|
||||||
texture = SubResource("PlaceholderTexture2D_x3axw")
|
texture = SubResource("AtlasTexture_ugryq")
|
||||||
|
|
||||||
[node name="CollisionShape2D" parent="." index="1"]
|
[node name="CollisionShape2D" parent="." index="1"]
|
||||||
shape = SubResource("CircleShape2D_lb11p")
|
shape = SubResource("CircleShape2D_lb11p")
|
||||||
|
|||||||
@@ -1,16 +1,18 @@
|
|||||||
[gd_scene load_steps=7 format=3 uid="uid://yfvluap3uy1r"]
|
[gd_scene load_steps=8 format=3 uid="uid://yfvluap3uy1r"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://ybkqaynvpcjm" path="res://game/entities/weapons/abstract_projectile.tscn" id="1_3tgt7"]
|
[ext_resource type="PackedScene" uid="uid://ybkqaynvpcjm" path="res://game/entities/weapons/abstract_projectile.tscn" id="1_3tgt7"]
|
||||||
[ext_resource type="Script" uid="uid://rtsf1n0djorp" path="res://game/entities/weapons/gatling/gatling_projectile.gd" id="2_hbgoq"]
|
[ext_resource type="Script" uid="uid://rtsf1n0djorp" path="res://game/entities/weapons/gatling/gatling_projectile.gd" id="2_hbgoq"]
|
||||||
[ext_resource type="Script" uid="uid://bhqvk5cnjg5mv" path="res://game/health_system/damage/kinetic_damage.gd" id="3_2tbeq"]
|
[ext_resource type="Script" uid="uid://bhqvk5cnjg5mv" path="res://game/health_system/damage/kinetic_damage.gd" id="3_2tbeq"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://oj86smpsipw4" path="res://images/projectiles.png" id="4_ndegg"]
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_ndegg"]
|
[sub_resource type="Resource" id="Resource_ndegg"]
|
||||||
script = ExtResource("3_2tbeq")
|
script = ExtResource("3_2tbeq")
|
||||||
value = 6
|
value = 6
|
||||||
metadata/_custom_type_script = "uid://bhqvk5cnjg5mv"
|
metadata/_custom_type_script = "uid://bhqvk5cnjg5mv"
|
||||||
|
|
||||||
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_hbgoq"]
|
[sub_resource type="AtlasTexture" id="AtlasTexture_11x32"]
|
||||||
size = Vector2(4, 4)
|
atlas = ExtResource("4_ndegg")
|
||||||
|
region = Rect2(0, 0, 16, 16)
|
||||||
|
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_2tbeq"]
|
[sub_resource type="CircleShape2D" id="CircleShape2D_2tbeq"]
|
||||||
radius = 1.0
|
radius = 1.0
|
||||||
@@ -21,8 +23,8 @@ damage = SubResource("Resource_ndegg")
|
|||||||
speed = 600
|
speed = 600
|
||||||
piercing = 1
|
piercing = 1
|
||||||
|
|
||||||
[node name="Sprite2D" parent="." index="0"]
|
[node name="Sprite2D" type="Sprite2D" parent="." index="0"]
|
||||||
texture = SubResource("PlaceholderTexture2D_hbgoq")
|
texture = SubResource("AtlasTexture_11x32")
|
||||||
|
|
||||||
[node name="CollisionShape2D" parent="." index="1"]
|
[node name="CollisionShape2D" parent="." index="1"]
|
||||||
shape = SubResource("CircleShape2D_2tbeq")
|
shape = SubResource("CircleShape2D_2tbeq")
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ script = ExtResource("2_je1a2")
|
|||||||
damage = SubResource("Resource_bytws")
|
damage = SubResource("Resource_bytws")
|
||||||
speed = 500
|
speed = 500
|
||||||
|
|
||||||
[node name="Sprite2D" parent="." index="0"]
|
[node name="Sprite2D" type="Sprite2D" parent="." index="0"]
|
||||||
texture = SubResource("PlaceholderTexture2D_je1a2")
|
texture = SubResource("PlaceholderTexture2D_je1a2")
|
||||||
|
|
||||||
[node name="CollisionShape2D" parent="." index="1"]
|
[node name="CollisionShape2D" parent="." index="1"]
|
||||||
|
|||||||
@@ -1 +1,25 @@
|
|||||||
extends AbstractProjectile
|
extends AbstractProjectile
|
||||||
|
|
||||||
|
|
||||||
|
@onready var sprites : Array[Sprite2D] = [
|
||||||
|
$Sprite2D_E, $Sprite2D_SE, $Sprite2D_S, $Sprite2D_SW,
|
||||||
|
$Sprite2D_W, $Sprite2D_NW, $Sprite2D_N, $Sprite2D_NE,
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
super._ready()
|
||||||
|
_update_sprite(_velocity)
|
||||||
|
|
||||||
|
|
||||||
|
func _update_sprite(velocity: Vector2) -> void:
|
||||||
|
var sector := 360.0 / sprites.size()
|
||||||
|
var angle := rad_to_deg(velocity.angle())
|
||||||
|
var bisector := floori(angle + sector * 0.5)
|
||||||
|
|
||||||
|
var index := floori(posmod(bisector, 360) / sector)
|
||||||
|
|
||||||
|
for sprite in sprites:
|
||||||
|
sprite.hide()
|
||||||
|
|
||||||
|
sprites[index].show()
|
||||||
|
|||||||
@@ -1,16 +1,46 @@
|
|||||||
[gd_scene load_steps=7 format=3 uid="uid://dukgbg13ujkv2"]
|
[gd_scene load_steps=15 format=3 uid="uid://dukgbg13ujkv2"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://ybkqaynvpcjm" path="res://game/entities/weapons/abstract_projectile.tscn" id="1_0mcat"]
|
[ext_resource type="PackedScene" uid="uid://ybkqaynvpcjm" path="res://game/entities/weapons/abstract_projectile.tscn" id="1_0mcat"]
|
||||||
[ext_resource type="Script" uid="uid://dkvur5bdwg3sr" path="res://game/entities/weapons/launcher/launcher_projectile.gd" id="2_6hdsf"]
|
[ext_resource type="Script" uid="uid://dkvur5bdwg3sr" path="res://game/entities/weapons/launcher/launcher_projectile.gd" id="2_6hdsf"]
|
||||||
[ext_resource type="Script" uid="uid://dftb7hg5f06b5" path="res://game/health_system/damage/explosion_damage.gd" id="3_ycnsk"]
|
[ext_resource type="Script" uid="uid://dftb7hg5f06b5" path="res://game/health_system/damage/explosion_damage.gd" id="3_ycnsk"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://oj86smpsipw4" path="res://images/projectiles.png" id="4_kxgpk"]
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_kxgpk"]
|
[sub_resource type="Resource" id="Resource_kxgpk"]
|
||||||
script = ExtResource("3_ycnsk")
|
script = ExtResource("3_ycnsk")
|
||||||
value = 24
|
value = 24
|
||||||
metadata/_custom_type_script = "uid://dftb7hg5f06b5"
|
metadata/_custom_type_script = "uid://dftb7hg5f06b5"
|
||||||
|
|
||||||
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_0mcat"]
|
[sub_resource type="AtlasTexture" id="AtlasTexture_kxgpk"]
|
||||||
size = Vector2(4, 8)
|
atlas = ExtResource("4_kxgpk")
|
||||||
|
region = Rect2(0, 32, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_kos01"]
|
||||||
|
atlas = ExtResource("4_kxgpk")
|
||||||
|
region = Rect2(16, 32, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_iqm85"]
|
||||||
|
atlas = ExtResource("4_kxgpk")
|
||||||
|
region = Rect2(32, 32, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_rno65"]
|
||||||
|
atlas = ExtResource("4_kxgpk")
|
||||||
|
region = Rect2(48, 32, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_f648y"]
|
||||||
|
atlas = ExtResource("4_kxgpk")
|
||||||
|
region = Rect2(0, 48, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_she3g"]
|
||||||
|
atlas = ExtResource("4_kxgpk")
|
||||||
|
region = Rect2(16, 48, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_4wwm4"]
|
||||||
|
atlas = ExtResource("4_kxgpk")
|
||||||
|
region = Rect2(32, 48, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_dl8vu"]
|
||||||
|
atlas = ExtResource("4_kxgpk")
|
||||||
|
region = Rect2(48, 48, 16, 16)
|
||||||
|
|
||||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_6hdsf"]
|
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_6hdsf"]
|
||||||
radius = 1.0
|
radius = 1.0
|
||||||
@@ -21,8 +51,29 @@ script = ExtResource("2_6hdsf")
|
|||||||
damage = SubResource("Resource_kxgpk")
|
damage = SubResource("Resource_kxgpk")
|
||||||
speed = 300
|
speed = 300
|
||||||
|
|
||||||
[node name="Sprite2D" parent="." index="0"]
|
[node name="Sprite2D_E" type="Sprite2D" parent="." index="0"]
|
||||||
texture = SubResource("PlaceholderTexture2D_0mcat")
|
texture = SubResource("AtlasTexture_kxgpk")
|
||||||
|
|
||||||
[node name="CollisionShape2D" parent="." index="1"]
|
[node name="Sprite2D_SE" type="Sprite2D" parent="." index="1"]
|
||||||
|
texture = SubResource("AtlasTexture_kos01")
|
||||||
|
|
||||||
|
[node name="Sprite2D_S" type="Sprite2D" parent="." index="2"]
|
||||||
|
texture = SubResource("AtlasTexture_iqm85")
|
||||||
|
|
||||||
|
[node name="Sprite2D_SW" type="Sprite2D" parent="." index="3"]
|
||||||
|
texture = SubResource("AtlasTexture_rno65")
|
||||||
|
|
||||||
|
[node name="Sprite2D_W" type="Sprite2D" parent="." index="4"]
|
||||||
|
texture = SubResource("AtlasTexture_f648y")
|
||||||
|
|
||||||
|
[node name="Sprite2D_NW" type="Sprite2D" parent="." index="5"]
|
||||||
|
texture = SubResource("AtlasTexture_she3g")
|
||||||
|
|
||||||
|
[node name="Sprite2D_N" type="Sprite2D" parent="." index="6"]
|
||||||
|
texture = SubResource("AtlasTexture_4wwm4")
|
||||||
|
|
||||||
|
[node name="Sprite2D_NE" type="Sprite2D" parent="." index="7"]
|
||||||
|
texture = SubResource("AtlasTexture_dl8vu")
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" parent="." index="8"]
|
||||||
shape = SubResource("CapsuleShape2D_6hdsf")
|
shape = SubResource("CapsuleShape2D_6hdsf")
|
||||||
|
|||||||
@@ -1,16 +1,18 @@
|
|||||||
[gd_scene load_steps=7 format=3 uid="uid://4mkklqt1g14f"]
|
[gd_scene load_steps=8 format=3 uid="uid://4mkklqt1g14f"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://ybkqaynvpcjm" path="res://game/entities/weapons/abstract_projectile.tscn" id="1_ufc4r"]
|
[ext_resource type="PackedScene" uid="uid://ybkqaynvpcjm" path="res://game/entities/weapons/abstract_projectile.tscn" id="1_ufc4r"]
|
||||||
[ext_resource type="Script" uid="uid://76swcukelnii" path="res://game/entities/weapons/minelayer/minelayer_projectile.gd" id="2_hwwfa"]
|
[ext_resource type="Script" uid="uid://76swcukelnii" path="res://game/entities/weapons/minelayer/minelayer_projectile.gd" id="2_hwwfa"]
|
||||||
[ext_resource type="Script" uid="uid://dftb7hg5f06b5" path="res://game/health_system/damage/explosion_damage.gd" id="3_hll7s"]
|
[ext_resource type="Script" uid="uid://dftb7hg5f06b5" path="res://game/health_system/damage/explosion_damage.gd" id="3_hll7s"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://oj86smpsipw4" path="res://images/projectiles.png" id="4_px1i2"]
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_px1i2"]
|
[sub_resource type="Resource" id="Resource_px1i2"]
|
||||||
script = ExtResource("3_hll7s")
|
script = ExtResource("3_hll7s")
|
||||||
value = 100
|
value = 100
|
||||||
metadata/_custom_type_script = "uid://dftb7hg5f06b5"
|
metadata/_custom_type_script = "uid://dftb7hg5f06b5"
|
||||||
|
|
||||||
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_ufc4r"]
|
[sub_resource type="AtlasTexture" id="AtlasTexture_ckqco"]
|
||||||
size = Vector2(16, 16)
|
atlas = ExtResource("4_px1i2")
|
||||||
|
region = Rect2(0, 16, 16, 16)
|
||||||
|
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_ufc4r"]
|
[sub_resource type="CircleShape2D" id="CircleShape2D_ufc4r"]
|
||||||
radius = 7.0
|
radius = 7.0
|
||||||
@@ -22,8 +24,8 @@ livetime = 60
|
|||||||
damage = SubResource("Resource_px1i2")
|
damage = SubResource("Resource_px1i2")
|
||||||
speed = 200
|
speed = 200
|
||||||
|
|
||||||
[node name="Sprite2D" parent="." index="0"]
|
[node name="Sprite2D" type="Sprite2D" parent="." index="0"]
|
||||||
texture = SubResource("PlaceholderTexture2D_ufc4r")
|
texture = SubResource("AtlasTexture_ckqco")
|
||||||
|
|
||||||
[node name="CollisionShape2D" parent="." index="1"]
|
[node name="CollisionShape2D" parent="." index="1"]
|
||||||
shape = SubResource("CircleShape2D_ufc4r")
|
shape = SubResource("CircleShape2D_ufc4r")
|
||||||
|
|||||||
@@ -9,19 +9,20 @@ script = ExtResource("3_dlvdm")
|
|||||||
value = 20
|
value = 20
|
||||||
metadata/_custom_type_script = "uid://c27v705giygv4"
|
metadata/_custom_type_script = "uid://c27v705giygv4"
|
||||||
|
|
||||||
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_x58hw"]
|
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_dlvdm"]
|
||||||
size = Vector2(6, 6)
|
size = Vector2(4, 6)
|
||||||
|
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_x58hw"]
|
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_5enq5"]
|
||||||
radius = 2.0
|
radius = 1.0
|
||||||
|
height = 4.0
|
||||||
|
|
||||||
[node name="PlasmaProjectile" instance=ExtResource("1_x58hw")]
|
[node name="PlasmaProjectile" instance=ExtResource("1_x58hw")]
|
||||||
script = ExtResource("2_0deih")
|
script = ExtResource("2_0deih")
|
||||||
damage = SubResource("Resource_5enq5")
|
damage = SubResource("Resource_5enq5")
|
||||||
speed = 450
|
speed = 450
|
||||||
|
|
||||||
[node name="Sprite2D" parent="." index="0"]
|
[node name="Sprite2D" type="Sprite2D" parent="." index="0"]
|
||||||
texture = SubResource("PlaceholderTexture2D_x58hw")
|
texture = SubResource("PlaceholderTexture2D_dlvdm")
|
||||||
|
|
||||||
[node name="CollisionShape2D" parent="." index="1"]
|
[node name="CollisionShape2D" parent="." index="1"]
|
||||||
shape = SubResource("CircleShape2D_x58hw")
|
shape = SubResource("CapsuleShape2D_5enq5")
|
||||||
|
|||||||
@@ -1 +1,21 @@
|
|||||||
extends AbstractProjectile
|
extends AbstractProjectile
|
||||||
|
|
||||||
|
|
||||||
|
@onready var sprite_left := $Sprite2D_Left
|
||||||
|
@onready var sprite_right := $Sprite2D_Right
|
||||||
|
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
super._ready()
|
||||||
|
_update_sprite(_velocity)
|
||||||
|
|
||||||
|
|
||||||
|
func _update_sprite(velocity: Vector2) -> void:
|
||||||
|
var angle := posmod(floor(rad_to_deg(velocity.angle())), 360)
|
||||||
|
|
||||||
|
if angle > 90 and angle < 270:
|
||||||
|
sprite_left.show()
|
||||||
|
sprite_right.hide()
|
||||||
|
else:
|
||||||
|
sprite_left.hide()
|
||||||
|
sprite_right.show()
|
||||||
|
|||||||
@@ -1,19 +1,26 @@
|
|||||||
[gd_scene load_steps=7 format=3 uid="uid://bab3bopsw74cb"]
|
[gd_scene load_steps=9 format=3 uid="uid://bab3bopsw74cb"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://n3h1e3pj02g0" path="res://game/entities/weapons/railgun/railgun_projectile.gd" id="1_hycpq"]
|
[ext_resource type="Script" uid="uid://n3h1e3pj02g0" path="res://game/entities/weapons/railgun/railgun_projectile.gd" id="1_hycpq"]
|
||||||
[ext_resource type="PackedScene" uid="uid://ybkqaynvpcjm" path="res://game/entities/weapons/abstract_projectile.tscn" id="1_rfd1j"]
|
[ext_resource type="PackedScene" uid="uid://ybkqaynvpcjm" path="res://game/entities/weapons/abstract_projectile.tscn" id="1_rfd1j"]
|
||||||
[ext_resource type="Script" uid="uid://bhqvk5cnjg5mv" path="res://game/health_system/damage/kinetic_damage.gd" id="3_wbdf3"]
|
[ext_resource type="Script" uid="uid://bhqvk5cnjg5mv" path="res://game/health_system/damage/kinetic_damage.gd" id="3_wbdf3"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://oj86smpsipw4" path="res://images/projectiles.png" id="4_u82jm"]
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_u82jm"]
|
[sub_resource type="Resource" id="Resource_u82jm"]
|
||||||
script = ExtResource("3_wbdf3")
|
script = ExtResource("3_wbdf3")
|
||||||
value = 45
|
value = 45
|
||||||
metadata/_custom_type_script = "uid://bhqvk5cnjg5mv"
|
metadata/_custom_type_script = "uid://bhqvk5cnjg5mv"
|
||||||
|
|
||||||
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_an7sy"]
|
[sub_resource type="AtlasTexture" id="AtlasTexture_u82jm"]
|
||||||
size = Vector2(6, 6)
|
atlas = ExtResource("4_u82jm")
|
||||||
|
region = Rect2(32, 0, 16, 16)
|
||||||
|
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_rfd1j"]
|
[sub_resource type="AtlasTexture" id="AtlasTexture_whmfh"]
|
||||||
radius = 2.0
|
atlas = ExtResource("4_u82jm")
|
||||||
|
region = Rect2(16, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_u82jm"]
|
||||||
|
radius = 1.0
|
||||||
|
height = 4.0
|
||||||
|
|
||||||
[node name="RailgunProjectile" instance=ExtResource("1_rfd1j")]
|
[node name="RailgunProjectile" instance=ExtResource("1_rfd1j")]
|
||||||
script = ExtResource("1_hycpq")
|
script = ExtResource("1_hycpq")
|
||||||
@@ -21,8 +28,11 @@ damage = SubResource("Resource_u82jm")
|
|||||||
speed = 900
|
speed = 900
|
||||||
piercing = 1
|
piercing = 1
|
||||||
|
|
||||||
[node name="Sprite2D" parent="." index="0"]
|
[node name="Sprite2D_Left" type="Sprite2D" parent="." index="0"]
|
||||||
texture = SubResource("PlaceholderTexture2D_an7sy")
|
texture = SubResource("AtlasTexture_u82jm")
|
||||||
|
|
||||||
[node name="CollisionShape2D" parent="." index="1"]
|
[node name="Sprite2D_Right" type="Sprite2D" parent="." index="1"]
|
||||||
shape = SubResource("CircleShape2D_rfd1j")
|
texture = SubResource("AtlasTexture_whmfh")
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" parent="." index="2"]
|
||||||
|
shape = SubResource("CapsuleShape2D_u82jm")
|
||||||
|
|||||||
@@ -1,16 +1,18 @@
|
|||||||
[gd_scene load_steps=7 format=3 uid="uid://bsx23u3a2obbj"]
|
[gd_scene load_steps=8 format=3 uid="uid://bsx23u3a2obbj"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://ybkqaynvpcjm" path="res://game/entities/weapons/abstract_projectile.tscn" id="1_yu2c6"]
|
[ext_resource type="PackedScene" uid="uid://ybkqaynvpcjm" path="res://game/entities/weapons/abstract_projectile.tscn" id="1_yu2c6"]
|
||||||
[ext_resource type="Script" uid="uid://ctnje7pjanaws" path="res://game/entities/weapons/shrapnel/shrapnel_projectile.gd" id="2_2jiy6"]
|
[ext_resource type="Script" uid="uid://ctnje7pjanaws" path="res://game/entities/weapons/shrapnel/shrapnel_projectile.gd" id="2_2jiy6"]
|
||||||
[ext_resource type="Script" uid="uid://bhqvk5cnjg5mv" path="res://game/health_system/damage/kinetic_damage.gd" id="3_kj16s"]
|
[ext_resource type="Script" uid="uid://bhqvk5cnjg5mv" path="res://game/health_system/damage/kinetic_damage.gd" id="3_kj16s"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://oj86smpsipw4" path="res://images/projectiles.png" id="4_klguu"]
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_klguu"]
|
[sub_resource type="Resource" id="Resource_klguu"]
|
||||||
script = ExtResource("3_kj16s")
|
script = ExtResource("3_kj16s")
|
||||||
value = 2
|
value = 2
|
||||||
metadata/_custom_type_script = "uid://bhqvk5cnjg5mv"
|
metadata/_custom_type_script = "uid://bhqvk5cnjg5mv"
|
||||||
|
|
||||||
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_2jiy6"]
|
[sub_resource type="AtlasTexture" id="AtlasTexture_s852w"]
|
||||||
size = Vector2(4, 4)
|
atlas = ExtResource("4_klguu")
|
||||||
|
region = Rect2(48, 0, 16, 16)
|
||||||
|
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_2jiy6"]
|
[sub_resource type="CircleShape2D" id="CircleShape2D_2jiy6"]
|
||||||
radius = 1.0
|
radius = 1.0
|
||||||
@@ -21,8 +23,8 @@ max_distance = 350
|
|||||||
damage = SubResource("Resource_klguu")
|
damage = SubResource("Resource_klguu")
|
||||||
speed = 500
|
speed = 500
|
||||||
|
|
||||||
[node name="Sprite2D" parent="." index="0"]
|
[node name="Sprite2D" type="Sprite2D" parent="." index="0"]
|
||||||
texture = SubResource("PlaceholderTexture2D_2jiy6")
|
texture = SubResource("AtlasTexture_s852w")
|
||||||
|
|
||||||
[node name="CollisionShape2D" parent="." index="1"]
|
[node name="CollisionShape2D" parent="." index="1"]
|
||||||
shape = SubResource("CircleShape2D_2jiy6")
|
shape = SubResource("CircleShape2D_2jiy6")
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ metadata/_custom_type_script = "uid://c27v705giygv4"
|
|||||||
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_1oexk"]
|
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_1oexk"]
|
||||||
size = Vector2(12, 12)
|
size = Vector2(12, 12)
|
||||||
|
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_q73is"]
|
[sub_resource type="CircleShape2D" id="CircleShape2D_l65ib"]
|
||||||
radius = 5.0
|
radius = 5.0
|
||||||
|
|
||||||
[node name="TeslaProjectile" instance=ExtResource("1_1oexk")]
|
[node name="TeslaProjectile" instance=ExtResource("1_1oexk")]
|
||||||
@@ -20,8 +20,8 @@ script = ExtResource("2_q73is")
|
|||||||
damage = SubResource("Resource_1121u")
|
damage = SubResource("Resource_1121u")
|
||||||
speed = 900
|
speed = 900
|
||||||
|
|
||||||
[node name="Sprite2D" parent="." index="0"]
|
[node name="Sprite2D" type="Sprite2D" parent="." index="0"]
|
||||||
texture = SubResource("PlaceholderTexture2D_1oexk")
|
texture = SubResource("PlaceholderTexture2D_1oexk")
|
||||||
|
|
||||||
[node name="CollisionShape2D" parent="." index="1"]
|
[node name="CollisionShape2D" parent="." index="1"]
|
||||||
shape = SubResource("CircleShape2D_q73is")
|
shape = SubResource("CircleShape2D_l65ib")
|
||||||
|
|||||||
BIN
Binary file not shown.
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://oj86smpsipw4"
|
||||||
|
path="res://.godot/imported/projectiles.png-303f8da0aba26a97cc483f6d67ac865d.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://images/projectiles.png"
|
||||||
|
dest_files=["res://.godot/imported/projectiles.png-303f8da0aba26a97cc483f6d67ac865d.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
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/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
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
|
||||||
BIN
Binary file not shown.
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://jr0clyniydmb"
|
||||||
|
path="res://.godot/imported/sweetie-16-1x.png-03ae77aafa5dd8bf4a6842bdda30be4f.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://images/sweetie-16-1x.png"
|
||||||
|
dest_files=["res://.godot/imported/sweetie-16-1x.png-03ae77aafa5dd8bf4a6842bdda30be4f.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
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/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
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
|
||||||
Reference in New Issue
Block a user