Update code and ref
This commit is contained in:
parent
f54aa28f8e
commit
25994d0b98
4 changed files with 4 additions and 6 deletions
|
@ -3,8 +3,7 @@ extends Sprite2D
|
||||||
@export_group("Travel settings")
|
@export_group("Travel settings")
|
||||||
@export_file("*.tscn") var NextScene:String
|
@export_file("*.tscn") var NextScene:String
|
||||||
@export_enum("LEFT","RIGHT","UP","DOWN") var Travel :int
|
@export_enum("LEFT","RIGHT","UP","DOWN") var Travel :int
|
||||||
@export var Spawn_Position:Vector2 = Vector2(0,0
|
@export var Spawn_Position:Vector2 = Vector2(0,0) #TODO: Extrapoler la position suivante en fonction de l'enum Travel
|
||||||
)
|
|
||||||
var NextSceneLoaded
|
var NextSceneLoaded
|
||||||
|
|
||||||
func _on_area_2d_area_entered(area):
|
func _on_area_2d_area_entered(area):
|
||||||
|
|
|
@ -26,6 +26,7 @@ func changeSkin(NewSkin:CanvasTexture,_NewHat:CanvasTexture = null):
|
||||||
Sprite.texture = CurrentHat
|
Sprite.texture = CurrentHat
|
||||||
|
|
||||||
func get_input():
|
func get_input():
|
||||||
|
#TODO: Need to freeze the player while he is traveling
|
||||||
var directionX = Input.get_axis("move_left", "move_right")
|
var directionX = Input.get_axis("move_left", "move_right")
|
||||||
var directionY = Input.get_axis("move_up", "move_down")
|
var directionY = Input.get_axis("move_up", "move_down")
|
||||||
var mouseDirectionX = Input.get_axis("mouse_left", "mouse_right")
|
var mouseDirectionX = Input.get_axis("mouse_left", "mouse_right")
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
[ext_resource type="PackedScene" uid="uid://domcpxdf6lqpb" path="res://prefab/free_sticker.tscn" id="4_2tdya"]
|
[ext_resource type="PackedScene" uid="uid://domcpxdf6lqpb" path="res://prefab/free_sticker.tscn" id="4_2tdya"]
|
||||||
[ext_resource type="Texture2D" uid="uid://cxharyv0ajr37" path="res://textures/atlas/DioramaEntrance_All_01_SPRT.png" id="4_lgnnp"]
|
[ext_resource type="Texture2D" uid="uid://cxharyv0ajr37" path="res://textures/atlas/DioramaEntrance_All_01_SPRT.png" id="4_lgnnp"]
|
||||||
[ext_resource type="PackedScene" uid="uid://do65rgg0p2plt" path="res://core/Door.tscn" id="4_yvr3q"]
|
[ext_resource type="PackedScene" uid="uid://do65rgg0p2plt" path="res://core/Door.tscn" id="4_yvr3q"]
|
||||||
[ext_resource type="Texture2D" uid="uid://dggavne4ueche" path="res://extracted/Texture2D/Tree_Field_01_SPRT.png" id="5_lwnej"]
|
[ext_resource type="Texture2D" uid="uid://dggavne4ueche" path="res://textures/sprites/Tree_Field_01_SPRT.png" id="5_lwnej"]
|
||||||
[ext_resource type="PackedScene" uid="uid://6ww1g2enfdx3" path="res://prefab/solid_sticker.tscn" id="6_k22qa"]
|
[ext_resource type="PackedScene" uid="uid://6ww1g2enfdx3" path="res://prefab/solid_sticker.tscn" id="6_k22qa"]
|
||||||
[ext_resource type="Texture2D" uid="uid://chuv25pm2vqen" path="res://textures/atlas/Rocks_All_01_SPRT.png" id="7_pykf8"]
|
[ext_resource type="Texture2D" uid="uid://chuv25pm2vqen" path="res://textures/atlas/Rocks_All_01_SPRT.png" id="7_pykf8"]
|
||||||
[ext_resource type="Texture2D" uid="uid://b366mcexlko72" path="res://textures/atlas/LogsAndWood_All_01_SPRT.png" id="8_ugxkt"]
|
[ext_resource type="Texture2D" uid="uid://b366mcexlko72" path="res://textures/atlas/LogsAndWood_All_01_SPRT.png" id="8_ugxkt"]
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
[gd_scene load_steps=4 format=3 uid="uid://bddcriwo55x8k"]
|
[gd_scene load_steps=3 format=3 uid="uid://bddcriwo55x8k"]
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://b366mcexlko72" path="res://textures/atlas/LogsAndWood_All_01_SPRT.png" id="1_lvitw"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://clqvgh6qmglue" path="res://core/bridgeNode.tscn" id="2_te8ug"]
|
[ext_resource type="PackedScene" uid="uid://clqvgh6qmglue" path="res://core/bridgeNode.tscn" id="2_te8ug"]
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_nkyhf"]
|
[sub_resource type="AtlasTexture" id="AtlasTexture_nkyhf"]
|
||||||
atlas = ExtResource("1_lvitw")
|
|
||||||
region = Rect2(72, 1392, 216, 272)
|
region = Rect2(72, 1392, 216, 272)
|
||||||
|
|
||||||
[node name="WoodenBridge" type="Sprite2D"]
|
[node name="WoodenBridge" type="Sprite2D"]
|
||||||
|
|
Loading…
Reference in a new issue