Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions 0oso/Osito4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions 0oso/Osito4.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://bm8stl861stni"
path="res://.godot/imported/Osito4.png-6c78b7fdada003c1017e304908516f3f.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://0oso/Osito4.png"
dest_files=["res://.godot/imported/Osito4.png-6c78b7fdada003c1017e304908516f3f.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
3 changes: 3 additions & 0 deletions 0oso/portal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions 0oso/portal.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://b7l2sfavroa72"
path="res://.godot/imported/portal.png-5e6fcbc951f45993386152154559efe6.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://0oso/portal.png"
dest_files=["res://.godot/imported/portal.png-5e6fcbc951f45993386152154559efe6.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
64 changes: 64 additions & 0 deletions ice_Slide_Behavior.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
extends BaseCharacterBehavior

var is_sliding: bool = false
var slide_direction: Vector2 = Vector2.ZERO
@onready var originalSpeed = character.walk_speed
@onready var tile_map_layer: TileMapLayer = get_parent().get_parent().get_node("MapaHielo") # ajusta según tu estructura
@onready var hitbox:CollisionShape2D = character.get_node("CollisionShape2D")


func _physics_process(delta: float) -> void:
if not character or Engine.is_editor_hint():
return

if is_sliding:
character.moving_step = 0
character.stopping_step = 0

var slide_speed = character.walk_speed * 1.2
var motion = slide_direction * slide_speed * delta
var collision = character.move_and_collide(motion)

if collision:
is_sliding = false
character.velocity = Vector2.ZERO
else:
_check_hielo()
else:
# Movimiento normal
character.moving_step = 4000
character.stopping_step = 1500
if character.input_vector != Vector2.ZERO:
_check_hielo()

func _check_hielo() -> void:

if tile_map_layer == null:
return
var center = hitbox.global_position
var local_center = tile_map_layer.to_local(center)
var tile_pos = tile_map_layer.local_to_map(local_center)
var tile_id = tile_map_layer.get_cell_source_id(tile_pos)
var data = tile_map_layer.get_cell_atlas_coords(tile_pos)

if tile_id == 1 and (data == Vector2i(0, 1)) :
character.hieloAbajo = true
var direccion = character.input_vector
var x = abs(direccion.x)
var y = abs(direccion.y)
print(character.hieloAbajo)
if(x==y):
if(direccion.y)>0:
y = 300
if(direccion.y<0):
y = -300
x =0
direccion = Vector2(x,y)
if not is_sliding:
is_sliding = true
print(direccion)
slide_direction = direccion.normalized()
else:
is_sliding = false
character.hieloAbajo = false

1 change: 1 addition & 0 deletions ice_Slide_Behavior.gd.uid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://cxj884gcsf387
2 changes: 1 addition & 1 deletion project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ config_version=5

config/name="Threadbare"
config/tags=PackedStringArray("2d", "endless", "game", "tilemap", "top_down")
run/main_scene="uid://huuo8mnwsphv"
run/main_scene="uid://dow5vc7yb5k2c"
config/project_settings_override="user://custom_overrides.cfg"
config/features=PackedStringArray("4.5", "GL Compatibility")
config/icon="uid://dhwqkdin6refx"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://u7hyqocvrgh0"
path="res://.godot/imported/floor.png-10e2ce090343f3e21e21bfb7e5c3ad15.ctex"
path="res://.godot/imported/floor.png-7dc54ff7dfe80cb31e54b2f9158f32f4.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://scenes/eternal_loom_sokoban/components/floor/floor.png"
dest_files=["res://.godot/imported/floor.png-10e2ce090343f3e21e21bfb7e5c3ad15.ctex"]
source_file="res://scenes/eternal_loom_sokoban/components/clump/floor/floor.png"
dest_files=["res://.godot/imported/floor.png-7dc54ff7dfe80cb31e54b2f9158f32f4.ctex"]

[params]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://jpl3v3f7elq6"]

[ext_resource type="Shader" uid="uid://by2a6dethjee7" path="res://scenes/eternal_loom_sokoban/components/floor/tiled_shader.gdshader" id="1_e2x1m"]
[ext_resource type="Shader" uid="uid://by2a6dethjee7" path="res://scenes/eternal_loom_sokoban/components/clump/floor/tiled_shader.gdshader" id="1_e2x1m"]

[resource]
shader = ExtResource("1_e2x1m")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[ext_resource type="Script" uid="uid://x1mxt6bmei2o" path="res://scenes/ui_elements/cinematic/cinematic.gd" id="1_lwn33"]
[ext_resource type="Resource" uid="uid://b1eriy1gdfdkd" path="res://scenes/eternal_loom_sokoban/sokoban.dialogue" id="2_73ofi"]
[ext_resource type="Script" uid="uid://dppvw2f8yh4vu" path="res://scenes/eternal_loom_sokoban/components/system/board/board_2d.gd" id="3_65duy"]
[ext_resource type="Material" uid="uid://jpl3v3f7elq6" path="res://scenes/eternal_loom_sokoban/components/floor/tiled_mat.tres" id="4_5hoht"]
[ext_resource type="Material" uid="uid://jpl3v3f7elq6" path="res://scenes/eternal_loom_sokoban/components/clump/floor/tiled_mat.tres" id="4_5hoht"]
[ext_resource type="TileSet" uid="uid://dand23uvn70pg" path="res://scenes/eternal_loom_sokoban/components/eternal_loom_tileset.tres" id="5_mdri7"]
[ext_resource type="PackedScene" uid="uid://b4d5rf6hn0x4" path="res://scenes/eternal_loom_sokoban/components/hud/sokoban_hud.tscn" id="6_73ofi"]
[ext_resource type="PackedScene" uid="uid://btpeaqx2nur3q" path="res://scenes/eternal_loom_sokoban/components/eternal_loom_ruleset.tscn" id="6_yoiiu"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[ext_resource type="PackedScene" uid="uid://gujm23k2rxjq" path="res://scenes/eternal_loom_sokoban/components/wall/wall.tscn" id="9_ldnnp"]
[ext_resource type="PackedScene" uid="uid://bkt7dh5e77c4n" path="res://scenes/eternal_loom_sokoban/components/clump/clump.tscn" id="10_h6xpa"]
[ext_resource type="PackedScene" uid="uid://jbavn13shdit" path="res://scenes/eternal_loom_sokoban/components/threads/thread_bow_imagination.tscn" id="11_b1fc2"]
[ext_resource type="Texture2D" uid="uid://u7hyqocvrgh0" path="res://scenes/eternal_loom_sokoban/components/floor/floor.png" id="12_q745x"]
[ext_resource type="Texture2D" uid="uid://u7hyqocvrgh0" path="res://scenes/eternal_loom_sokoban/components/clump/floor/floor.png" id="12_q745x"]
[ext_resource type="Texture2D" uid="uid://5esrdyqqbnm3" path="res://scenes/eternal_loom_sokoban/components/threads/thread_green.png" id="13_y4ad2"]
[ext_resource type="Texture2D" uid="uid://cx61qiuaqlfkb" path="res://scenes/eternal_loom_sokoban/components/threads/thread_red.png" id="14_yxe0x"]
[ext_resource type="Texture2D" uid="uid://bvgt0cdmqhsu" path="res://scenes/eternal_loom_sokoban/components/threads/thread_yellow.png" id="15_gvyts"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[ext_resource type="PackedScene" uid="uid://bw2bk7hvohx53" path="res://scenes/eternal_loom_sokoban/components/player/sokoban_player.tscn" id="8_a37yu"]
[ext_resource type="PackedScene" uid="uid://gujm23k2rxjq" path="res://scenes/eternal_loom_sokoban/components/wall/wall.tscn" id="9_rmyfg"]
[ext_resource type="PackedScene" uid="uid://bkt7dh5e77c4n" path="res://scenes/eternal_loom_sokoban/components/clump/clump.tscn" id="10_7jxa7"]
[ext_resource type="Texture2D" uid="uid://u7hyqocvrgh0" path="res://scenes/eternal_loom_sokoban/components/floor/floor.png" id="12_dfeo6"]
[ext_resource type="Texture2D" uid="uid://u7hyqocvrgh0" path="res://scenes/eternal_loom_sokoban/components/clump/floor/floor.png" id="12_dfeo6"]

[sub_resource type="TileSetScenesCollectionSource" id="TileSetScenesCollectionSource_ef8tg"]
resource_name = "pieces"
Expand Down
19 changes: 18 additions & 1 deletion scenes/game_elements/characters/player/components/player.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
class_name Player
extends CharacterBody2D


signal mode_changed(mode: Mode)

## Controls how the player can interact with the world around them.

enum Mode {
## Player can explore the world, interact with items and NPCs, but is not
## engaged in combat. Combat actions are not available in this mode.
Expand Down Expand Up @@ -79,7 +81,7 @@ var input_vector: Vector2
@onready var player_hook: PlayerHook = %PlayerHook
@onready var player_sprite: AnimatedSprite2D = %PlayerSprite
@onready var _walk_sound: AudioStreamPlayer2D = %WalkSound

@onready var hieloAbajo = false

func _set_mode(new_mode: Mode) -> void:
var previous_mode: Mode = mode
Expand Down Expand Up @@ -159,6 +161,21 @@ func _ready() -> void:

func _unhandled_input(_event: InputEvent) -> void:
var axis: Vector2 = Input.get_vector(&"move_left", &"move_right", &"move_up", &"move_down")
var pressed_count := 0
if(hieloAbajo):
if Input.is_action_pressed("move_left"):
pressed_count += 1
if Input.is_action_pressed("move_right"):
pressed_count += 1
if Input.is_action_pressed("move_up"):
pressed_count += 1
if Input.is_action_pressed("move_down"):
pressed_count += 1
# Si hay dos o más inputs, no hacer nada
if pressed_count >= 2:
input_vector = Vector2.ZERO
return


var speed: float
if player_hook.is_throwing_or_aiming():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ class_name CollectibleItem extends Node2D
## Wether the collectible can be seen or collected. This allows the collectible
## to be placed in the scene even when some condition has to be met for it to
## appear.
@onready var switchScene = true
@onready var collected = false

@export var revealed: bool = true:
set(new_value):
revealed = new_value
Expand Down Expand Up @@ -86,21 +89,25 @@ func reveal() -> void:
## and when that finishes, a new [InventoryItem] will be added to the
## [GameState] and the interaction will have ended.
func _on_interacted(player: Player, _from_right: bool) -> void:

z_index += 1
animation_player.play("collected")
await animation_player.animation_finished
collected = true

GameState.add_collected_item(item)

if collected_dialogue:
DialogueManager.show_dialogue_balloon(collected_dialogue, dialogue_title, [self, player])
await DialogueManager.dialogue_ended



interact_area.end_interaction()
queue_free()

if next_scene:
SceneSwitcher.change_to_file_with_transition(next_scene)

if(_checkAllCollectables()):
if collected_dialogue:
DialogueManager.show_dialogue_balloon(collected_dialogue, dialogue_title, [self, player])
await DialogueManager.dialogue_ended
if next_scene:
SceneSwitcher.change_to_file_with_transition(next_scene)
queue_free()


func _update_based_on_revealed() -> void:
Expand All @@ -110,3 +117,11 @@ func _update_based_on_revealed() -> void:
sprite_2d.visible = revealed
if physical_collider:
physical_collider.disabled = not revealed


func _checkAllCollectables()-> bool:
for item: CollectibleItem in get_tree().get_nodes_in_group(&"item_collectable"):
var isCollected = item.collected
if(!isCollected):
return false
return true
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://i8vw0dcdtahw"
path="res://.godot/imported/Gemini_Generated_Image_qh5zwrqh5zwrqh5z.png-bc027db42b3639b60e09472310d23118.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://scenes/game_logic/camera_behaviors/Gemini_Generated_Image_qh5zwrqh5zwrqh5z.png"
dest_files=["res://.godot/imported/Gemini_Generated_Image_qh5zwrqh5zwrqh5z.png-bc027db42b3639b60e09472310d23118.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
2 changes: 1 addition & 1 deletion scenes/globals/pause/pause_overlay.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[ext_resource type="Script" uid="uid://y88qplkioj1q" path="res://scenes/globals/pause/pause_overlay.gd" id="1_lf64b"]
[ext_resource type="Texture2D" uid="uid://bvlx57seuur65" path="res://assets/first_party/intro/background.png" id="2_1tcw0"]
[ext_resource type="Theme" uid="uid://cvitou84ni7qe" path="res://scenes/ui_elements/components/theme.tres" id="2_sd5t1"]
[ext_resource type="PackedScene" uid="uid://dkeb0yjgcfi86" path="res://scenes/menus/options/options.tscn" id="3_sd5t1"]
[ext_resource type="PackedScene" uid="uid://dkeb0yjgcfi86" path="res://scenes/MENU OSO/options/options.tscn" id="3_sd5t1"]

[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_ai8ue"]
texture = ExtResource("2_1tcw0")
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading