-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4013 from KBVE/patch-atomic-adding-lasers-02-19-2…
…025-1740002766 [CI] Merge patch-atomic-adding-lasers-02-19-2025-1740002766 into dev
- Loading branch information
Showing
11 changed files
with
124 additions
and
6 deletions.
There are no files selected for viewing
Binary file added
BIN
+749 Bytes
apps/gamejam/brackeys/13/assets/kenny/space-shooter-redux/png/laserGreen11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions
34
apps/gamejam/brackeys/13/assets/kenny/space-shooter-redux/png/laserGreen11.png.import
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="CompressedTexture2D" | ||
uid="uid://cpg870sshds0m" | ||
path="res://.godot/imported/laserGreen11.png-776296bf2871b1464fd65317ea694ad5.ctex" | ||
metadata={ | ||
"vram_texture": false | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://assets/kenny/space-shooter-redux/png/laserGreen11.png" | ||
dest_files=["res://.godot/imported/laserGreen11.png-776296bf2871b1464fd65317ea694ad5.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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
[gd_scene load_steps=2 format=3 uid="uid://cbrda40vq26pj"] | ||
[gd_scene load_steps=3 format=3 uid="uid://cbrda40vq26pj"] | ||
|
||
[ext_resource type="Script" path="res://scripts/game.gd" id="1_oyaqx"] | ||
[ext_resource type="PackedScene" uid="uid://1s5v0llrjq3" path="res://scenes/spaceship.tscn" id="1_rlyye"] | ||
|
||
[node name="Game" type="Node2D"] | ||
script = ExtResource("1_oyaqx") | ||
|
||
[node name="Spaceship" parent="." instance=ExtResource("1_rlyye")] | ||
position = Vector2(500, 300) | ||
|
||
[node name="Projectiles" type="Node" parent="."] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[gd_scene load_steps=4 format=3 uid="uid://dd2eekysgtc4"] | ||
|
||
[ext_resource type="Script" path="res://scripts/laser.gd" id="1_5kyoc"] | ||
[ext_resource type="Texture2D" uid="uid://cpg870sshds0m" path="res://assets/kenny/space-shooter-redux/png/laserGreen11.png" id="1_s4xlg"] | ||
|
||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_44da2"] | ||
radius = 3.0 | ||
height = 28.0 | ||
|
||
[node name="Laser" type="Area2D"] | ||
collision_layer = 256 | ||
collision_mask = 216 | ||
script = ExtResource("1_5kyoc") | ||
|
||
[node name="Sprite2D" type="Sprite2D" parent="."] | ||
position = Vector2(0, -15) | ||
scale = Vector2(0.5, 0.5) | ||
texture = ExtResource("1_s4xlg") | ||
|
||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."] | ||
position = Vector2(0, -15) | ||
shape = SubResource("CapsuleShape2D_44da2") | ||
|
||
[node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="."] | ||
position = Vector2(0, -14.5) | ||
scale = Vector2(0.5, 1.35) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
extends Node2D | ||
|
||
@onready var spaceship = $Spaceship | ||
@onready var projectiles = $Projectiles | ||
|
||
func _ready(): | ||
spaceship.connect("laser_shot", _on_spaceship_laser_shot) | ||
|
||
func _on_spaceship_laser_shot(laser): | ||
projectiles.add_child(laser) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
extends Area2D | ||
|
||
var movement_vector := Vector2(0, -1) | ||
|
||
func _physics_process(delta): | ||
var laser_speed = Global.get_starship_stat("laser_speed") | ||
global_position += movement_vector.rotated(rotation) * laser_speed * delta | ||
|
||
func _on_visible_on_screen_notifier_2d_screen_exited(): | ||
queue_free() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters