diff options
author | altaf-creator <dev@altafcreator.com> | 2025-10-20 01:43:48 +0800 |
---|---|---|
committer | altaf-creator <dev@altafcreator.com> | 2025-10-20 01:43:48 +0800 |
commit | 466bec0b724632f6dd2e1555a7bd58ffc1dd0458 (patch) | |
tree | d6645ea11914edeec645299fa497a9e542dbaec7 /Scripts/Level Specific |
Jam version.
Diffstat (limited to 'Scripts/Level Specific')
-rw-r--r-- | Scripts/Level Specific/0MachetteGive.gd | 8 | ||||
-rw-r--r-- | Scripts/Level Specific/0MachetteGive.gd.uid | 1 | ||||
-rw-r--r-- | Scripts/Level Specific/1FruitSrhubs.gd | 14 | ||||
-rw-r--r-- | Scripts/Level Specific/1FruitSrhubs.gd.uid | 1 | ||||
-rw-r--r-- | Scripts/Level Specific/1Mud.gd | 11 | ||||
-rw-r--r-- | Scripts/Level Specific/1Mud.gd.uid | 1 | ||||
-rw-r--r-- | Scripts/Level Specific/1SpikyShrubs.gd | 27 | ||||
-rw-r--r-- | Scripts/Level Specific/1SpikyShrubs.gd.uid | 1 | ||||
-rw-r--r-- | Scripts/Level Specific/2CameraControls.gd | 21 | ||||
-rw-r--r-- | Scripts/Level Specific/2CameraControls.gd.uid | 1 | ||||
-rw-r--r-- | Scripts/Level Specific/AnimationArea.gd | 9 | ||||
-rw-r--r-- | Scripts/Level Specific/AnimationArea.gd.uid | 1 | ||||
-rw-r--r-- | Scripts/Level Specific/DeathZone.gd | 20 | ||||
-rw-r--r-- | Scripts/Level Specific/DeathZone.gd.uid | 1 | ||||
-rw-r--r-- | Scripts/Level Specific/DisableJump.gd | 6 | ||||
-rw-r--r-- | Scripts/Level Specific/DisableJump.gd.uid | 1 | ||||
-rw-r--r-- | Scripts/Level Specific/Grappleable.gd | 10 | ||||
-rw-r--r-- | Scripts/Level Specific/Grappleable.gd.uid | 1 |
18 files changed, 135 insertions, 0 deletions
diff --git a/Scripts/Level Specific/0MachetteGive.gd b/Scripts/Level Specific/0MachetteGive.gd new file mode 100644 index 0000000..9754741 --- /dev/null +++ b/Scripts/Level Specific/0MachetteGive.gd @@ -0,0 +1,8 @@ +extends Node2D + + +func _on_area_2d_body_entered(body:Node2D) -> void: + if body is Entity: + if body.is_player: + body.get_node("PlayerInventory").give_machette() + queue_free() diff --git a/Scripts/Level Specific/0MachetteGive.gd.uid b/Scripts/Level Specific/0MachetteGive.gd.uid new file mode 100644 index 0000000..8b41468 --- /dev/null +++ b/Scripts/Level Specific/0MachetteGive.gd.uid @@ -0,0 +1 @@ +uid://c4st16y5gx2yh diff --git a/Scripts/Level Specific/1FruitSrhubs.gd b/Scripts/Level Specific/1FruitSrhubs.gd new file mode 100644 index 0000000..ee38b61 --- /dev/null +++ b/Scripts/Level Specific/1FruitSrhubs.gd @@ -0,0 +1,14 @@ +extends Node2D + +@export var area : Area2D +@export var fruites : Node2D +@export var health = 3 + +func _on_area_2d_body_entered(body:Node2D) -> void: + if body is Entity: + if body.is_player: + body.health += health + body.health = min(body.health, body.max_health) + UIConnector.display_health(body.health) + area.queue_free() + fruites.queue_free() diff --git a/Scripts/Level Specific/1FruitSrhubs.gd.uid b/Scripts/Level Specific/1FruitSrhubs.gd.uid new file mode 100644 index 0000000..1cfc179 --- /dev/null +++ b/Scripts/Level Specific/1FruitSrhubs.gd.uid @@ -0,0 +1 @@ +uid://cl2xrq3y86cer diff --git a/Scripts/Level Specific/1Mud.gd b/Scripts/Level Specific/1Mud.gd new file mode 100644 index 0000000..eaa64d5 --- /dev/null +++ b/Scripts/Level Specific/1Mud.gd @@ -0,0 +1,11 @@ +extends Area2D + +func _on_body_exited(body:Node2D) -> void: + if body is Entity: + if body.is_player: + body.get_node("PlayerMovement").speed *= 4 + +func _on_body_entered(body:Node2D) -> void: + if body is Entity: + if body.is_player: + body.get_node("PlayerMovement").speed /= 4 diff --git a/Scripts/Level Specific/1Mud.gd.uid b/Scripts/Level Specific/1Mud.gd.uid new file mode 100644 index 0000000..00af3c2 --- /dev/null +++ b/Scripts/Level Specific/1Mud.gd.uid @@ -0,0 +1 @@ +uid://bkw5wrlcs14pa diff --git a/Scripts/Level Specific/1SpikyShrubs.gd b/Scripts/Level Specific/1SpikyShrubs.gd new file mode 100644 index 0000000..99747a2 --- /dev/null +++ b/Scripts/Level Specific/1SpikyShrubs.gd @@ -0,0 +1,27 @@ +extends Node2D + +@export var health = 1 + +var can_hurt = true + +var pler : Entity = null + +func _process(_delta: float) -> void: + if pler && can_hurt: + pler.damage(health) + can_hurt = false + $"Timer".start() + +func _on_area_2d_body_entered(body:Node2D) -> void: + if body is Entity: + if body.is_player && can_hurt: + pler = body + pler.get_node("PlayerMovement").speed /= 2 + +func _on_timer_timeout() -> void: + can_hurt = true + +func _on_area_2d_body_exited(_body:Node2D) -> void: + if pler: + pler.get_node("PlayerMovement").speed *= 2 + pler = null diff --git a/Scripts/Level Specific/1SpikyShrubs.gd.uid b/Scripts/Level Specific/1SpikyShrubs.gd.uid new file mode 100644 index 0000000..1c9977b --- /dev/null +++ b/Scripts/Level Specific/1SpikyShrubs.gd.uid @@ -0,0 +1 @@ +uid://d311iyn5wpy1q diff --git a/Scripts/Level Specific/2CameraControls.gd b/Scripts/Level Specific/2CameraControls.gd new file mode 100644 index 0000000..f207aca --- /dev/null +++ b/Scripts/Level Specific/2CameraControls.gd @@ -0,0 +1,21 @@ +extends Area2D + +@export_range(-1, 1, 0.01) var horizontal_offset : float = 0 +@export var x_delta : float +@export var y_delta : float +@export var once : bool = false +@export var set : bool = false + +func _on_body_entered(body:Node2D) -> void: + if body is Entity: + if body.is_player: + var cam : Camera2D = body.get_node("Node2D/Camera2D") + + cam.drag_horizontal_offset = horizontal_offset + if !set: + cam.position.x += x_delta + cam.position.y += y_delta + else: + cam.position.x = x_delta + cam.position.y = y_delta + if once: queue_free() diff --git a/Scripts/Level Specific/2CameraControls.gd.uid b/Scripts/Level Specific/2CameraControls.gd.uid new file mode 100644 index 0000000..1c3c871 --- /dev/null +++ b/Scripts/Level Specific/2CameraControls.gd.uid @@ -0,0 +1 @@ +uid://b5td7htthnvrn diff --git a/Scripts/Level Specific/AnimationArea.gd b/Scripts/Level Specific/AnimationArea.gd new file mode 100644 index 0000000..70d5e85 --- /dev/null +++ b/Scripts/Level Specific/AnimationArea.gd @@ -0,0 +1,9 @@ +extends Area2D + +@export var anim : AnimationPlayer +@export var aname : String + +func _on_body_entered(body:Node2D) -> void: + if body is Entity: + if body.is_player: + anim.play(aname) diff --git a/Scripts/Level Specific/AnimationArea.gd.uid b/Scripts/Level Specific/AnimationArea.gd.uid new file mode 100644 index 0000000..e55799d --- /dev/null +++ b/Scripts/Level Specific/AnimationArea.gd.uid @@ -0,0 +1 @@ +uid://dfgrs1b8urejr diff --git a/Scripts/Level Specific/DeathZone.gd b/Scripts/Level Specific/DeathZone.gd new file mode 100644 index 0000000..0648c27 --- /dev/null +++ b/Scripts/Level Specific/DeathZone.gd @@ -0,0 +1,20 @@ +extends Area2D + +var timer : Timer + +func _ready() -> void: + monitoring = false + timer = Timer.new() + timer.wait_time = 1 + timer.timeout.connect(_enable) + add_child(timer) + timer.one_shot = true + timer.start() + +func _on_body_entered(body:Node2D) -> void: + if body is Entity: + body.damage(1000000) + monitoring = false + +func _enable(): + monitoring = true diff --git a/Scripts/Level Specific/DeathZone.gd.uid b/Scripts/Level Specific/DeathZone.gd.uid new file mode 100644 index 0000000..dfed3a0 --- /dev/null +++ b/Scripts/Level Specific/DeathZone.gd.uid @@ -0,0 +1 @@ +uid://c6a1wljfwd8jm diff --git a/Scripts/Level Specific/DisableJump.gd b/Scripts/Level Specific/DisableJump.gd new file mode 100644 index 0000000..ac4ec38 --- /dev/null +++ b/Scripts/Level Specific/DisableJump.gd @@ -0,0 +1,6 @@ +extends Area2D + +func _on_body_entered(body:Node2D) -> void: + if body is Entity: + if body.is_player: + body.get_node("PlayerMovement").jump_vel = 0 diff --git a/Scripts/Level Specific/DisableJump.gd.uid b/Scripts/Level Specific/DisableJump.gd.uid new file mode 100644 index 0000000..8f61bfa --- /dev/null +++ b/Scripts/Level Specific/DisableJump.gd.uid @@ -0,0 +1 @@ +uid://cswiai0otl7jn diff --git a/Scripts/Level Specific/Grappleable.gd b/Scripts/Level Specific/Grappleable.gd new file mode 100644 index 0000000..43dcbd4 --- /dev/null +++ b/Scripts/Level Specific/Grappleable.gd @@ -0,0 +1,10 @@ +extends StaticBody2D +class_name Grappleable + +@export var highlighter : Sprite2D + +func highlight(): + highlighter.visible = true + +func dehighlight(): + highlighter.visible = false diff --git a/Scripts/Level Specific/Grappleable.gd.uid b/Scripts/Level Specific/Grappleable.gd.uid new file mode 100644 index 0000000..e735572 --- /dev/null +++ b/Scripts/Level Specific/Grappleable.gd.uid @@ -0,0 +1 @@ +uid://c8n5trpan30g0 |