Skip to content

Commit

Permalink
szypko
Browse files Browse the repository at this point in the history
  • Loading branch information
Spontaniczny committed Apr 2, 2023
1 parent ea4fa45 commit f68c389
Show file tree
Hide file tree
Showing 19 changed files with 153 additions and 33 deletions.
4 changes: 3 additions & 1 deletion DangerScheduler.gd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ var segments_scenes = [
preload("res://obstacles/segments/segment_barrel_stack.tscn"),
preload("res://obstacles/segments/segment_crate_stack.tscn"),
preload("res://obstacles/segments/segment_market.tscn"),
preload("res://obstacles/segments/segment_scaffolding_triangle.tscn")
preload("res://obstacles/segments/segment_scaffolding_triangle.tscn"),
preload("res://obstacles/segments/segment_barrel_on_crate.tscn"),
preload("res://obstacles/segments/segment_crate_trap.tscn"),
]

var dragons = []
Expand Down
34 changes: 34 additions & 0 deletions assets/death_sequence.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://r3u1g6500efr"
path="res://.godot/imported/death_sequence.png-be2f23bf5f8d365506f809a91fbc336e.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/death_sequence.png"
dest_files=["res://.godot/imported/death_sequence.png-be2f23bf5f8d365506f809a91fbc336e.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
34 changes: 34 additions & 0 deletions assets/fireball.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://d1yjmre0rb48l"
path="res://.godot/imported/fireball.png-ed7e398784db012da0948497b00257d1.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/fireball.png"
dest_files=["res://.godot/imported/fireball.png-ed7e398784db012da0948497b00257d1.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
1 change: 0 additions & 1 deletion assets/laser_beam_begin.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://dk1lsgnefp8ei"

path="res://.godot/imported/laser_beam_begin.png-d33b4cb3bb1cb9d73b0da1919320c29a.ctex"
metadata={
"vram_texture": false
Expand Down
1 change: 0 additions & 1 deletion assets/laser_beam_cycle.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://cotgtpelq23h"

path="res://.godot/imported/laser_beam_cycle.png-b6bfb0a4d09e5ed71b5312c3f3f7d4ba.ctex"
metadata={
"vram_texture": false
Expand Down
1 change: 0 additions & 1 deletion assets/laser_beam_end.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://wq81u8uqnynd"

path="res://.godot/imported/laser_beam_end.png-8c84793e3c32e419b569ab8d8292b2bf.ctex"
metadata={
"vram_texture": false
Expand Down
1 change: 0 additions & 1 deletion assets/shroom1.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://dvjfyud7p1f8b"

path="res://.godot/imported/shroom1.png-ca5d0c82db59e8f82a0b92287ba595d0.ctex"
metadata={
"vram_texture": false
Expand Down
1 change: 0 additions & 1 deletion assets/shroom2.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://dbrxn0d8lfgx2"

path="res://.godot/imported/shroom2.png-30f3050294ff1cf14d95a809a7395d80.ctex"
metadata={
"vram_texture": false
Expand Down
1 change: 0 additions & 1 deletion assets/shroom3.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://beqitl2udybbu"

path="res://.godot/imported/shroom3.png-9a07953fa47ff0eb2928a50db135f7fc.ctex"
metadata={
"vram_texture": false
Expand Down
1 change: 0 additions & 1 deletion assets/shroom4.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://cm7oby38omu5s"

path="res://.godot/imported/shroom4.png-deb44d6da463e7f8abf78a9705c52bf3.ctex"
metadata={
"vram_texture": false
Expand Down
1 change: 0 additions & 1 deletion assets/wall.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://bcph3fiqjh88y"

path="res://.godot/imported/wall.png-6b1d64fa3ea5498e75707962a9c3b56c.ctex"
metadata={
"vram_texture": false
Expand Down
34 changes: 34 additions & 0 deletions assets/you_died.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://d07rhbbg7d14g"
path="res://.godot/imported/you_died.png-5f8b5c92545abce5b3729ea027c3073d.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/you_died.png"
dest_files=["res://.godot/imported/you_died.png-5f8b5c92545abce5b3729ea027c3073d.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
2 changes: 1 addition & 1 deletion danger_scheduler.tscn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=2 format=3 uid="uid://gvw8kg2bj3s1"]
[gd_scene load_steps=2 format=3 uid="uid://sxxthl7fu7gi"]

[ext_resource type="Script" path="res://DangerScheduler.gd" id="1_bh304"]

Expand Down
10 changes: 4 additions & 6 deletions main_scene.tscn
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@


[gd_scene load_steps=9 format=3 uid="uid://b04gcujmvf2fx"]
[gd_scene load_steps=10 format=3 uid="uid://cpdu4s3kjuxpl"]

[ext_resource type="PackedScene" uid="uid://c3ywqasnt5osa" path="res://src/Player/Player.tscn" id="2_27tub"]

[ext_resource type="PackedScene" uid="uid://gvw8kg2bj3s1" path="res://danger_scheduler.tscn" id="3_oo2km"]
[ext_resource type="PackedScene" uid="uid://sxxthl7fu7gi" path="res://danger_scheduler.tscn" id="3_oo2km"]
[ext_resource type="PackedScene" uid="uid://b0okavcmqim7e" path="res://dragons/laser_dragon.tscn" id="4_mpgmk"]
[ext_resource type="PackedScene" uid="uid://cgd0txrrf22r7" path="res://background/background.tscn" id="5_acqpb"]
[ext_resource type="PackedScene" uid="uid://drtkgj2rkr6kp" path="res://ui/ui.tscn" id="6_8y5vv"]
[ext_resource type="PackedScene" uid="uid://qion8t3outh6" path="res://background/wall_layer.tscn" id="6_u7adc"]
[ext_resource type="PackedScene" uid="uid://b54oe2oana7m7" path="res://dragons/stone_dragon.tscn" id="6_b2pdn"]
[ext_resource type="PackedScene" uid="uid://qion8t3outh6" path="res://background/wall_layer.tscn" id="6_u7adc"]
[ext_resource type="PackedScene" uid="uid://dt0g404mxjjs3" path="res://dragons/fireball_dragon.tscn" id="8_vodc4"]

[sub_resource type="RectangleShape2D" id="RectangleShape2D_1mddp"]
Expand All @@ -33,6 +30,7 @@ position = Vector2(446, 290)
[node name="laser_dragon" parent="." instance=ExtResource("4_mpgmk")]

[node name="UI" parent="." instance=ExtResource("6_8y5vv")]

[node name="fireball_dragon" parent="." instance=ExtResource("8_vodc4")]

[node name="stone_dragon" parent="." instance=ExtResource("6_b2pdn")]
19 changes: 19 additions & 0 deletions obstacles/segments/segment_barrel_on_crate.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[gd_scene load_steps=4 format=3 uid="uid://cu00g518yj841"]

[ext_resource type="PackedScene" uid="uid://dfn1idoddv7um" path="res://obstacles/segments/segment_obstacles.tscn" id="1_pvlnd"]
[ext_resource type="PackedScene" uid="uid://b4x7i0m28nkh6" path="res://obstacles/obstacle_crate.tscn" id="2_10l44"]
[ext_resource type="PackedScene" uid="uid://b14ocn7wd7dtl" path="res://obstacles/obstacle_barrel.tscn" id="3_fso7s"]

[node name="SegmentObstacles" instance=ExtResource("1_pvlnd")]

[node name="ObstacleCrate" parent="." index="0" instance=ExtResource("2_10l44")]
position = Vector2(49, 3)

[node name="ObstacleBarrel3" parent="." index="1" instance=ExtResource("3_fso7s")]
position = Vector2(66, -154)

[node name="ObstacleBarrel" parent="." index="2" instance=ExtResource("3_fso7s")]
position = Vector2(9, -154)

[node name="ObstacleBarrel2" parent="." index="3" instance=ExtResource("3_fso7s")]
position = Vector2(-48, -37)
3 changes: 0 additions & 3 deletions obstacles/segments/segment_crate_stack.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@ position = Vector2(49, 3)

[node name="ObstacleCrate3" parent="." index="2" instance=ExtResource("2_j8equ")]
position = Vector2(-10, -115)

[node name="ObstacleCrate4" parent="." index="3" instance=ExtResource("2_j8equ")]
position = Vector2(-8, -229)
15 changes: 15 additions & 0 deletions obstacles/segments/segment_crate_trap.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[gd_scene load_steps=3 format=3 uid="uid://ckv8qoejcrxep"]

[ext_resource type="PackedScene" uid="uid://dfn1idoddv7um" path="res://obstacles/segments/segment_obstacles.tscn" id="1_pdfye"]
[ext_resource type="PackedScene" uid="uid://b4x7i0m28nkh6" path="res://obstacles/obstacle_crate.tscn" id="2_plcrh"]

[node name="SegmentObstacles" instance=ExtResource("1_pdfye")]

[node name="ObstacleCrate" parent="." index="0" instance=ExtResource("2_plcrh")]
position = Vector2(257, 4)

[node name="ObstacleCrate2" parent="." index="1" instance=ExtResource("2_plcrh")]
position = Vector2(-138, 2)

[node name="ObstacleCrate3" parent="." index="2" instance=ExtResource("2_plcrh")]
position = Vector2(257, -110)
14 changes: 9 additions & 5 deletions src/Player/CharacterBody2D.gd
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ var is_sliding = false
var dash_velocity = 0
var last_anim = ""
var is_rolling = false
var is_alive = true
# Get the gravity from the project settings to be synced with RigidBody nodes.
var gravity = ProjectSettings.get_setting("physics/2d/default_gravity")

Expand All @@ -38,7 +39,10 @@ func _ready():
$AnimatedSprite2D.play()

func _physics_process(delta):

if not is_alive:
pass


if is_dashing:
velocity.x += dash_velocity
time_since_last_dash += 1
Expand Down Expand Up @@ -116,7 +120,9 @@ func _physics_process(delta):

# print(velocity)
move_and_slide()

position.x = min(position.x, MAX_RIGHT)
if position.x < MAX_LEFT:
get_tree().paused = true

func _animation_finished():
if is_sliding:
Expand Down Expand Up @@ -145,6 +151,4 @@ func _animation_finished():
$AnimatedSprite2D.animation = "run"
$AnimatedSprite2D.play()

position.x = min(position.x, MAX_RIGHT)
if position.x < MAX_LEFT:
get_tree().paused = true

9 changes: 0 additions & 9 deletions src/Player/Player.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
[ext_resource type="Texture2D" uid="uid://qpk1nl7txlb7" path="res://assets/character_slide_sequence_begin.png" id="8_p1vv5"]
[ext_resource type="Texture2D" uid="uid://bymbhbpnrguxc" path="res://assets/character_double_jump_sequence_begin.png" id="9_i14r2"]


[sub_resource type="RectangleShape2D" id="RectangleShape2D_jhyvd"]
size = Vector2(40, 80)

Expand Down Expand Up @@ -68,14 +67,9 @@ atlas = ExtResource("5_wlnmu")
region = Rect2(32, 0, 16, 22)

[sub_resource type="AtlasTexture" id="AtlasTexture_gpp1d"]

atlas = ExtResource("2_v0srd")
region = Rect2(80, 0, 16, 22)

[sub_resource type="AtlasTexture" id="AtlasTexture_lwclu"]
atlas = ExtResource("2_v0srd")
region = Rect2(64, 0, 16, 22)

[sub_resource type="AtlasTexture" id="AtlasTexture_uevvi"]
atlas = ExtResource("2_v0srd")
region = Rect2(48, 0, 16, 22)
Expand Down Expand Up @@ -224,7 +218,6 @@ animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_gpp1d")

}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_uevvi")
Expand Down Expand Up @@ -605,7 +598,6 @@ animations = [{
"loop": false,
"name": &"start_spin",
"speed": 16.0

}]

[node name="CharacterBody2D" type="CharacterBody2D"]
Expand All @@ -632,4 +624,3 @@ frame = 2
frame_progress = 1.0

[connection signal="animation_finished" from="AnimatedSprite2D" to="." method="_animation_finished"]

0 comments on commit f68c389

Please sign in to comment.