add player movement
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://cy3dg66pt8abt"]
|
||||
[gd_scene load_steps=3 format=3 uid="uid://cy3dg66pt8abt"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://3wumh6kpw3ai" path="res://scenes/player.tscn" id="1_uwrxv"]
|
||||
|
||||
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_uwrxv"]
|
||||
|
||||
[node name="Game" type="Node2D"]
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource("1_uwrxv")]
|
||||
@@ -10,3 +12,9 @@ position = Vector2(33, 49)
|
||||
[node name="Camera2D" type="Camera2D" parent="."]
|
||||
position = Vector2(39, 27)
|
||||
zoom = Vector2(4, 4)
|
||||
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="."]
|
||||
position = Vector2(1, 61)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
|
||||
shape = SubResource("WorldBoundaryShape2D_uwrxv")
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://3wumh6kpw3ai"]
|
||||
[gd_scene load_steps=9 format=3 uid="uid://3wumh6kpw3ai"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://pc081i405fo4" path="res://assets/sprites/knight.png" id="1_3vyb7"]
|
||||
[ext_resource type="Script" uid="uid://dkpsredq14h2l" path="res://scripts/player.gd" id="1_g2els"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_g2els"]
|
||||
atlas = ExtResource("1_3vyb7")
|
||||
@@ -42,6 +43,9 @@ animations = [{
|
||||
radius = 5.0
|
||||
|
||||
[node name="Player" type="CharacterBody2D"]
|
||||
script = ExtResource("1_g2els")
|
||||
speed = 130.0
|
||||
jump_velocity = -300.0
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
position = Vector2(0, -12)
|
||||
|
||||
Reference in New Issue
Block a user