Skip to content

Commit

Permalink
Merge pull request #14 from Noarkhh/kubak2
Browse files Browse the repository at this point in the history
szypko
  • Loading branch information
Noarkhh authored Apr 2, 2023
2 parents 58bed90 + 3bc14d0 commit da811e8
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 9 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
2 changes: 1 addition & 1 deletion assets/death_sequence.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

importer="texture"
type="CompressedTexture2D"
uid="uid://wdslogi2xcp3"
uid="uid://r3u1g6500efr"

path="res://.godot/imported/death_sequence.png-be2f23bf5f8d365506f809a91fbc336e.ctex"
metadata={
Expand Down
2 changes: 1 addition & 1 deletion assets/fireball.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

importer="texture"
type="CompressedTexture2D"
uid="uid://d30ikbe4lis2p"
uid="uid://d1yjmre0rb48l"

path="res://.godot/imported/fireball.png-ed7e398784db012da0948497b00257d1.ctex"
metadata={
Expand Down
2 changes: 1 addition & 1 deletion assets/you_died.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

importer="texture"
type="CompressedTexture2D"
uid="uid://ohjgtr51jvga"
uid="uid://d07rhbbg7d14g"

path="res://.godot/imported/you_died.png-5f8b5c92545abce5b3729ea027c3073d.ctex"
metadata={
Expand Down
3 changes: 2 additions & 1 deletion danger_scheduler.tscn
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[gd_scene load_steps=2 format=3 uid="uid://bc8f76w6nme4d"]
[gd_scene load_steps=2 format=3 uid="uid://sxxthl7fu7gi"]


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

Expand Down
1 change: 1 addition & 0 deletions main_scene.tscn
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

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

[ext_resource type="PackedScene" uid="uid://c3ywqasnt5osa" path="res://src/Player/Player.tscn" id="2_27tub"]
Expand Down
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)
7 changes: 6 additions & 1 deletion 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

var health = 3.0
var is_invincible = false
Expand All @@ -42,7 +43,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 @@ -151,6 +155,7 @@ func _animation_finished():
$AnimatedSprite2D.animation = "run"
$AnimatedSprite2D.play()


func player_hit(impact: float) -> void:
if is_invincible:
return
Expand Down

0 comments on commit da811e8

Please sign in to comment.