From 9c3987bf21c55ac772e86f5563d0f45b579ab5cf Mon Sep 17 00:00:00 2001 From: Xterminate1818 <50534996+Xterminate1818@users.noreply.github.com> Date: Fri, 17 Jul 2020 10:33:15 -0500 Subject: [PATCH] --- characters/Player.tscn | 91 ++++++++++++++++++++++++++++++++++++++++ levels/test.tscn | 12 ++++++ project.godot | 94 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 197 insertions(+) create mode 100644 characters/Player.tscn create mode 100644 levels/test.tscn create mode 100644 project.godot diff --git a/characters/Player.tscn b/characters/Player.tscn new file mode 100644 index 0000000..a037df9 --- /dev/null +++ b/characters/Player.tscn @@ -0,0 +1,91 @@ +[gd_scene load_steps=9 format=2] + +[ext_resource path="res://script/player.gd" type="Script" id=1] +[ext_resource path="res://script/PlayerStateMachine.gd" type="Script" id=2] +[ext_resource path="res://art/WizardM.png" type="Texture" id=3] + +[sub_resource type="OccluderPolygon2D" id=2] +polygon = PoolVector2Array( -7, 0, -7, -2, -6, -2, -6, -3, -5, -3, -5, -5, -6, -5, -6, -10, -7, -10, -7, -12, -6, -12, -6, -19, -4, -19, -4, -18, -3, -18, -3, -17, 1, -17, 1, -16, 3, -16, 3, -15, 4, -15, 4, -14, 5, -14, 5, -13, 6, -13, 6, -12, 7, -12, 7, -10, 6, -10, 6, -9, 5, -9, 5, -8, 6, -8, 6, -4, 5, -4, 5, 0, -7, 0 ) + +[sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 6, 6 ) + +[sub_resource type="Animation" id=3] +resource_name = "Idle" +length = 0.8 +loop = true +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 0.2, 0.4, 0.6 ), +"transitions": PoolRealArray( 1, 1, 1, 1 ), +"update": 1, +"values": [ 0, 1, 2, 3 ] +} + +[sub_resource type="Animation" id=5] +resource_name = "Jumping" +length = 0.01 +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ 11 ] +} + +[sub_resource type="Animation" id=4] +resource_name = "Running" +length = 0.4 +loop = true +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 0.1, 0.2, 0.3 ), +"transitions": PoolRealArray( 1, 1, 1, 1 ), +"update": 1, +"values": [ 4, 5, 6, 7 ] +} + +[node name="Player" type="KinematicBody2D"] +script = ExtResource( 1 ) + +[node name="PlayerStateMachine" type="Node" parent="."] +script = ExtResource( 2 ) + +[node name="Sprite" type="Sprite" parent="."] +position = Vector2( 0, -12 ) +texture = ExtResource( 3 ) +vframes = 3 +hframes = 4 + +[node name="LightOccluder2D" type="LightOccluder2D" parent="Sprite"] +visible = false +position = Vector2( 0, 12 ) +occluder = SubResource( 2 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +position = Vector2( 0, -6 ) +shape = SubResource( 1 ) + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +anims/Idle = SubResource( 3 ) +anims/Jumping = SubResource( 5 ) +anims/Running = SubResource( 4 ) + +[node name="CoyoteTimer" type="Timer" parent="."] +wait_time = 0.1 +one_shot = true diff --git a/levels/test.tscn b/levels/test.tscn new file mode 100644 index 0000000..e953946 --- /dev/null +++ b/levels/test.tscn @@ -0,0 +1,12 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://characters/Player.tscn" type="PackedScene" id=1] +[ext_resource path="res://meta/DungeonTilemap.tscn" type="PackedScene" id=2] + +[node name="Node2D" type="Node2D"] + +[node name="Player" parent="." instance=ExtResource( 1 )] +position = Vector2( 102, 154 ) + +[node name="TileMap" parent="." instance=ExtResource( 2 )] +tile_data = PoolIntArray( -1, 0, 8, -65536, 0, 10, -65535, 0, 10, -65534, 0, 10, -65533, 0, 10, -65532, 0, 10, -65531, 0, 10, -65530, 0, 10, -65529, 0, 10, -65528, 0, 10, -65527, 0, 10, -65526, 0, 10, -65525, 0, 10, -65524, 0, 10, -65523, 0, 10, -65522, 0, 10, -65521, 0, 10, -65520, 0, 10, -65519, 0, 10, -65518, 0, 10, -65517, 0, 10, -65516, 0, 11, 65535, 0, 65544, 0, 0, 131078, 1, 0, 196617, 2, 0, 196617, 3, 0, 196617, 4, 0, 196617, 5, 0, 196617, 6, 0, 196617, 7, 0, 196617, 8, 0, 196617, 9, 0, 196617, 10, 0, 196617, 11, 0, 196617, 12, 0, 196617, 13, 0, 196617, 14, 0, 196617, 15, 0, 196617, 16, 0, 196617, 17, 0, 196617, 18, 0, 196617, 19, 0, 131077, 20, 0, 131083, 131071, 0, 65544, 65536, 0, 131083, 65555, 0, 65544, 65556, 0, 131083, 196607, 0, 65544, 131072, 0, 131083, 131091, 0, 65544, 131092, 0, 131083, 262143, 0, 65544, 196608, 0, 131083, 196627, 0, 65544, 196628, 0, 131083, 327679, 0, 65544, 262144, 0, 131083, 262163, 0, 65544, 262164, 0, 131083, 393215, 0, 65544, 327680, 0, 131083, 327699, 0, 65544, 327700, 0, 131083, 458751, 0, 65544, 393216, 0, 131083, 393235, 0, 65544, 393236, 0, 131083, 524287, 0, 65544, 458752, 0, 131083, 458771, 0, 65544, 458772, 0, 131083, 589823, 0, 65544, 524288, 0, 131083, 524307, 0, 65544, 524308, 0, 131083, 655359, 0, 65544, 589824, 0, 131083, 589843, 0, 65544, 589844, 0, 131083, 720895, 0, 65544, 655360, 0, 65542, 655361, 0, 10, 655362, 0, 10, 655363, 0, 10, 655364, 0, 10, 655365, 0, 10, 655366, 0, 10, 655367, 0, 10, 655368, 0, 10, 655369, 0, 10, 655370, 0, 10, 655371, 0, 10, 655372, 0, 10, 655373, 0, 10, 655374, 0, 10, 655375, 0, 10, 655376, 0, 10, 655377, 0, 10, 655378, 0, 10, 655379, 0, 65541, 655380, 0, 131083, 786431, 0, 196616, 720896, 0, 196617, 720897, 0, 196617, 720898, 0, 196617, 720899, 0, 196617, 720900, 0, 196617, 720901, 0, 196617, 720902, 0, 196617, 720903, 0, 196617, 720904, 0, 196617, 720905, 0, 196617, 720906, 0, 196617, 720907, 0, 196617, 720908, 0, 196617, 720909, 0, 196617, 720910, 0, 196617, 720911, 0, 196617, 720912, 0, 196617, 720913, 0, 196617, 720914, 0, 196617, 720915, 0, 196617, 720916, 0, 196619 ) diff --git a/project.godot b/project.godot new file mode 100644 index 0000000..5b055e0 --- /dev/null +++ b/project.godot @@ -0,0 +1,94 @@ +; Engine configuration file. +; It's best edited using the editor UI and not directly, +; since the parameters that go here are not all obvious. +; +; Format: +; [section] ; section goes between [] +; param=value ; assign values to parameters + +config_version=4 + +_global_script_classes=[ { +"base": "Node", +"class": "StateMachine", +"language": "GDScript", +"path": "res://script/StateMachine.gd" +} ] +_global_script_class_icons={ +"StateMachine": "" +} + +[application] + +config/name="Gamejam" +run/main_scene="res://levels/test.tscn" +config/icon="res://icon.png" + +[autoload] + +UserData="*res://addons/github-integration/scripts/user_data.gd" +IconLoaderGithub="*res://addons/github-integration/scripts/IconLoaderGithub.gd" +RestHandler="*res://addons/github-integration/scripts/RestHandler.gd" + +[display] + +window/size/width=320 +window/size/height=180 +window/size/test_width=1280 +window/size/test_height=720 +window/stretch/mode="2d" +window/stretch/aspect="keep" + +[editor_plugins] + +enabled=PoolStringArray( "github-integration" ) + +[importer_defaults] + +texture={ +"compress/bptc_ldr": 0, +"compress/hdr_mode": 0, +"compress/lossy_quality": 0.7, +"compress/mode": 0, +"compress/normal_map": 0, +"detect_3d": false, +"flags/anisotropic": false, +"flags/filter": false, +"flags/mipmaps": false, +"flags/repeat": 0, +"flags/srgb": 2, +"process/HDR_as_SRGB": false, +"process/fix_alpha_border": true, +"process/invert_color": false, +"process/premult_alpha": false, +"size_limit": 0, +"stream": false, +"svg/scale": 1.0 +} + +[input] + +up={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null) + ] +} +down={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"unicode":0,"echo":false,"script":null) + ] +} +left={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"unicode":0,"echo":false,"script":null) + ] +} +right={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"unicode":0,"echo":false,"script":null) + ] +} + +[rendering] + +environment/default_environment="res://default_env.tres"