From 902ed33ee4907fa55f1c3430bd6e53c113288646 Mon Sep 17 00:00:00 2001 From: SnekInAScarf Date: Sat, 14 Nov 2026 13:58:57 -0800 Subject: [PATCH] Added sprites for attaching to both surfaces. Also code for sticking to wall-to-wall or floor-to-ceiling. --- Assets/Player.png | Bin 2310 -> 2624 bytes Characters/player.gd | 158 ++++++++++++++++++++++++++++++++++++++++- Characters/player.tscn | 92 +++++++++++++++++++----- Levels/test_level.tscn | 6 +- 4 files changed, 231 insertions(+), 25 deletions(-) diff --git a/Assets/Player.png b/Assets/Player.png index 56003a82b1be24701dc60dc9e6b1a1be47b861d4..95ff28a464b592ecf7f6a71d698039d83f51a324 100755 GIT binary patch delta 1583 zcmV+~2GIG262KH8iBL{Q4GJ0x0000DNk~Le000930000W2m=5B0FoQ;7qKBH1b+qM zNklTO?-R<2 z$wu(lO%oX6mRmk6lsg7&8xbD8M6@OTAq&DSw|rLm46vDFmnf$SkyE~-{}#K@DTX1} z%-m%FNA1!AG2GpPith6oxO=O02{eo!gZDbvb}}bXMngy|Di-m_%j1P%FlPDfN=vxw|`OEwkrz0 zQ-SPk1Kk-QDt!rW9(-7z%1_h@mmH=E5BlPKbsTS z1q65nZ1gZqZC7WGL?QvO70~u%Kn}9CXi!=?uFg_jMAY=(+Q*9sFM@3bkShq64bQMG zr)j4v3QB^G+r6tHK2S~I!tq45CBJ_67y zcln!mP7lg^j*UTM&42o?b`~!I4uJ{K29PssWhXcuD#)&w)^+moGiHK41JsmJ7+_g< zfr;J)iV%RAz9uyIK1g^Ej3YEq=KGAy>xaP0=V4RYc_!sW3pB2Xz_d(S=+6Yp0388* zH*r4M1>!cV2@QQ3t^v3iWOsZM`R54&z0D%JKI17s4ImQ%q<_F|s&NoSfXQ85XVD+c z0DMBvwzX?{9)g_&IG-gL3BYVttqwj6=Kx^_*%5{lwBZ=7`ybUlHvR=N1a6I6oQtX| zCy?sn<|07259-YT-96IeAprNC6(Ed2;|Ur+hwJeR)<97LEkIs=0k@(lil$PC z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%=&Wx^vYq2sAmN$2vhQ)n{h>mD@jv2l=7` z68D(a#Bp^{CW5wlH3K*!;DkJfzmbDTpZ(FW3J4$S5PwF^13ypC;xsq~ZHlw~`XnC{ zy7XA;CS4jkd=%xeM-goADSw2OLyW*+;L4-zIJg%Gw8)uDU?m6iW^(N%xJ?09M!f=9 ztUlsxAsFnp7>x1HnngN|@mbuiU{56heJ7caZ!;(qW-xfuYXB?v)Jy`JHdjEvW(35{ zK1!4b#7Di*FuKFe3WM4I_!cnU@Ji*Z2I&3a%v{bU0^n|TF3u2iAlqvSK)L$^kTF;Y c-q?Zv2jNQWDjvCEoB#j-07*qoM6N<$f?$nMCjbBd diff --git a/Characters/player.gd b/Characters/player.gd index 9437bce..d66c77c 100755 --- a/Characters/player.gd +++ b/Characters/player.gd @@ -74,6 +74,16 @@ const REST_FRAME = 0 # The Idle animation's frame. We reform as it. const PRESS_WALL_FRAME = 9 const PRESS_WALL_SPRITE_SHIFT = 6.0 +# Holding away from a surface with another facing it one tile across makes us +# stretch between the two (a bridge) instead of hopping: wall to wall, or floor +# to ceiling. The Bridge and BridgeVertical animations' frames are columns +# exactly that long, always drawn the same way round and centred between the +# surfaces (see _align_press_wall_sprite). +const BRIDGE_FRAME = 10 # Wall to wall. Drawn upright, so it's turned a quarter. +const BRIDGE_VERTICAL_FRAME = 11 # Floor to ceiling. +const BRIDGE_GAP = 32.0 # One tile. +const BRIDGE_GAP_TOLERANCE = 1.5 + ############### ## Variables ## ############### @@ -135,6 +145,14 @@ var timeSpentSqueezingIntoTube := 0.0 var tubeLayers: Array[TileMapLayer] = [] # TileMapLayers whose tiles can be tubes. var hasFoundTubeLayers := false +# Stretched across a one-tile gap between two walls, or a floor and a ceiling. +# We're stuck to neither as far as the rest of the movement code knows; holding +# towards one for HOLD_TIME lets go of the other (see _update_bridge). +var isBridging := false +var bridgeAxis := Vector2.RIGHT # RIGHT between walls, DOWN between floor and ceiling. +var bridgeHoldSide := 0.0 # Which way along bridgeAxis we're holding (1, -1), or 0. +var timeSpentLeavingBridge := 0.0 + var carriedItem: CarryItem = null # The item riding in our center, or null. Tubes drop it. ########### @@ -186,7 +204,11 @@ func _ready() -> void: # they reform as from the sprite's offset, and that must not carry the shift. func _align_press_wall_sprite() -> void: var targetPosition := spriteBasePosition - if sprite.frame == PRESS_WALL_FRAME: + if sprite.frame == BRIDGE_FRAME or sprite.frame == BRIDGE_VERTICAL_FRAME: + # The sprite's offset lifts it off the surface we're on. Undo that so the + # column sits centred on us, between the surfaces. + targetPosition -= sprite.offset.rotated(sprite.rotation).round() + elif sprite.frame == PRESS_WALL_FRAME: # Towards the frame's right (away from its wall), turned with the sprite. var awayFromWall := Vector2(-1.0 if sprite.flip_h else 1.0, 0.0).rotated(sprite.rotation).round() targetPosition += awayFromWall * PRESS_WALL_SPRITE_SHIFT @@ -204,6 +226,9 @@ func _physics_process(delta: float) -> void: if isWrapping: _update_wrap(delta) return + if isBridging: + _update_bridge(delta, moveInput) + return tubeReentryCooldown = maxf(tubeReentryCooldown - delta, 0.0) var wasInAir := (_get_surface_normal() == Vector2.ZERO) @@ -224,6 +249,8 @@ func _physics_process(delta: float) -> void: _update_vertical_movement(delta, moveInput) _update_floor_hop(delta, moveInput) _update_horizontal_movement(delta, moveInput) + if isBridging: # Just started one. + return _hold_at_edge(delta) var wasOnWall := (isStickingToWall and not is_on_floor()) @@ -273,6 +300,15 @@ func _update_facing(moveInput: Vector2) -> void: # Facts the AnimationTree's state machine reads to pick an animation (see the # transitions' advance expressions in player.tscn). func _update_animation_conditions(moveInput: Vector2) -> void: + if isBridging: + # Only "not isBridging" leaves the Bridge state, but keep the rest quiet anyway. + isOnSurface = true + isCrawling = false + isHoldingAtEdge = false + isPressingIntoSurface = false + isPressingWall = false + isReachingAway = false + return isOnSurface = _get_surface_normal() != Vector2.ZERO isPressingWall = _get_pressed_wall_direction(moveInput) != Vector2.ZERO isCrawling = ((moveInput.x != 0.0 and (isStickingToCeiling or is_on_floor())) @@ -308,6 +344,8 @@ func _update_ceiling_letting_go(delta: float, moveInput: Vector2) -> void: velocity.y = -CEILING_STICK_SPEED return + if _try_begin_bridge(Vector2.DOWN): + return isStickingToCeiling = false var floorDistance := _get_hop_distance(Vector2.DOWN) if floorDistance >= 0.0: @@ -324,6 +362,8 @@ func _update_floor_hop(delta: float, moveInput: Vector2) -> void: if timeSpentHoldingUpOnFloor >= HOLD_TIME: timeSpentHoldingUpOnFloor = 0.0 + if _try_begin_bridge(Vector2.UP): + return velocity.y = -_get_hop_speed(_get_hop_height()) func _update_horizontal_movement(delta: float, moveInput: Vector2) -> void: @@ -337,8 +377,8 @@ func _update_horizontal_movement(delta: float, moveInput: Vector2) -> void: elif not isHoppingAcross: velocity.x = _air_steer(velocity.x, moveInput.x, delta) -# Holding away (not climbing) for HOLD_TIME hops to the opposite wall if one's -# in reach, otherwise lets go. +# Holding away (not climbing) for HOLD_TIME bridges to the opposite wall if it's +# one tile across, hops to it if it's further but in reach, otherwise lets go. func _update_wall_letting_go(delta: float, moveInput: Vector2) -> void: var pressingAwayFromWall := moveInput.x * wallNormalX > 0 if not pressingAwayFromWall: @@ -354,6 +394,9 @@ func _update_wall_letting_go(delta: float, moveInput: Vector2) -> void: velocity.x = -wallNormalX * WALL_STICK_SPEED return + if _try_begin_bridge(Vector2(wallNormalX, 0)): + return + var wallDistance := _get_hop_distance(Vector2(wallNormalX, 0)) if wallDistance >= 0.0: _hop_across(wallDistance) @@ -541,6 +584,115 @@ func _hop_across(distance: float) -> void: isHoppingAcross = true +# ---- Bridges ---- + +# Bridges from the surface we're on (facing `normal`) to one facing it +# BRIDGE_GAP across, if there is one. Returns whether it did. +func _try_begin_bridge(normal: Vector2) -> bool: + var surfaces := _find_bridge_surfaces(normal) + if surfaces.is_empty(): + return false + _begin_bridge(normal, surfaces.own, surfaces.other) + return true + + +# Where the surface we're on (facing `normal`) and the one across from it are, +# if that's BRIDGE_GAP away and faces us all across our width: {own, other} +# (points on each). Otherwise empty. +func _find_bridge_surfaces(normal: Vector2) -> Dictionary: + var reach := BRIDGE_GAP + BRIDGE_GAP_TOLERANCE + var across := normal.orthogonal() + var radius := _get_radius() + var surfaces := {} + for offset: float in [-radius * 0.5, 0.0, radius * 0.5]: + var from := global_position + across * offset + var ownHit := _cast_ray(from, from - normal * reach) + var otherHit := _cast_ray(from, from + normal * reach) + if ownHit.is_empty() or otherHit.is_empty(): + return {} + if ownHit.normal.dot(normal) < 0.9 or otherHit.normal.dot(-normal) < 0.9: + return {} + var gap := absf((otherHit.position - ownHit.position).dot(normal)) + if absf(gap - BRIDGE_GAP) > BRIDGE_GAP_TOLERANCE: + return {} + surfaces = {own = ownHit.position, other = otherHit.position} + return surfaces + + +func _begin_bridge(normal: Vector2, ownPoint: Vector2, otherPoint: Vector2) -> void: + isBridging = true + bridgeAxis = Vector2.RIGHT if absf(normal.x) > 0.5 else Vector2.DOWN + isStickingToWall = false + isStickingToCeiling = false + isHoppingAcross = false + timeSpentUnstickingWall = 0.0 + timeSpentUnstickingCeiling = 0.0 + timeSpentHoldingUpOnFloor = 0.0 + timeSpentHoldingEdge = 0.0 + timeSpentLeavingBridge = 0.0 + # We're still holding away from the surface we left, towards the one across. + # Keep holding and we cross over to it after HOLD_TIME, like any other hold. + bridgeHoldSide = signf(normal.dot(bridgeAxis)) + velocity = Vector2.ZERO + + # Halfway between the surfaces, staying put the other way. + var middle := (ownPoint + otherPoint) / 2.0 + global_position += bridgeAxis * (middle - global_position).dot(bridgeAxis) + # Always drawn the same way round, whichever surface we came from, unflipped. + # Between walls, turned as for the left wall, which puts the frame's flat + # side on top. Between floor and ceiling, upright. + sprite.flip_h = false + if bridgeAxis == Vector2.RIGHT: + _set_sprite_rotation(_rotation_for(Vector2.RIGHT)) + _show_pose(&"Bridge", BRIDGE_FRAME) + else: + _set_sprite_rotation(0.0) + _show_pose(&"BridgeVertical", BRIDGE_VERTICAL_FRAME) + + +# Holding towards either surface for HOLD_TIME sticks us to it and lets go of +# the other: left or right between walls, up or down between floor and ceiling. +func _update_bridge(delta: float, moveInput: Vector2) -> void: + velocity = Vector2.ZERO + var inputDirection := Vector2(moveInput.x, -moveInput.y) # Up is negative y. + var side := signf(inputDirection.dot(bridgeAxis)) + if side != 0.0 and side == bridgeHoldSide: + timeSpentLeavingBridge += delta + else: + timeSpentLeavingBridge = 0.0 + bridgeHoldSide = side + + if timeSpentLeavingBridge >= HOLD_TIME: + _leave_bridge(bridgeAxis * side, delta) + + +# Sticks to the surface in `direction` from us. +func _leave_bridge(direction: Vector2, delta: float) -> void: + isBridging = false + timeSpentLeavingBridge = 0.0 + var normal := -direction + var gap := BRIDGE_GAP / 2.0 - _get_radius() + _set_sprite_rotation(_rotation_for(normal)) + _settle_onto_surface(normal, gap, delta) + velocity = Vector2.ZERO + # Holding towards the surface we're now on isn't holding away from it, so + # there's nothing to ignore until release. + ignoreWallUnstickUntilRelease = false + ignoreCeilingUnstickUntilRelease = false + _show_pose(&"Idle", REST_FRAME) + + +# Jumps straight to an animation state, showing its frame now rather than when +# the AnimationTree next updates. Our body jumped too: don't smooth it. +func _show_pose(state: StringName, frame: int) -> void: + reset_physics_interpolation() + sprite.frame = frame + _align_press_wall_sprite() + _update_animation_conditions(Vector2.ZERO) + var playback: AnimationNodeStateMachinePlayback = animationTree.get("parameters/playback") + playback.start(state) + + # ---- Edges ---- # Pressing into the surface near an edge starts wrapping around it. A direction diff --git a/Characters/player.tscn b/Characters/player.tscn index 0e603f6..67177f0 100755 --- a/Characters/player.tscn +++ b/Characters/player.tscn @@ -12,6 +12,40 @@ [sub_resource type="Gradient" id="Gradient_splat"] colors = PackedColorArray(0, 0.6666667, 0, 1, 0, 1, 0.50980395, 1) +[sub_resource type="Animation" id="Animation_Bridge"] +resource_name = "Bridge" +length = 0.2 +loop_mode = 1 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [10] +} + +[sub_resource type="Animation" id="Animation_BridgeVertical"] +resource_name = "BridgeVertical" +length = 0.2 +loop_mode = 1 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [11] +} + [sub_resource type="Animation" id="Animation_Crouch"] resource_name = "Crouch" length = 0.4 @@ -79,6 +113,23 @@ tracks/0/keys = { "values": [0, 1, 2, 1] } +[sub_resource type="Animation" id="Animation_PressWall"] +resource_name = "PressWall" +length = 0.2 +loop_mode = 1 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [9] +} + [sub_resource type="Animation" id="Animation_4m0gv"] length = 0.001 tracks/0/type = "value" @@ -127,25 +178,10 @@ tracks/0/keys = { "values": [4, 5] } -[sub_resource type="Animation" id="Animation_PressWall"] -resource_name = "PressWall" -length = 0.2 -loop_mode = 1 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("Sprite2D:frame") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [9] -} - [sub_resource type="AnimationLibrary" id="AnimationLibrary_slime"] _data = { +&"Bridge": SubResource("Animation_Bridge"), +&"BridgeVertical": SubResource("Animation_BridgeVertical"), &"Crouch": SubResource("Animation_Crouch"), &"Idle": SubResource("Animation_Idle"), &"InAir": SubResource("Animation_InAir"), @@ -156,6 +192,12 @@ _data = { &"ReachY": SubResource("Animation_ReachY") } +[sub_resource type="AnimationNodeAnimation" id="AnimNode_Bridge"] +animation = &"Bridge" + +[sub_resource type="AnimationNodeAnimation" id="AnimNode_BridgeVertical"] +animation = &"BridgeVertical" + [sub_resource type="AnimationNodeAnimation" id="AnimNode_Crouch"] animation = &"Crouch" @@ -348,7 +390,19 @@ advance_expression = "isReachingAway and not isCrawling and not isHoldingAtEdge advance_mode = 2 advance_expression = "isPressingIntoSurface and not isCrawling and not isHoldingAtEdge" +[sub_resource type="AnimationNodeStateMachineTransition" id="Transition_Bridge_Idle"] +advance_mode = 2 +advance_expression = "not isBridging" + +[sub_resource type="AnimationNodeStateMachineTransition" id="Transition_BridgeVertical_Idle"] +advance_mode = 2 +advance_expression = "not isBridging" + [sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_slime"] +states/BridgeVertical/node = SubResource("AnimNode_BridgeVertical") +states/BridgeVertical/position = Vector2(1150, 300) +states/Bridge/node = SubResource("AnimNode_Bridge") +states/Bridge/position = Vector2(900, 300) states/Crouch/node = SubResource("AnimNode_Crouch") states/Crouch/position = Vector2(150, 300) states/Idle/node = SubResource("AnimNode_Idle") @@ -364,7 +418,7 @@ states/ReachX/position = Vector2(650, 300) states/ReachY/node = SubResource("AnimNode_ReachY") states/ReachY/position = Vector2(400, 300) states/Start/position = Vector2(150, 100) -transitions = ["Start", "Idle", SubResource("Transition_Start"), "Idle", "Moving", SubResource("Transition_Idle_Moving"), "Idle", "InAir", SubResource("Transition_Idle_InAir"), "Idle", "ReachX", SubResource("Transition_Idle_ReachX"), "Idle", "ReachY", SubResource("Transition_Idle_ReachY"), "Idle", "Crouch", SubResource("Transition_Idle_Crouch"), "Moving", "Idle", SubResource("Transition_Moving_Idle"), "Moving", "InAir", SubResource("Transition_Moving_InAir"), "Moving", "ReachX", SubResource("Transition_Moving_ReachX"), "Moving", "ReachY", SubResource("Transition_Moving_ReachY"), "Moving", "Crouch", SubResource("Transition_Moving_Crouch"), "InAir", "Idle", SubResource("Transition_InAir_Idle"), "InAir", "Moving", SubResource("Transition_InAir_Moving"), "InAir", "ReachX", SubResource("Transition_InAir_ReachX"), "InAir", "ReachY", SubResource("Transition_InAir_ReachY"), "InAir", "Crouch", SubResource("Transition_InAir_Crouch"), "ReachX", "Idle", SubResource("Transition_ReachX_Idle"), "ReachX", "Moving", SubResource("Transition_ReachX_Moving"), "ReachX", "InAir", SubResource("Transition_ReachX_InAir"), "ReachX", "ReachY", SubResource("Transition_ReachX_ReachY"), "ReachX", "Crouch", SubResource("Transition_ReachX_Crouch"), "ReachY", "Idle", SubResource("Transition_ReachY_Idle"), "ReachY", "Moving", SubResource("Transition_ReachY_Moving"), "ReachY", "InAir", SubResource("Transition_ReachY_InAir"), "ReachY", "ReachX", SubResource("Transition_ReachY_ReachX"), "ReachY", "Crouch", SubResource("Transition_ReachY_Crouch"), "Crouch", "Idle", SubResource("Transition_Crouch_Idle"), "Crouch", "Moving", SubResource("Transition_Crouch_Moving"), "Crouch", "InAir", SubResource("Transition_Crouch_InAir"), "Crouch", "ReachX", SubResource("Transition_Crouch_ReachX"), "Crouch", "ReachY", SubResource("Transition_Crouch_ReachY"), "Idle", "PressWall", SubResource("Transition_Idle_PressWall"), "Moving", "PressWall", SubResource("Transition_Moving_PressWall"), "InAir", "PressWall", SubResource("Transition_InAir_PressWall"), "ReachX", "PressWall", SubResource("Transition_ReachX_PressWall"), "ReachY", "PressWall", SubResource("Transition_ReachY_PressWall"), "Crouch", "PressWall", SubResource("Transition_Crouch_PressWall"), "PressWall", "Idle", SubResource("Transition_PressWall_Idle"), "PressWall", "Moving", SubResource("Transition_PressWall_Moving"), "PressWall", "InAir", SubResource("Transition_PressWall_InAir"), "PressWall", "ReachX", SubResource("Transition_PressWall_ReachX"), "PressWall", "ReachY", SubResource("Transition_PressWall_ReachY"), "PressWall", "Crouch", SubResource("Transition_PressWall_Crouch")] +transitions = ["Start", "Idle", SubResource("Transition_Start"), "Idle", "Moving", SubResource("Transition_Idle_Moving"), "Idle", "InAir", SubResource("Transition_Idle_InAir"), "Idle", "ReachX", SubResource("Transition_Idle_ReachX"), "Idle", "ReachY", SubResource("Transition_Idle_ReachY"), "Idle", "Crouch", SubResource("Transition_Idle_Crouch"), "Moving", "Idle", SubResource("Transition_Moving_Idle"), "Moving", "InAir", SubResource("Transition_Moving_InAir"), "Moving", "ReachX", SubResource("Transition_Moving_ReachX"), "Moving", "ReachY", SubResource("Transition_Moving_ReachY"), "Moving", "Crouch", SubResource("Transition_Moving_Crouch"), "InAir", "Idle", SubResource("Transition_InAir_Idle"), "InAir", "Moving", SubResource("Transition_InAir_Moving"), "InAir", "ReachX", SubResource("Transition_InAir_ReachX"), "InAir", "ReachY", SubResource("Transition_InAir_ReachY"), "InAir", "Crouch", SubResource("Transition_InAir_Crouch"), "ReachX", "Idle", SubResource("Transition_ReachX_Idle"), "ReachX", "Moving", SubResource("Transition_ReachX_Moving"), "ReachX", "InAir", SubResource("Transition_ReachX_InAir"), "ReachX", "ReachY", SubResource("Transition_ReachX_ReachY"), "ReachX", "Crouch", SubResource("Transition_ReachX_Crouch"), "ReachY", "Idle", SubResource("Transition_ReachY_Idle"), "ReachY", "Moving", SubResource("Transition_ReachY_Moving"), "ReachY", "InAir", SubResource("Transition_ReachY_InAir"), "ReachY", "ReachX", SubResource("Transition_ReachY_ReachX"), "ReachY", "Crouch", SubResource("Transition_ReachY_Crouch"), "Crouch", "Idle", SubResource("Transition_Crouch_Idle"), "Crouch", "Moving", SubResource("Transition_Crouch_Moving"), "Crouch", "InAir", SubResource("Transition_Crouch_InAir"), "Crouch", "ReachX", SubResource("Transition_Crouch_ReachX"), "Crouch", "ReachY", SubResource("Transition_Crouch_ReachY"), "Idle", "PressWall", SubResource("Transition_Idle_PressWall"), "Moving", "PressWall", SubResource("Transition_Moving_PressWall"), "InAir", "PressWall", SubResource("Transition_InAir_PressWall"), "ReachX", "PressWall", SubResource("Transition_ReachX_PressWall"), "ReachY", "PressWall", SubResource("Transition_ReachY_PressWall"), "Crouch", "PressWall", SubResource("Transition_Crouch_PressWall"), "PressWall", "Idle", SubResource("Transition_PressWall_Idle"), "PressWall", "Moving", SubResource("Transition_PressWall_Moving"), "PressWall", "InAir", SubResource("Transition_PressWall_InAir"), "PressWall", "ReachX", SubResource("Transition_PressWall_ReachX"), "PressWall", "ReachY", SubResource("Transition_PressWall_ReachY"), "PressWall", "Crouch", SubResource("Transition_PressWall_Crouch"), "Bridge", "Idle", SubResource("Transition_Bridge_Idle"), "BridgeVertical", "Idle", SubResource("Transition_BridgeVertical_Idle")] graph_offset = Vector2(0, -150) [node name="Player" type="CharacterBody2D" unique_id=150873177] @@ -374,7 +428,7 @@ landSounds = Array[AudioStream]([ExtResource("3_land1"), ExtResource("4_land2"), [node name="Sprite2D" type="Sprite2D" parent="." unique_id=402647784] texture = ExtResource("5_4m0gv") offset = Vector2(0, -6) -hframes = 10 +hframes = 12 [node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1379572123] shape = SubResource("CircleShape2D_eovys") diff --git a/Levels/test_level.tscn b/Levels/test_level.tscn index 130d482..ff548aa 100755 --- a/Levels/test_level.tscn +++ b/Levels/test_level.tscn @@ -9,14 +9,14 @@ [node name="TestLevel" type="Node2D" unique_id=1824208737] [node name="Player" parent="." unique_id=150873177 instance=ExtResource("1_ormqy")] -position = Vector2(329, 266) +position = Vector2(139, 307) [node name="TileMapLayer" type="TileMapLayer" parent="." unique_id=459516426] -tile_map_data = PackedByteArray("AAAAAA4AAAAAAAAAAAABAA4AAAAAAAAAAAACAA4AAAAAAAAAAAADAA4AAAAAAAAAAAAEAA4AAAAAAAAAAAAFAA4AAAAAAAAAAAAGAA4AAAAAAAAAAAAHAA4AAAAAAAAAAAAIAA4AAAAAAAAAAAAJAA4AAAAAAAAAAAAKAA4AAAAAAAAAAAALAA4AAAAAAAAAAAAMAA4AAAAAAAAAAAANAA4AAAAAAAAAAAAOAA4AAAAAAAAAAAAPAA4AAAAAAAAAAAAQAA4AAAAAAAAAAAARAA4AAAAAAAAAAAASAA4AAAAAAAAAAAATAA4A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AAAARAAgAAAAAAAAAAAASAAgAAAAAAAAAAAAPAAkAAAADAAAAAAAOAAoAAAAAAAAAAAARAAoAAAAAAAAAAAARAAkAAAABAAAAAAAQAAkAAAABAAAAAAAQAAoAAAAAAAAAAAAPAAoAAAACAAAAAAASAAkAAAABAAAAAAASAAoAAAAAAAAAAAASAAsAAAAAAAAAAAAOAAkAAAABAAAAAAAKAAIAAAAAAAAAAAALAAIAAAAAAAAAAAAMAAIAAAAAAAAAAAANAAIAAAAAAAAAAAANAAEAAAABAAAAAQAOAAEAAAABAAAAAQAPAAEAAAABAAAAAQAQAAEAAAABAAAAAQARAAEAAAABAAAAAQASAAEAAAAAAAEAAQASAAIAAAACAAAAAQASAAMAAAACAAAAAQASAAQAAAACAAAAAQASAAUAAAACAAAAAQAKAAcAAAAAAAAAAAAKAAYAAAAAAAAAAAAKAAUAAAAAAAAAAAAKAAQAAAAAAAAAAAAKAAMAAAAAAAAAAAAIAAEAAAAAAAAAAAAIAAIAAAAAAAAAAAAJAAIAAAACAAAAAAAJAAQAAAAAAAAAAAAIAAQAAAAAAAAAAAAGAAQAAAAAAAAAAAAFAAQAAAAAAAAAAAAEAAQAAAAAAAAAAAADAAQAAAAAAAAAAAACAAQAAAAAAAAAAAAEAAUAAAAAAAAAAAAEAAYAAAAAAAAAAAA=") tile_set = ExtResource("2_4k50d") [node name="CarryItem" parent="." unique_id=1653302373 instance=ExtResource("5_item")] -position = Vector2(380, 230) +position = Vector2(369, 44) [node name="PauseMenu" parent="." unique_id=904032161 instance=ExtResource("3_pause")] visible = false