Tile map added

This commit is contained in:
bip 2024-07-29 19:49:17 -04:00
parent c8753c98a6
commit c550f9acaa
13 changed files with 337 additions and 80 deletions

View File

@ -172,4 +172,4 @@ Anim={
"zfar": 4000.01,
"znear": 0.05
}
selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17140/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9462/@VSplitContainer@9281/@HSplitContainer@9283/@HSplitContainer@9285/@Control@9286/@SubViewportContainer@9287/@SubViewport@9288/Game/CharacterBody2D")])
selected_nodes=Array[NodePath]([])

View File

@ -8,7 +8,7 @@ Anim={
"grid_snap_active": false,
"grid_step": Vector2(8, 8),
"grid_visibility": 1,
"ofs": Vector2(-151.112, -74.4505),
"ofs": Vector2(-105.653, -53.0822),
"primary_grid_step": Vector2i(8, 8),
"show_edit_locks": true,
"show_guides": true,
@ -32,7 +32,7 @@ Anim={
"snap_rotation_step": 0.261799,
"snap_scale": false,
"snap_scale_step": 0.1,
"zoom": 4.23785
"zoom": 5.65685
}
3D={
"fov": 70.01,
@ -172,4 +172,4 @@ Anim={
"zfar": 4000.01,
"znear": 0.05
}
selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17140/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9462/@VSplitContainer@9281/@HSplitContainer@9283/@HSplitContainer@9285/@Control@9286/@SubViewportContainer@9287/@SubViewport@9288/Game/CharacterBody2D")])
selected_nodes=Array[NodePath]([])

View File

@ -8,7 +8,7 @@ Anim={
"grid_snap_active": false,
"grid_step": Vector2(8, 8),
"grid_visibility": 1,
"ofs": Vector2(-45.0723, -30.4543),
"ofs": Vector2(-107.204, -81.946),
"primary_grid_step": Vector2i(8, 8),
"show_edit_locks": true,
"show_guides": true,
@ -32,7 +32,7 @@ Anim={
"snap_rotation_step": 0.261799,
"snap_scale": false,
"snap_scale_step": 0.1,
"zoom": 4.48985
"zoom": 2.11893
}
3D={
"fov": 70.01,
@ -172,4 +172,4 @@ Anim={
"zfar": 4000.01,
"znear": 0.05
}
selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17140/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9462/@VSplitContainer@9281/@HSplitContainer@9283/@HSplitContainer@9285/@Control@9286/@SubViewportContainer@9287/@SubViewport@9288/Game/CharacterBody2D")])
selected_nodes=Array[NodePath]([])

View File

@ -13,13 +13,13 @@ dock_split_2=0
dock_split_3=0
dock_hsplit_1=0
dock_hsplit_2=397
dock_hsplit_3=-270
dock_hsplit_3=-407
dock_hsplit_4=0
dock_filesystem_split=0
dock_filesystem_display_mode=0
dock_filesystem_file_sort=0
dock_filesystem_file_list_display_mode=1
dock_filesystem_selected_paths=PackedStringArray("res://Graphics/Box.png")
dock_filesystem_selected_paths=PackedStringArray("res://Graphics/Terrain (32x32).png")
dock_filesystem_uncollapsed_paths=PackedStringArray("Favorites", "res://", "res://scripts/", "res://scenes/", "res://Graphics/")
dock_3="Scene,Import"
dock_4="FileSystem"
@ -28,11 +28,11 @@ dock_5="Inspector,Node,History"
[EditorNode]
open_scenes=PackedStringArray("res://scenes/game.tscn", "res://scenes/character.tscn", "res://scenes/bullet.tscn", "res://scenes/crate.tscn")
current_scene="res://scenes/crate.tscn"
center_split_offset=0
current_scene="res://scenes/game.tscn"
center_split_offset=-333
selected_default_debugger_tab_idx=0
selected_main_editor_idx=0
selected_bottom_panel_item=0
selected_bottom_panel_item=12
[ScriptEditor]

View File

@ -1,5 +1,5 @@
ea4bc82a6ad023ab7ee23ee620429895
::res://::1722291863
::res://::1722296613
icon.svg::CompressedTexture2D::9114977118871582245::1722291766::1722291766::1::::<><>::
README.md::TextFile::-1::1722291766::0::1::::<><>::
::res://Graphics/::1722291766
@ -8,13 +8,13 @@ Player Idle 48x48.png::CompressedTexture2D::1237550707578490798::1722291766::172
player jump 48x48.png::CompressedTexture2D::529369218674153276::1722291766::1722291766::1::::<><>::
player run 48x48.png::CompressedTexture2D::2605915106209310501::1722291766::1722291766::1::::<><>::
Terrain (32x32).png::CompressedTexture2D::592944405755909384::1722291766::1722291766::1::::<><>::
::res://scenes/::1722291766
bullet.tscn::PackedScene::6880909734590904373::1722291766::0::1::::<><>::res://scripts/bullet.gd
character.tscn::PackedScene::451838158579532324::1722291766::0::1::::<><>::res://scripts/CharacterBody2D.gd<>uid://rvqjq6nksgag::::res://Graphics/Player Idle 48x48.png<>uid://bdelbnqhy0kn2::::res://Graphics/player run 48x48.png<>uid://hsovsssoucoy::::res://Graphics/player jump 48x48.png
crate.tscn::PackedScene::6328092438971191794::1722291766::0::1::::<><>::uid://ihg1aef42mnn::::res://Graphics/Box.png
game.tscn::PackedScene::1738196330916037717::1722291766::0::1::::<><>::res://scripts/gamecontroller.gd<>uid://go4yc8hfo1gq::::res://scenes/character.tscn<>uid://iphyceyp7aay::::res://Graphics/Terrain (32x32).png<>res://scripts/Trigger.gd<>uid://cwfm01fpdmr1k::::res://scenes/crate.tscn
::res://scripts/::1722291766
bullet.gd::GDScript::-1::1722291766::0::1::::<>Area2D<>::
CharacterBody2D.gd::GDScript::-1::1722291766::0::1::::<>CharacterBody2D<>::
::res://scenes/::1722294131
bullet.tscn::PackedScene::6880909734590904373::1722294131::0::1::::<><>::res://scripts/bullet.gd
character.tscn::PackedScene::451838158579532324::1722294131::0::1::::<><>::res://scripts/CharacterBody2D.gd<>uid://rvqjq6nksgag::::res://Graphics/Player Idle 48x48.png<>uid://bdelbnqhy0kn2::::res://Graphics/player run 48x48.png<>uid://hsovsssoucoy::::res://Graphics/player jump 48x48.png
crate.tscn::PackedScene::6328092438971191794::1722294131::0::1::::<><>::uid://ihg1aef42mnn::::res://Graphics/Box.png
game.tscn::PackedScene::1738196330916037717::1722294131::0::1::::<><>::res://scripts/gamecontroller.gd<>uid://go4yc8hfo1gq::::res://scenes/character.tscn<>uid://iphyceyp7aay::::res://Graphics/Terrain (32x32).png<>res://scripts/Trigger.gd<>uid://cwfm01fpdmr1k::::res://scenes/crate.tscn
::res://scripts/::1722294131
bullet.gd::GDScript::-1::1722293063::0::1::::<>Area2D<>::
CharacterBody2D.gd::GDScript::-1::1722294131::0::1::::<>CharacterBody2D<>::
gamecontroller.gd::GDScript::-1::1722291766::0::1::::<>Node2D<>::
Trigger.gd::GDScript::-1::1722291766::0::1::::<>Area2D<>::

View File

@ -1,4 +1 @@
res://scenes/game.tscn
res://scenes/character.tscn
res://scenes/bullet.tscn
res://scenes/crate.tscn

View File

@ -8,7 +8,7 @@ Anim={
"grid_snap_active": false,
"grid_step": Vector2(8, 8),
"grid_visibility": 1,
"ofs": Vector2(-192.5, -79),
"ofs": Vector2(-267.191, 13.1037),
"primary_grid_step": Vector2i(8, 8),
"show_edit_locks": true,
"show_guides": true,
@ -32,7 +32,7 @@ Anim={
"snap_rotation_step": 0.261799,
"snap_scale": false,
"snap_scale_step": 0.1,
"zoom": 2.0
"zoom": 1.05946
}
3D={
"fov": 70.01,
@ -172,4 +172,4 @@ Anim={
"zfar": 4000.01,
"znear": 0.05
}
selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17140/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9462/@VSplitContainer@9281/@HSplitContainer@9283/@HSplitContainer@9285/@Control@9286/@SubViewportContainer@9287/@SubViewport@9288/Game/CharacterBody2D")])
selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17140/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9462/@VSplitContainer@9281/@HSplitContainer@9283/@HSplitContainer@9285/@Control@9286/@SubViewportContainer@9287/@SubViewport@9288/Game/TileMap")])

View File

@ -1,5 +1,5 @@
[folding]
node_unfolds=[NodePath("."), PackedStringArray("Transform"), NodePath("TileMap"), PackedStringArray("tile_set"), NodePath("StaticBody2D"), PackedStringArray("Transform"), NodePath("level/groundblock"), PackedStringArray("Transform"), NodePath("level/groundblock/CollisionShape2D"), PackedStringArray("Transform"), NodePath("level/groundblock4"), PackedStringArray("Transform"), NodePath("level/groundblock4/CollisionShape2D"), PackedStringArray("Transform"), NodePath("level/groundblock2"), PackedStringArray("Transform"), NodePath("level/groundblock2/CollisionShape2D"), PackedStringArray("Transform"), NodePath("level/groundblock3"), PackedStringArray("Transform"), NodePath("level/groundblock3/CollisionShape2D"), PackedStringArray("Transform"), NodePath("Area2D"), PackedStringArray("Transform")]
resource_unfolds=["res://scenes/game.tscn::TileSet_p8gjw", PackedStringArray(), "res://scenes/game.tscn::WorldBoundaryShape2D_3u4a8", PackedStringArray("Resource"), "res://scenes/game.tscn::RectangleShape2D_cq7kj", PackedStringArray("Resource"), "res://scenes/game.tscn::CircleShape2D_x8qck", PackedStringArray("Resource")]
nodes_folded=[NodePath("StaticBody2D"), NodePath("level"), NodePath("CharacterBody2D"), NodePath("Area2D")]
node_unfolds=[NodePath("."), PackedStringArray("Transform"), NodePath("TileMap"), PackedStringArray("tile_set"), NodePath("StaticBody2D"), PackedStringArray("Transform"), NodePath("Area2D"), PackedStringArray("Transform")]
resource_unfolds=["res://scenes/game.tscn::TileSet_p8gjw", PackedStringArray("terrain_set__array", "terrain_set_0/terrain__array"), "res://scenes/game.tscn::WorldBoundaryShape2D_3u4a8", PackedStringArray("Resource"), "res://scenes/game.tscn::CircleShape2D_x8qck", PackedStringArray("Resource")]
nodes_folded=[NodePath("StaticBody2D"), NodePath("CharacterBody2D"), NodePath("Area2D")]

View File

@ -8,7 +8,7 @@ tile_source_sort=0
run_live_debug=true
run_reload_scripts=true
run_debug_collisions=false
run_debug_collisions=true
[recent_files]

View File

@ -17,11 +17,11 @@ state={
state={
"bookmarks": PackedInt32Array(),
"breakpoints": PackedInt32Array(),
"column": 33,
"column": 29,
"folded_lines": Array[int]([]),
"h_scroll_position": 0,
"row": 67,
"scroll_position": 0.0,
"row": 56,
"scroll_position": 39.0,
"selection": false,
"syntax_highlighter": "GDScript"
}
@ -31,10 +31,10 @@ state={
state={
"bookmarks": PackedInt32Array(),
"breakpoints": PackedInt32Array(),
"column": 14,
"column": 15,
"folded_lines": Array[int]([]),
"h_scroll_position": 0,
"row": 13,
"h_scroll_position": 28,
"row": 2,
"scroll_position": 0.0,
"selection": false,
"syntax_highlighter": "GDScript"

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=11 format=3 uid="uid://y083suj12rld"]
[gd_scene load_steps=10 format=3 uid="uid://y083suj12rld"]
[ext_resource type="Script" path="res://scripts/gamecontroller.gd" id="1_77wyw"]
[ext_resource type="PackedScene" uid="uid://go4yc8hfo1gq" path="res://scenes/character.tscn" id="2_64ccm"]
@ -10,62 +10,347 @@
texture = ExtResource("2_74wn8")
texture_region_size = Vector2i(32, 32)
0:0/0 = 0
0:0/0/terrain_set = 0
0:0/0/terrain = 0
0:0/0/terrains_peering_bit/right_side = 0
0:0/0/terrains_peering_bit/bottom_right_corner = 0
0:0/0/terrains_peering_bit/bottom_side = 0
1:0/0 = 0
1:0/0/terrain_set = 0
1:0/0/terrain = 0
1:0/0/terrains_peering_bit/right_side = 0
1:0/0/terrains_peering_bit/bottom_right_corner = 0
1:0/0/terrains_peering_bit/bottom_side = 0
1:0/0/terrains_peering_bit/bottom_left_corner = 0
1:0/0/terrains_peering_bit/left_side = 0
2:0/0 = 0
2:0/0/terrain_set = 0
2:0/0/terrain = 0
2:0/0/terrains_peering_bit/bottom_side = 0
2:0/0/terrains_peering_bit/bottom_left_corner = 0
2:0/0/terrains_peering_bit/left_side = 0
4:0/0 = 0
4:0/0/terrain_set = 0
4:0/0/terrain = 0
4:0/0/terrains_peering_bit/bottom_side = 0
6:0/0 = 0
6:0/0/terrain_set = 0
6:0/0/terrain = 0
6:0/0/terrains_peering_bit/right_side = 0
6:0/0/terrains_peering_bit/bottom_side = 0
6:0/0/terrains_peering_bit/bottom_left_corner = 0
6:0/0/terrains_peering_bit/left_side = 0
6:0/0/terrains_peering_bit/top_left_corner = 0
6:0/0/terrains_peering_bit/top_side = 0
6:0/0/terrains_peering_bit/top_right_corner = 0
7:0/0 = 0
7:0/0/terrain_set = 0
7:0/0/terrain = 0
7:0/0/terrains_peering_bit/right_side = 0
7:0/0/terrains_peering_bit/bottom_right_corner = 0
7:0/0/terrains_peering_bit/bottom_side = 0
7:0/0/terrains_peering_bit/left_side = 0
7:0/0/terrains_peering_bit/top_left_corner = 0
7:0/0/terrains_peering_bit/top_side = 0
7:0/0/terrains_peering_bit/top_right_corner = 0
9:0/0 = 0
9:0/0/terrain_set = 0
9:0/0/terrain = 0
9:0/0/terrains_peering_bit/right_side = 0
9:0/0/terrains_peering_bit/bottom_right_corner = 0
9:0/0/terrains_peering_bit/bottom_side = 0
9:0/0/terrains_peering_bit/bottom_left_corner = 0
9:0/0/terrains_peering_bit/left_side = 0
9:0/0/terrains_peering_bit/top_side = 0
10:0/0 = 0
10:0/0/terrain_set = 0
10:0/0/terrain = 0
10:0/0/terrains_peering_bit/right_side = 0
10:0/0/terrains_peering_bit/bottom_side = 0
10:0/0/terrains_peering_bit/bottom_left_corner = 0
10:0/0/terrains_peering_bit/left_side = 0
10:0/0/terrains_peering_bit/top_left_corner = 0
10:0/0/terrains_peering_bit/top_side = 0
12:0/0 = 0
12:0/0/terrain_set = 0
12:0/0/terrain = 0
12:0/0/terrains_peering_bit/right_side = 0
12:0/0/terrains_peering_bit/bottom_right_corner = 0
12:0/0/terrains_peering_bit/bottom_side = 0
12:0/0/terrains_peering_bit/left_side = 0
12:0/0/terrains_peering_bit/top_side = 0
13:0/0 = 0
13:0/0/terrain_set = 0
13:0/0/terrain = 0
13:0/0/terrains_peering_bit/right_side = 0
13:0/0/terrains_peering_bit/bottom_side = 0
13:0/0/terrains_peering_bit/bottom_left_corner = 0
13:0/0/terrains_peering_bit/left_side = 0
13:0/0/terrains_peering_bit/top_side = 0
15:0/0 = 0
15:0/0/terrain_set = 0
15:0/0/terrain = 0
15:0/0/terrains_peering_bit/right_side = 0
15:0/0/terrains_peering_bit/bottom_side = 0
15:0/0/terrains_peering_bit/left_side = 0
15:0/0/terrains_peering_bit/top_side = 0
0:1/0 = 0
0:1/0/terrain_set = 0
0:1/0/terrain = 0
0:1/0/terrains_peering_bit/right_side = 0
0:1/0/terrains_peering_bit/bottom_right_corner = 0
0:1/0/terrains_peering_bit/bottom_side = 0
0:1/0/terrains_peering_bit/top_side = 0
0:1/0/terrains_peering_bit/top_right_corner = 0
1:1/0 = 0
1:1/0/terrain_set = 0
1:1/0/terrain = 0
1:1/0/terrains_peering_bit/right_side = 0
1:1/0/terrains_peering_bit/bottom_right_corner = 0
1:1/0/terrains_peering_bit/bottom_side = 0
1:1/0/terrains_peering_bit/bottom_left_corner = 0
1:1/0/terrains_peering_bit/left_side = 0
1:1/0/terrains_peering_bit/top_left_corner = 0
1:1/0/terrains_peering_bit/top_side = 0
1:1/0/terrains_peering_bit/top_right_corner = 0
2:1/0 = 0
2:1/0/terrain_set = 0
2:1/0/terrain = 0
2:1/0/terrains_peering_bit/bottom_side = 0
2:1/0/terrains_peering_bit/bottom_left_corner = 0
2:1/0/terrains_peering_bit/left_side = 0
2:1/0/terrains_peering_bit/top_left_corner = 0
2:1/0/terrains_peering_bit/top_side = 0
4:1/0 = 0
4:1/0/terrain_set = 0
4:1/0/terrain = 0
4:1/0/terrains_peering_bit/bottom_side = 0
4:1/0/terrains_peering_bit/top_side = 0
6:1/0 = 0
6:1/0/terrain_set = 0
6:1/0/terrain = 0
6:1/0/terrains_peering_bit/right_side = 0
6:1/0/terrains_peering_bit/bottom_right_corner = 0
6:1/0/terrains_peering_bit/bottom_side = 0
6:1/0/terrains_peering_bit/bottom_left_corner = 0
6:1/0/terrains_peering_bit/left_side = 0
6:1/0/terrains_peering_bit/top_left_corner = 0
6:1/0/terrains_peering_bit/top_side = 0
7:1/0 = 0
7:1/0/terrain_set = 0
7:1/0/terrain = 0
7:1/0/terrains_peering_bit/right_side = 0
7:1/0/terrains_peering_bit/bottom_right_corner = 0
7:1/0/terrains_peering_bit/bottom_side = 0
7:1/0/terrains_peering_bit/bottom_left_corner = 0
7:1/0/terrains_peering_bit/left_side = 0
7:1/0/terrains_peering_bit/top_side = 0
7:1/0/terrains_peering_bit/top_right_corner = 0
9:1/0 = 0
9:1/0/terrain_set = 0
9:1/0/terrain = 0
9:1/0/terrains_peering_bit/right_side = 0
9:1/0/terrains_peering_bit/bottom_right_corner = 0
9:1/0/terrains_peering_bit/bottom_side = 0
9:1/0/terrains_peering_bit/left_side = 0
9:1/0/terrains_peering_bit/top_side = 0
9:1/0/terrains_peering_bit/top_right_corner = 0
10:1/0 = 0
10:1/0/terrain_set = 0
10:1/0/terrain = 0
10:1/0/terrains_peering_bit/right_side = 0
10:1/0/terrains_peering_bit/bottom_side = 0
10:1/0/terrains_peering_bit/left_side = 0
10:1/0/terrains_peering_bit/top_left_corner = 0
10:1/0/terrains_peering_bit/top_side = 0
10:1/0/terrains_peering_bit/top_right_corner = 0
12:1/0 = 0
12:1/0/terrain_set = 0
12:1/0/terrain = 0
12:1/0/terrains_peering_bit/right_side = 0
12:1/0/terrains_peering_bit/bottom_side = 0
12:1/0/terrains_peering_bit/left_side = 0
12:1/0/terrains_peering_bit/top_side = 0
12:1/0/terrains_peering_bit/top_right_corner = 0
13:1/0 = 0
13:1/0/terrain_set = 0
13:1/0/terrain = 0
13:1/0/terrains_peering_bit/right_side = 0
13:1/0/terrains_peering_bit/bottom_side = 0
13:1/0/terrains_peering_bit/left_side = 0
13:1/0/terrains_peering_bit/top_left_corner = 0
13:1/0/terrains_peering_bit/top_side = 0
15:1/0 = 0
15:1/0/terrain_set = 0
15:1/0/terrain = 0
15:1/0/terrains_peering_bit/right_side = 0
15:1/0/terrains_peering_bit/bottom_side = 0
15:1/0/terrains_peering_bit/bottom_left_corner = 0
15:1/0/terrains_peering_bit/left_side = 0
15:1/0/terrains_peering_bit/top_side = 0
15:1/0/terrains_peering_bit/top_right_corner = 0
16:1/0 = 0
16:1/0/terrain_set = 0
16:1/0/terrain = 0
16:1/0/terrains_peering_bit/right_side = 0
16:1/0/terrains_peering_bit/bottom_right_corner = 0
16:1/0/terrains_peering_bit/bottom_side = 0
16:1/0/terrains_peering_bit/left_side = 0
16:1/0/terrains_peering_bit/top_left_corner = 0
16:1/0/terrains_peering_bit/top_side = 0
0:2/0 = 0
0:2/0/terrain_set = 0
0:2/0/terrain = 0
0:2/0/terrains_peering_bit/right_side = 0
0:2/0/terrains_peering_bit/top_side = 0
0:2/0/terrains_peering_bit/top_right_corner = 0
1:2/0 = 0
1:2/0/terrain_set = 0
1:2/0/terrain = 0
1:2/0/terrains_peering_bit/right_side = 0
1:2/0/terrains_peering_bit/left_side = 0
1:2/0/terrains_peering_bit/top_left_corner = 0
1:2/0/terrains_peering_bit/top_side = 0
1:2/0/terrains_peering_bit/top_right_corner = 0
2:2/0 = 0
2:2/0/terrain_set = 0
2:2/0/terrain = 0
2:2/0/terrains_peering_bit/left_side = 0
2:2/0/terrains_peering_bit/top_left_corner = 0
2:2/0/terrains_peering_bit/top_side = 0
4:2/0 = 0
4:2/0/terrain_set = 0
4:2/0/terrain = 0
4:2/0/terrains_peering_bit/top_side = 0
6:3/0 = 0
6:3/0/terrain_set = 0
6:3/0/terrain = 0
6:3/0/terrains_peering_bit/right_side = 0
6:3/0/terrains_peering_bit/bottom_side = 0
6:3/0/terrains_peering_bit/top_side = 0
6:3/0/terrains_peering_bit/top_right_corner = 0
7:3/0 = 0
7:3/0/terrain_set = 0
7:3/0/terrain = 0
7:3/0/terrains_peering_bit/bottom_side = 0
7:3/0/terrains_peering_bit/left_side = 0
7:3/0/terrains_peering_bit/top_left_corner = 0
7:3/0/terrains_peering_bit/top_side = 0
9:3/0 = 0
9:3/0/terrain_set = 0
9:3/0/terrain = 0
9:3/0/terrains_peering_bit/right_side = 0
9:3/0/terrains_peering_bit/bottom_right_corner = 0
9:3/0/terrains_peering_bit/bottom_side = 0
9:3/0/terrains_peering_bit/bottom_left_corner = 0
9:3/0/terrains_peering_bit/left_side = 0
10:3/0 = 0
10:3/0/terrain_set = 0
10:3/0/terrain = 0
10:3/0/terrains_peering_bit/right_side = 0
10:3/0/terrains_peering_bit/bottom_right_corner = 0
10:3/0/terrains_peering_bit/bottom_side = 0
10:3/0/terrains_peering_bit/bottom_left_corner = 0
10:3/0/terrains_peering_bit/left_side = 0
12:3/0 = 0
12:3/0/terrain_set = 0
12:3/0/terrain = 0
12:3/0/terrains_peering_bit/right_side = 0
12:3/0/terrains_peering_bit/bottom_side = 0
12:3/0/terrains_peering_bit/top_side = 0
13:3/0 = 0
13:3/0/terrain_set = 0
13:3/0/terrain = 0
13:3/0/terrains_peering_bit/bottom_side = 0
13:3/0/terrains_peering_bit/left_side = 0
15:3/0 = 0
15:3/0/terrain_set = 0
15:3/0/terrain = 0
15:3/0/terrains_peering_bit/right_side = 0
15:3/0/terrains_peering_bit/bottom_side = 0
16:3/0 = 0
16:3/0/terrain_set = 0
16:3/0/terrain = 0
16:3/0/terrains_peering_bit/bottom_side = 0
16:3/0/terrains_peering_bit/left_side = 0
0:4/0 = 0
0:4/0/terrain_set = 0
0:4/0/terrain = 0
0:4/0/terrains_peering_bit/right_side = 0
1:4/0 = 0
1:4/0/terrain_set = 0
1:4/0/terrain = 0
1:4/0/terrains_peering_bit/right_side = 0
1:4/0/terrains_peering_bit/left_side = 0
2:4/0 = 0
2:4/0/terrain_set = 0
2:4/0/terrain = 0
2:4/0/terrains_peering_bit/left_side = 0
4:4/0 = 0
4:4/0/terrain_set = 0
4:4/0/terrain = 0
6:4/0 = 0
6:4/0/terrain_set = 0
6:4/0/terrain = 0
6:4/0/terrains_peering_bit/right_side = 0
6:4/0/terrains_peering_bit/bottom_right_corner = 0
6:4/0/terrains_peering_bit/bottom_side = 0
6:4/0/terrains_peering_bit/top_side = 0
7:4/0 = 0
7:4/0/terrain_set = 0
7:4/0/terrain = 0
7:4/0/terrains_peering_bit/bottom_side = 0
7:4/0/terrains_peering_bit/bottom_left_corner = 0
7:4/0/terrains_peering_bit/left_side = 0
7:4/0/terrains_peering_bit/top_side = 0
9:4/0 = 0
9:4/0/terrain_set = 0
9:4/0/terrain = 0
9:4/0/terrains_peering_bit/right_side = 0
9:4/0/terrains_peering_bit/left_side = 0
9:4/0/terrains_peering_bit/top_left_corner = 0
9:4/0/terrains_peering_bit/top_side = 0
9:4/0/terrains_peering_bit/top_right_corner = 0
10:4/0 = 0
10:4/0/terrain_set = 0
10:4/0/terrain = 0
10:4/0/terrains_peering_bit/right_side = 0
10:4/0/terrains_peering_bit/left_side = 0
10:4/0/terrains_peering_bit/top_left_corner = 0
10:4/0/terrains_peering_bit/top_side = 0
10:4/0/terrains_peering_bit/top_right_corner = 0
12:4/0 = 0
12:4/0/terrain_set = 0
12:4/0/terrain = 0
12:4/0/terrains_peering_bit/right_side = 0
12:4/0/terrains_peering_bit/left_side = 0
12:4/0/terrains_peering_bit/top_side = 0
13:4/0 = 0
13:4/0/terrain_set = 0
13:4/0/terrain = 0
13:4/0/terrains_peering_bit/bottom_side = 0
13:4/0/terrains_peering_bit/left_side = 0
13:4/0/terrains_peering_bit/top_side = 0
15:4/0 = 0
15:4/0/terrain_set = 0
15:4/0/terrain = 0
15:4/0/terrains_peering_bit/right_side = 0
15:4/0/terrains_peering_bit/top_side = 0
16:4/0 = 0
16:4/0/terrain_set = 0
16:4/0/terrain = 0
16:4/0/terrains_peering_bit/left_side = 0
16:4/0/terrains_peering_bit/top_side = 0
[sub_resource type="TileSet" id="TileSet_p8gjw"]
tile_size = Vector2i(32, 32)
terrain_set_0/mode = 0
terrain_set_0/terrain_0/name = "ground"
terrain_set_0/terrain_0/color = Color(0.5, 0.34375, 0.25, 1)
sources/0 = SubResource("TileSetAtlasSource_vd3un")
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_3u4a8"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_cq7kj"]
size = Vector2(91, 20)
[sub_resource type="CircleShape2D" id="CircleShape2D_x8qck"]
radius = 60.2993
@ -75,7 +360,7 @@ script = ExtResource("1_77wyw")
[node name="TileMap" type="TileMap" parent="."]
tile_set = SubResource("TileSet_p8gjw")
format = 2
layer_0/tile_data = PackedInt32Array(917501, 0, 4, 917502, 0, 4, 917503, 0, 4, 851968, 0, 4, 851969, 0, 4, 851970, 0, 4, 851971, 0, 4, 851972, 0, 4, 851973, 0, 4, 851974, 0, 4, 851975, 0, 4, 720898, 0, 4, 720899, 0, 4, 720900, 0, 4, 655371, 0, 4, 655372, 0, 4, 655373, 0, 4, 589839, 0, 4, 589840, 0, 4, 589841, 0, 4)
layer_0/tile_data = PackedInt32Array(917501, 0, 4, 917502, 65536, 4, 917503, 65536, 4, 851968, 65536, 4, 851969, 0, 0, 851970, 655360, 3, 851971, 65536, 0, 851972, 65536, 4, 851973, 0, 4, 851974, 0, 4, 851975, 0, 4, 720898, 0, 4, 720899, 0, 4, 720900, 0, 4, 655371, 0, 4, 655372, 0, 4, 655373, 0, 4, 589839, 0, 4, 589840, 0, 4, 589841, 0, 4, 262145, 65536, 1, 327681, 65536, 2, 393218, 0, 1, 458754, 0, 2, 458755, 458752, 0, 524291, 0, 2, 524292, 589824, 4, 524293, 65536, 2, 524294, 655360, 4, 524295, 131072, 2, 458759, 393216, 0, 458760, 65536, 2, 458761, 655360, 4, 458762, 65536, 2, 458763, 131072, 2, 458764, 65536, 4, 458765, 786432, 0, 524301, 0, 2, 524302, 131072, 2, 458766, 131072, 0, 393229, 262144, 1, 327693, 1048576, 3, 327692, 0, 4, 393227, 131072, 0, 393225, 65536, 0, 393226, 65536, 0, 393224, 589824, 3, 458758, 65536, 1, 393223, 65536, 0, 458757, 65536, 1, 393221, 589824, 3, 393220, 393216, 1, 393219, 65536, 1, 327683, 65536, 1, 458756, 65536, 1, 393222, 65536, 0, 327682, 458752, 0, 262146, 65536, 1, 262147, 65536, 1, 196611, 655360, 3, 196612, 131072, 0, 262148, 131072, 1, 327684, 131072, 1, 262144, 458752, 0, 196610, 65536, 0, 196609, 589824, 3, 196608, 589824, 0, 262143, 0, 0, 327679, 0, 2, 327680, 0, 2, 983046, 131072, 4, 983045, 65536, 4, 983044, 0, 4, 917507, 131072, 2, 917506, 65536, 2, 917505, 0, 2, 851964, 131072, 4, 851963, 65536, 4, 851962, 0, 4, 786425, 131072, 4, 786424, 0, 4)
[node name="StaticBody2D" type="StaticBody2D" parent="."]
position = Vector2(236, 415)
@ -88,39 +373,6 @@ shape = SubResource("WorldBoundaryShape2D_3u4a8")
[node name="level" type="Node2D" parent="."]
[node name="groundblock" type="StaticBody2D" parent="level"]
position = Vector2(114, 362)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="level/groundblock"]
position = Vector2(-1.5, 0)
shape = SubResource("RectangleShape2D_cq7kj")
[node name="groundblock4" type="StaticBody2D" parent="level"]
position = Vector2(91, 430)
scale = Vector2(3.76, 1)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="level/groundblock4"]
position = Vector2(-1.5, 0)
shape = SubResource("RectangleShape2D_cq7kj")
[node name="groundblock2" type="StaticBody2D" parent="level"]
position = Vector2(532, 299)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="level/groundblock2"]
position = Vector2(-1.5, 0)
shape = SubResource("RectangleShape2D_cq7kj")
[node name="groundblock3" type="StaticBody2D" parent="level"]
position = Vector2(401, 331)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="level/groundblock3"]
position = Vector2(-1.5, 0)
shape = SubResource("RectangleShape2D_cq7kj")
[node name="CharacterBody2D" parent="." groups=["player"] instance=ExtResource("2_64ccm")]
position = Vector2(-1, -35)
PUSH_FORCE = 550

View File

@ -41,13 +41,21 @@ func _physics_process(delta):
if Input.is_action_just_pressed("shoot"):
#make a bullet
var myBullet = bullet.instantiate()
var myBullet = bullet.instantiate() #you can only instantiate a scene
#set bullet speed?
#put the bullet at the Marker
owner.add_child(myBullet)
myBullet.transform = marker_right.global_transform
pass
owner.add_child(myBullet) #owner because its adding it to the game and not the character.
#This is important because if the character jumps you don't want the bullet to jump as well.
if not faceLeft:
#facing right
myBullet.transform = marker_right.global_transform
else:
myBullet.transform = marker_left.global_transform
myBullet.setSpeed(-750) #Tim changed it to -750. Magic number. Not sure why.
#remove the pass at the end
# Get the input direction and handle the movement/deceleration.
# As good practice, you should replace UI actions with custom gameplay actions.
var direction = Input.get_axis("ui_left", "ui_right")

View File

@ -10,5 +10,5 @@ func _physics_process(delta):
func _on_body_entered(body):
print("bullet hit something")
if not body.is_in_group("player"):
if not body.is_in_group("player"): #if it hits something other than the player, then disappear
queue_free()