post-merge fixes
This commit is contained in:
parent
8145f7ad86
commit
e9213d5ecc
|
@ -2,6 +2,7 @@ extends Node2D
|
|||
|
||||
@export var move_speed = 100
|
||||
@export var boundary: Boundary
|
||||
@export var tim_sprite : Sprite2D
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
|
@ -10,11 +11,13 @@ func _ready():
|
|||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
if Input.is_action_pressed("move_right"):
|
||||
position += Vector2.RIGHT * delta * move_speed
|
||||
if position.x > boundary.get_most_right_position():
|
||||
position = Vector2(boundary.get_most_right_position(), position.y)
|
||||
tim_sprite.flip_h = true
|
||||
global_position += Vector2.RIGHT * delta * move_speed
|
||||
if global_position.x > boundary.get_most_right_position():
|
||||
global_position = Vector2(boundary.get_most_right_position(), global_position.y)
|
||||
|
||||
if Input.is_action_pressed("move_left"):
|
||||
position += Vector2.LEFT * delta * move_speed
|
||||
if position.x < boundary.get_most_left_position():
|
||||
position = Vector2(boundary.get_most_left_position(), position.y)
|
||||
tim_sprite.flip_h = false
|
||||
global_position += Vector2.LEFT * delta * move_speed
|
||||
if global_position.x < boundary.get_most_left_position():
|
||||
global_position = Vector2(boundary.get_most_left_position(), global_position.y)
|
||||
|
|
|
@ -2,17 +2,13 @@
|
|||
|
||||
[ext_resource type="Script" path="res://scenes/ingame_scene.gd" id="1_objyc"]
|
||||
[ext_resource type="PackedScene" uid="uid://bkk87o2ooo6at" path="res://ui/overlays/fade_overlay.tscn" id="1_y6ebv"]
|
||||
[ext_resource type="Texture2D" uid="uid://dmelj2qgr8w7k" path="res://icon.svg" id="2_h1yxu"]
|
||||
[ext_resource type="PackedScene" uid="uid://jyv4g54adkmo" path="res://ui/overlays/pause_overlay.tscn" id="3_8o178"]
|
||||
[ext_resource type="Script" path="res://scenes/node_example.gd" id="3_a5686"]
|
||||
[ext_resource type="PackedScene" uid="uid://bx6htkgx23t8v" path="res://scenes/crowd/crowd.tscn" id="4_aeh13"]
|
||||
[ext_resource type="PackedScene" uid="uid://cicyfp5xjvvu4" path="res://scenes/stage.tscn" id="5_borcq"]
|
||||
|
||||
[node name="IngameScene" type="Node2D"]
|
||||
script = ExtResource("1_objyc")
|
||||
|
||||
[node name="NodeExample" type="Sprite2D" parent="." groups=["Persist"]]
|
||||
texture = ExtResource("2_h1yxu")
|
||||
script = ExtResource("3_a5686")
|
||||
|
||||
[node name="UI" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="FadeOverlay" parent="UI" instance=ExtResource("1_y6ebv")]
|
||||
|
@ -23,3 +19,10 @@ visible = false
|
|||
unique_name_in_owner = true
|
||||
process_mode = 2
|
||||
visible = false
|
||||
|
||||
[node name="Crowd" parent="." instance=ExtResource("4_aeh13")]
|
||||
position = Vector2(0, 0)
|
||||
|
||||
[node name="Stage" parent="." instance=ExtResource("5_borcq")]
|
||||
z_index = 10
|
||||
position = Vector2(291, 346)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://dw8tbafwj1rgo"]
|
||||
[gd_scene load_steps=5 format=3 uid="uid://cicyfp5xjvvu4"]
|
||||
|
||||
[ext_resource type="Script" path="res://scenes/Tim.gd" id="1_g3k2b"]
|
||||
[ext_resource type="Texture2D" uid="uid://kq63ictuirhc" path="res://sprites/tim_side.png" id="1_saxit"]
|
||||
|
@ -10,16 +10,20 @@ size = Vector2(600, 200)
|
|||
[node name="Stage" type="Node2D"]
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
scale = Vector2(1, 0.3)
|
||||
texture = SubResource("PlaceholderTexture2D_3hx6l")
|
||||
offset = Vector2(0, -100)
|
||||
|
||||
[node name="Tim" type="Node2D" parent="." node_paths=PackedStringArray("boundary")]
|
||||
[node name="Tim" type="Node2D" parent="." node_paths=PackedStringArray("boundary", "tim_sprite")]
|
||||
script = ExtResource("1_g3k2b")
|
||||
boundary = NodePath("../Boundary")
|
||||
tim_sprite = NodePath("Sprite2D")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="Tim"]
|
||||
position = Vector2(-12, -142)
|
||||
scale = Vector2(0.4, 0.4)
|
||||
texture = ExtResource("1_saxit")
|
||||
offset = Vector2(0, -200)
|
||||
offset = Vector2(0, 50)
|
||||
|
||||
[node name="Boundary" type="Node2D" parent="."]
|
||||
script = ExtResource("2_8p6ir")
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue