Create character and player scripts, import character tilesets
This commit is contained in:
BIN
misc/icons/alex.png
Normal file
BIN
misc/icons/alex.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 548 B |
40
misc/icons/alex.png.import
Normal file
40
misc/icons/alex.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cv3suwyeusea7"
|
||||
path="res://.godot/imported/alex.png-3a7a90c7c3fd575543a53a824db59ac6.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://misc/icons/alex.png"
|
||||
dest_files=["res://.godot/imported/alex.png-3a7a90c7c3fd575543a53a824db59ac6.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
|
||||
@@ -11,18 +11,51 @@ config_version=5
|
||||
[application]
|
||||
|
||||
config/name="Uni Romantik"
|
||||
run/main_scene="uid://cswpyt34lfdhm"
|
||||
config/features=PackedStringArray("4.6", "Forward Plus")
|
||||
config/icon="res://icon.svg"
|
||||
|
||||
[autoload]
|
||||
|
||||
Global="*uid://bbx4vhgdv7k66"
|
||||
|
||||
[editor]
|
||||
|
||||
version_control/plugin_name="GitPlugin"
|
||||
version_control/autoload_on_startup=true
|
||||
|
||||
[input]
|
||||
|
||||
move_right={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194321,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
move_left={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194319,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":97,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
move_down={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194322,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
move_up={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194320,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[physics]
|
||||
|
||||
3d/physics_engine="Jolt Physics"
|
||||
|
||||
[rendering]
|
||||
|
||||
textures/canvas_textures/default_texture_filter=0
|
||||
rendering_device/driver.windows="d3d12"
|
||||
|
||||
404
scenes/characters/player.tscn
Normal file
404
scenes/characters/player.tscn
Normal file
@@ -0,0 +1,404 @@
|
||||
[gd_scene format=3 uid="uid://cswpyt34lfdhm"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://r703aufphu7c" path="res://tilesets/characters/Adam_16x16.png" id="1_rp718"]
|
||||
[ext_resource type="Script" uid="uid://jknm77cuss33" path="res://scripts/characters/player.gd" id="1_yewv4"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_yewv4"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(288, 32, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_76oj4"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(304, 32, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_dyp2m"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(320, 32, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_atpat"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(336, 32, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_kqtwu"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(352, 32, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_6eyoc"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(368, 32, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_eojnx"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(192, 32, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qgnko"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(208, 32, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_7vyk4"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(224, 32, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_2l4js"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(240, 32, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_jk2m4"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(256, 32, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_xhtjm"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(272, 32, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_k4v7y"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(0, 32, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_xrqxk"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(16, 32, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_g66nw"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(32, 32, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_rpnd8"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(48, 32, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_d6tgn"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(64, 32, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_3wg1y"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(80, 32, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_kmyvj"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(96, 32, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_a2luo"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(112, 32, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_eir2k"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(128, 32, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_inhyd"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(144, 32, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_wqk1x"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(160, 32, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_dm10o"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(176, 32, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_o6auj"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(288, 64, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_j8g38"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(304, 64, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_tswxa"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(320, 64, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_aqa0x"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(336, 64, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_yhyq5"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(352, 64, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_5jukt"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(368, 64, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_vwwfy"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(192, 64, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_dg40j"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(208, 64, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_7xgtv"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(224, 64, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_6rclf"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(240, 64, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_s0anf"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(256, 64, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_s1x7u"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(272, 64, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_c3kfx"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(0, 64, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_hdner"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(16, 64, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_m38kj"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(32, 64, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_v1y1o"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(48, 64, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_hnvwh"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(64, 64, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_rfou0"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(80, 64, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_vkt2s"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(96, 64, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_6ux5t"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(112, 64, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_lvr6b"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(128, 64, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_nktl3"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(144, 64, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_yyjep"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(160, 64, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_6aj6e"]
|
||||
atlas = ExtResource("1_rp718")
|
||||
region = Rect2(176, 64, 16, 32)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_o6auj"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_yewv4")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_76oj4")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_dyp2m")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_atpat")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_kqtwu")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_6eyoc")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"idle_down",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_eojnx")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_qgnko")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_7vyk4")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_2l4js")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_jk2m4")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_xhtjm")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"idle_left",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_k4v7y")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_xrqxk")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_g66nw")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_rpnd8")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_d6tgn")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_3wg1y")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"idle_right",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_kmyvj")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_a2luo")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_eir2k")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_inhyd")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_wqk1x")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_dm10o")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"idle_up",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_o6auj")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_j8g38")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_tswxa")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_aqa0x")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_yhyq5")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_5jukt")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"walk_down",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_vwwfy")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_dg40j")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_7xgtv")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_6rclf")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_s0anf")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_s1x7u")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"walk_left",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_c3kfx")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_hdner")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_m38kj")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_v1y1o")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_hnvwh")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_rfou0")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"walk_right",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_vkt2s")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_6ux5t")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_lvr6b")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_nktl3")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_yyjep")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_6aj6e")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"walk_up",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_j8g38"]
|
||||
|
||||
[node name="Area2D" type="Area2D" unique_id=656053535]
|
||||
script = ExtResource("1_yewv4")
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=1752506839]
|
||||
sprite_frames = SubResource("SpriteFrames_o6auj")
|
||||
animation = &"walk_down"
|
||||
frame_progress = 0.18803427
|
||||
offset = Vector2(0, -6)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=677928771]
|
||||
visible = false
|
||||
shape = SubResource("RectangleShape2D_j8g38")
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="." unique_id=493881910]
|
||||
visible = false
|
||||
position = Vector2(2, -4)
|
||||
zoom = Vector2(6, 6)
|
||||
33
scripts/characters/character.gd
Normal file
33
scripts/characters/character.gd
Normal file
@@ -0,0 +1,33 @@
|
||||
@icon("res://misc/icons/alex.png")
|
||||
class_name Character
|
||||
extends Area2D
|
||||
|
||||
@export var speed = 400
|
||||
var player_state = Global.CHARACTERSTATES.IDLE_UP
|
||||
var velocity = Vector2.ZERO
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
pass
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
velocity = Vector2.ZERO
|
||||
|
||||
# Map animation to player state
|
||||
match player_state:
|
||||
Global.CHARACTERSTATES.WALK_UP: $AnimatedSprite2D.animation = "walk_up"
|
||||
Global.CHARACTERSTATES.WALK_DOWN: $AnimatedSprite2D.animation = "walk_down"
|
||||
Global.CHARACTERSTATES.WALK_RIGHT: $AnimatedSprite2D.animation = "walk_right"
|
||||
Global.CHARACTERSTATES.WALK_LEFT: $AnimatedSprite2D.animation = "walk_left"
|
||||
Global.CHARACTERSTATES.IDLE_UP: $AnimatedSprite2D.animation = "idle_up"
|
||||
Global.CHARACTERSTATES.IDLE_DOWN: $AnimatedSprite2D.animation = "idle_down"
|
||||
Global.CHARACTERSTATES.IDLE_LEFT: $AnimatedSprite2D.animation = "idle_left"
|
||||
Global.CHARACTERSTATES.IDLE_RIGHT: $AnimatedSprite2D.animation = "idle_right"
|
||||
|
||||
func animate():
|
||||
if velocity.length() > 0:
|
||||
velocity = velocity.normalized() * speed
|
||||
$AnimatedSprite2D.play()
|
||||
else:
|
||||
$AnimatedSprite2D.stop()
|
||||
1
scripts/characters/character.gd.uid
Normal file
1
scripts/characters/character.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://brqcdlh20sky0
|
||||
33
scripts/characters/player.gd
Normal file
33
scripts/characters/player.gd
Normal file
@@ -0,0 +1,33 @@
|
||||
extends Character
|
||||
|
||||
var screen_size
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
screen_size = get_viewport_rect().size
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
super._process(delta)
|
||||
|
||||
# Read keyboard input and adjust player state
|
||||
if Input.is_action_pressed("move_right"):
|
||||
player_state = Global.CHARACTERSTATES.WALK_RIGHT
|
||||
velocity.x += 1
|
||||
elif Input.is_action_pressed("move_left"):
|
||||
player_state = Global.CHARACTERSTATES.WALK_LEFT
|
||||
velocity.x -= 1
|
||||
elif Input.is_action_pressed("move_down"):
|
||||
player_state = Global.CHARACTERSTATES.WALK_DOWN
|
||||
velocity.y += 1
|
||||
elif Input.is_action_pressed("move_up"):
|
||||
player_state = Global.CHARACTERSTATES.WALK_UP
|
||||
velocity.y -= 1
|
||||
else:
|
||||
match(player_state):
|
||||
Global.CHARACTERSTATES.WALK_RIGHT: player_state = Global.CHARACTERSTATES.IDLE_RIGHT
|
||||
Global.CHARACTERSTATES.WALK_LEFT: player_state = Global.CHARACTERSTATES.IDLE_LEFT
|
||||
Global.CHARACTERSTATES.WALK_UP: player_state = Global.CHARACTERSTATES.IDLE_UP
|
||||
Global.CHARACTERSTATES.WALK_DOWN: player_state = Global.CHARACTERSTATES.IDLE_DOWN
|
||||
|
||||
super.animate()
|
||||
1
scripts/characters/player.gd.uid
Normal file
1
scripts/characters/player.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://jknm77cuss33
|
||||
12
scripts/global.gd
Normal file
12
scripts/global.gd
Normal file
@@ -0,0 +1,12 @@
|
||||
extends Node
|
||||
|
||||
enum CHARACTERSTATES {
|
||||
WALK_UP,
|
||||
WALK_DOWN,
|
||||
WALK_RIGHT,
|
||||
WALK_LEFT,
|
||||
IDLE_UP,
|
||||
IDLE_DOWN,
|
||||
IDLE_RIGHT,
|
||||
IDLE_LEFT
|
||||
}
|
||||
1
scripts/global.gd.uid
Normal file
1
scripts/global.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bbx4vhgdv7k66
|
||||
BIN
tilesets/characters/Adam_16x16.png
Normal file
BIN
tilesets/characters/Adam_16x16.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
40
tilesets/characters/Adam_16x16.png.import
Normal file
40
tilesets/characters/Adam_16x16.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://r703aufphu7c"
|
||||
path="res://.godot/imported/Adam_16x16.png-53d2b91fc98e9c7b0338bf61df818e5e.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://tilesets/characters/Adam_16x16.png"
|
||||
dest_files=["res://.godot/imported/Adam_16x16.png-53d2b91fc98e9c7b0338bf61df818e5e.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
|
||||
BIN
tilesets/characters/Alex_16x16.png
Normal file
BIN
tilesets/characters/Alex_16x16.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
40
tilesets/characters/Alex_16x16.png.import
Normal file
40
tilesets/characters/Alex_16x16.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://clpcaolwlr37c"
|
||||
path="res://.godot/imported/Alex_16x16.png-a809a318ee9ee5292db58c349740eeb9.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://tilesets/characters/Alex_16x16.png"
|
||||
dest_files=["res://.godot/imported/Alex_16x16.png-a809a318ee9ee5292db58c349740eeb9.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
|
||||
BIN
tilesets/characters/Bruce_16x16.png
Normal file
BIN
tilesets/characters/Bruce_16x16.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
40
tilesets/characters/Bruce_16x16.png.import
Normal file
40
tilesets/characters/Bruce_16x16.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://brjnjvydq02r6"
|
||||
path="res://.godot/imported/Bruce_16x16.png-c2115126528f1f0e6eff4a6a803bc772.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://tilesets/characters/Bruce_16x16.png"
|
||||
dest_files=["res://.godot/imported/Bruce_16x16.png-c2115126528f1f0e6eff4a6a803bc772.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
|
||||
BIN
tilesets/characters/Lucy_16x16.png
Normal file
BIN
tilesets/characters/Lucy_16x16.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
40
tilesets/characters/Lucy_16x16.png.import
Normal file
40
tilesets/characters/Lucy_16x16.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://m3d371idwqpm"
|
||||
path="res://.godot/imported/Lucy_16x16.png-93f907321644cd210f9f485c3b4ffe6e.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://tilesets/characters/Lucy_16x16.png"
|
||||
dest_files=["res://.godot/imported/Lucy_16x16.png-93f907321644cd210f9f485c3b4ffe6e.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
|
||||
Reference in New Issue
Block a user