week 5 enemies pickups playerdeath
This commit is contained in:
parent
04d49fee67
commit
e4be043988
@ -0,0 +1,3 @@
|
||||
[folding]
|
||||
|
||||
sections_unfolded=PackedStringArray()
|
@ -0,0 +1,175 @@
|
||||
[editor_states]
|
||||
|
||||
Anim={
|
||||
"visible": false
|
||||
}
|
||||
2D={
|
||||
"grid_offset": Vector2(0, 0),
|
||||
"grid_snap_active": false,
|
||||
"grid_step": Vector2(8, 8),
|
||||
"grid_visibility": 1,
|
||||
"ofs": Vector2(-24.2817, -18.5096),
|
||||
"primary_grid_step": Vector2i(8, 8),
|
||||
"show_edit_locks": true,
|
||||
"show_guides": true,
|
||||
"show_helpers": false,
|
||||
"show_origin": true,
|
||||
"show_rulers": true,
|
||||
"show_transformation_gizmos": true,
|
||||
"show_viewport": true,
|
||||
"show_zoom_control": true,
|
||||
"smart_snap_active": false,
|
||||
"snap_guides": true,
|
||||
"snap_node_anchors": true,
|
||||
"snap_node_center": true,
|
||||
"snap_node_parent": true,
|
||||
"snap_node_sides": true,
|
||||
"snap_other_nodes": true,
|
||||
"snap_pixel": true,
|
||||
"snap_relative": false,
|
||||
"snap_rotation": false,
|
||||
"snap_rotation_offset": 0.0,
|
||||
"snap_rotation_step": 0.261799,
|
||||
"snap_scale": false,
|
||||
"snap_scale_step": 0.1,
|
||||
"zoom": 7.12719
|
||||
}
|
||||
3D={
|
||||
"fov": 70.01,
|
||||
"gizmos_status": {
|
||||
"AudioListener3D": 0,
|
||||
"AudioStreamPlayer3D": 0,
|
||||
"CPUParticles3D": 0,
|
||||
"CSGShape3D": 0,
|
||||
"Camera3D": 0,
|
||||
"CollisionObject3D": 0,
|
||||
"CollisionPolygon3D": 0,
|
||||
"CollisionShape3D": 0,
|
||||
"Decal": 0,
|
||||
"FogVolume": 0,
|
||||
"GPUParticles3D": 0,
|
||||
"GPUParticlesCollision3D": 0,
|
||||
"Joint3D": 0,
|
||||
"Light3D": 0,
|
||||
"LightmapGI": 0,
|
||||
"LightmapProbe": 0,
|
||||
"Marker3D": 0,
|
||||
"NavigationLink3D": 0,
|
||||
"NavigationRegion3D": 0,
|
||||
"OccluderInstance3D": 0,
|
||||
"Path3D": 0,
|
||||
"PhysicalBone3D": 0,
|
||||
"RayCast3D": 0,
|
||||
"ReflectionProbe": 0,
|
||||
"ShapeCast3D": 0,
|
||||
"Skeleton3D": 0,
|
||||
"SoftBody3D": 0,
|
||||
"SpringArm3D": 0,
|
||||
"VehicleWheel3D": 0,
|
||||
"VisibleOnScreenNotifier3D": 0,
|
||||
"VoxelGI": 0
|
||||
},
|
||||
"local_coords": false,
|
||||
"preview_sun_env": {
|
||||
"environ_ao_enabled": false,
|
||||
"environ_enabled": true,
|
||||
"environ_energy": 1.0,
|
||||
"environ_gi_enabled": false,
|
||||
"environ_glow_enabled": true,
|
||||
"environ_ground_color": Color(0.2, 0.169, 0.133, 1),
|
||||
"environ_sky_color": Color(0.385, 0.454, 0.55, 1),
|
||||
"environ_tonemap_enabled": true,
|
||||
"sun_color": Color(1, 1, 1, 1),
|
||||
"sun_enabled": true,
|
||||
"sun_energy": 1.0,
|
||||
"sun_max_distance": 100.0,
|
||||
"sun_rotation": Vector2(-1.0472, 2.61799)
|
||||
},
|
||||
"rotate_snap": 15.0,
|
||||
"scale_snap": 10.0,
|
||||
"show_grid": true,
|
||||
"show_origin": true,
|
||||
"snap_enabled": false,
|
||||
"translate_snap": 1.0,
|
||||
"viewport_mode": 1,
|
||||
"viewports": [{
|
||||
"auto_orthogonal": false,
|
||||
"auto_orthogonal_enabled": true,
|
||||
"cinematic_preview": false,
|
||||
"display_mode": 20,
|
||||
"distance": 4.0,
|
||||
"doppler": false,
|
||||
"frame_time": false,
|
||||
"gizmos": true,
|
||||
"half_res": false,
|
||||
"information": false,
|
||||
"listener": true,
|
||||
"lock_rotation": false,
|
||||
"orthogonal": false,
|
||||
"position": Vector3(0, 0, 0),
|
||||
"use_environment": false,
|
||||
"view_type": 0,
|
||||
"x_rotation": 0.5,
|
||||
"y_rotation": -0.5
|
||||
}, {
|
||||
"auto_orthogonal": false,
|
||||
"auto_orthogonal_enabled": true,
|
||||
"cinematic_preview": false,
|
||||
"display_mode": 20,
|
||||
"distance": 4.0,
|
||||
"doppler": false,
|
||||
"frame_time": false,
|
||||
"gizmos": true,
|
||||
"half_res": false,
|
||||
"information": false,
|
||||
"listener": false,
|
||||
"lock_rotation": false,
|
||||
"orthogonal": false,
|
||||
"position": Vector3(0, 0, 0),
|
||||
"use_environment": false,
|
||||
"view_type": 0,
|
||||
"x_rotation": 0.5,
|
||||
"y_rotation": -0.5
|
||||
}, {
|
||||
"auto_orthogonal": false,
|
||||
"auto_orthogonal_enabled": true,
|
||||
"cinematic_preview": false,
|
||||
"display_mode": 20,
|
||||
"distance": 4.0,
|
||||
"doppler": false,
|
||||
"frame_time": false,
|
||||
"gizmos": true,
|
||||
"half_res": false,
|
||||
"information": false,
|
||||
"listener": false,
|
||||
"lock_rotation": false,
|
||||
"orthogonal": false,
|
||||
"position": Vector3(0, 0, 0),
|
||||
"use_environment": false,
|
||||
"view_type": 0,
|
||||
"x_rotation": 0.5,
|
||||
"y_rotation": -0.5
|
||||
}, {
|
||||
"auto_orthogonal": false,
|
||||
"auto_orthogonal_enabled": true,
|
||||
"cinematic_preview": false,
|
||||
"display_mode": 20,
|
||||
"distance": 4.0,
|
||||
"doppler": false,
|
||||
"frame_time": false,
|
||||
"gizmos": true,
|
||||
"half_res": false,
|
||||
"information": false,
|
||||
"listener": false,
|
||||
"lock_rotation": false,
|
||||
"orthogonal": false,
|
||||
"position": Vector3(0, 0, 0),
|
||||
"use_environment": false,
|
||||
"view_type": 0,
|
||||
"x_rotation": 0.5,
|
||||
"y_rotation": -0.5
|
||||
}],
|
||||
"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")])
|
@ -0,0 +1,5 @@
|
||||
[folding]
|
||||
|
||||
node_unfolds=[NodePath("AnimatedSprite2D"), PackedStringArray("Animation", "sprite_frames", "Texture")]
|
||||
resource_unfolds=["res://scenes/badguy.tscn::SpriteFrames_yk6ef", PackedStringArray(), "res://scenes/badguy.tscn::RectangleShape2D_1c86m", PackedStringArray()]
|
||||
nodes_folded=[]
|
@ -0,0 +1,3 @@
|
||||
[folding]
|
||||
|
||||
sections_unfolded=PackedStringArray()
|
@ -0,0 +1,175 @@
|
||||
[editor_states]
|
||||
|
||||
Anim={
|
||||
"visible": false
|
||||
}
|
||||
2D={
|
||||
"grid_offset": Vector2(0, 0),
|
||||
"grid_snap_active": false,
|
||||
"grid_step": Vector2(8, 8),
|
||||
"grid_visibility": 1,
|
||||
"ofs": Vector2(-24.5403, -16.8633),
|
||||
"primary_grid_step": Vector2i(8, 8),
|
||||
"show_edit_locks": true,
|
||||
"show_guides": true,
|
||||
"show_helpers": false,
|
||||
"show_origin": true,
|
||||
"show_rulers": true,
|
||||
"show_transformation_gizmos": true,
|
||||
"show_viewport": true,
|
||||
"show_zoom_control": true,
|
||||
"smart_snap_active": false,
|
||||
"snap_guides": true,
|
||||
"snap_node_anchors": true,
|
||||
"snap_node_center": true,
|
||||
"snap_node_parent": true,
|
||||
"snap_node_sides": true,
|
||||
"snap_other_nodes": true,
|
||||
"snap_pixel": true,
|
||||
"snap_relative": false,
|
||||
"snap_rotation": false,
|
||||
"snap_rotation_offset": 0.0,
|
||||
"snap_rotation_step": 0.261799,
|
||||
"snap_scale": false,
|
||||
"snap_scale_step": 0.1,
|
||||
"zoom": 7.55099
|
||||
}
|
||||
3D={
|
||||
"fov": 70.01,
|
||||
"gizmos_status": {
|
||||
"AudioListener3D": 0,
|
||||
"AudioStreamPlayer3D": 0,
|
||||
"CPUParticles3D": 0,
|
||||
"CSGShape3D": 0,
|
||||
"Camera3D": 0,
|
||||
"CollisionObject3D": 0,
|
||||
"CollisionPolygon3D": 0,
|
||||
"CollisionShape3D": 0,
|
||||
"Decal": 0,
|
||||
"FogVolume": 0,
|
||||
"GPUParticles3D": 0,
|
||||
"GPUParticlesCollision3D": 0,
|
||||
"Joint3D": 0,
|
||||
"Light3D": 0,
|
||||
"LightmapGI": 0,
|
||||
"LightmapProbe": 0,
|
||||
"Marker3D": 0,
|
||||
"NavigationLink3D": 0,
|
||||
"NavigationRegion3D": 0,
|
||||
"OccluderInstance3D": 0,
|
||||
"Path3D": 0,
|
||||
"PhysicalBone3D": 0,
|
||||
"RayCast3D": 0,
|
||||
"ReflectionProbe": 0,
|
||||
"ShapeCast3D": 0,
|
||||
"Skeleton3D": 0,
|
||||
"SoftBody3D": 0,
|
||||
"SpringArm3D": 0,
|
||||
"VehicleWheel3D": 0,
|
||||
"VisibleOnScreenNotifier3D": 0,
|
||||
"VoxelGI": 0
|
||||
},
|
||||
"local_coords": false,
|
||||
"preview_sun_env": {
|
||||
"environ_ao_enabled": false,
|
||||
"environ_enabled": true,
|
||||
"environ_energy": 1.0,
|
||||
"environ_gi_enabled": false,
|
||||
"environ_glow_enabled": true,
|
||||
"environ_ground_color": Color(0.2, 0.169, 0.133, 1),
|
||||
"environ_sky_color": Color(0.385, 0.454, 0.55, 1),
|
||||
"environ_tonemap_enabled": true,
|
||||
"sun_color": Color(1, 1, 1, 1),
|
||||
"sun_enabled": true,
|
||||
"sun_energy": 1.0,
|
||||
"sun_max_distance": 100.0,
|
||||
"sun_rotation": Vector2(-1.0472, 2.61799)
|
||||
},
|
||||
"rotate_snap": 15.0,
|
||||
"scale_snap": 10.0,
|
||||
"show_grid": true,
|
||||
"show_origin": true,
|
||||
"snap_enabled": false,
|
||||
"translate_snap": 1.0,
|
||||
"viewport_mode": 1,
|
||||
"viewports": [{
|
||||
"auto_orthogonal": false,
|
||||
"auto_orthogonal_enabled": true,
|
||||
"cinematic_preview": false,
|
||||
"display_mode": 20,
|
||||
"distance": 4.0,
|
||||
"doppler": false,
|
||||
"frame_time": false,
|
||||
"gizmos": true,
|
||||
"half_res": false,
|
||||
"information": false,
|
||||
"listener": true,
|
||||
"lock_rotation": false,
|
||||
"orthogonal": false,
|
||||
"position": Vector3(0, 0, 0),
|
||||
"use_environment": false,
|
||||
"view_type": 0,
|
||||
"x_rotation": 0.5,
|
||||
"y_rotation": -0.5
|
||||
}, {
|
||||
"auto_orthogonal": false,
|
||||
"auto_orthogonal_enabled": true,
|
||||
"cinematic_preview": false,
|
||||
"display_mode": 20,
|
||||
"distance": 4.0,
|
||||
"doppler": false,
|
||||
"frame_time": false,
|
||||
"gizmos": true,
|
||||
"half_res": false,
|
||||
"information": false,
|
||||
"listener": false,
|
||||
"lock_rotation": false,
|
||||
"orthogonal": false,
|
||||
"position": Vector3(0, 0, 0),
|
||||
"use_environment": false,
|
||||
"view_type": 0,
|
||||
"x_rotation": 0.5,
|
||||
"y_rotation": -0.5
|
||||
}, {
|
||||
"auto_orthogonal": false,
|
||||
"auto_orthogonal_enabled": true,
|
||||
"cinematic_preview": false,
|
||||
"display_mode": 20,
|
||||
"distance": 4.0,
|
||||
"doppler": false,
|
||||
"frame_time": false,
|
||||
"gizmos": true,
|
||||
"half_res": false,
|
||||
"information": false,
|
||||
"listener": false,
|
||||
"lock_rotation": false,
|
||||
"orthogonal": false,
|
||||
"position": Vector3(0, 0, 0),
|
||||
"use_environment": false,
|
||||
"view_type": 0,
|
||||
"x_rotation": 0.5,
|
||||
"y_rotation": -0.5
|
||||
}, {
|
||||
"auto_orthogonal": false,
|
||||
"auto_orthogonal_enabled": true,
|
||||
"cinematic_preview": false,
|
||||
"display_mode": 20,
|
||||
"distance": 4.0,
|
||||
"doppler": false,
|
||||
"frame_time": false,
|
||||
"gizmos": true,
|
||||
"half_res": false,
|
||||
"information": false,
|
||||
"listener": false,
|
||||
"lock_rotation": false,
|
||||
"orthogonal": false,
|
||||
"position": Vector3(0, 0, 0),
|
||||
"use_environment": false,
|
||||
"view_type": 0,
|
||||
"x_rotation": 0.5,
|
||||
"y_rotation": -0.5
|
||||
}],
|
||||
"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")])
|
@ -0,0 +1,5 @@
|
||||
[folding]
|
||||
|
||||
node_unfolds=[NodePath("AnimatedSprite2D"), PackedStringArray("Animation", "sprite_frames", "Texture")]
|
||||
resource_unfolds=["res://scenes/coin.tscn::SpriteFrames_h30lo", PackedStringArray(), "res://scenes/coin.tscn::CircleShape2D_huvfs", PackedStringArray()]
|
||||
nodes_folded=[]
|
@ -1,11 +1,14 @@
|
||||
Node2D
|
||||
AnimationPlayer
|
||||
Timer
|
||||
RayCast2D
|
||||
CollisionShape2D
|
||||
AnimatableBody2D
|
||||
Sprite2D
|
||||
Camera2D
|
||||
TileMap
|
||||
Node
|
||||
AnimatedSprite2D
|
||||
Area2D
|
||||
RayCast2D
|
||||
Node
|
||||
Sprite2D
|
||||
ParallaxLayer
|
||||
ParallaxBackground
|
||||
Node2D
|
||||
AnimationPlayer
|
||||
AnimatableBody2D
|
||||
Camera2D
|
||||
TileMap
|
||||
|
@ -12,31 +12,31 @@ dock_floating={}
|
||||
dock_split_2=0
|
||||
dock_split_3=0
|
||||
dock_hsplit_1=0
|
||||
dock_hsplit_2=270
|
||||
dock_hsplit_2=318
|
||||
dock_hsplit_3=-270
|
||||
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://scenes/platform.tscn")
|
||||
dock_filesystem_uncollapsed_paths=PackedStringArray("Favorites", "res://", "res://scripts/", "res://scenes/", "res://graphics/", "res://graphics/items/")
|
||||
dock_filesystem_selected_paths=PackedStringArray("res://graphics/Player Death/")
|
||||
dock_filesystem_uncollapsed_paths=PackedStringArray("Favorites", "res://", "res://scripts/", "res://scenes/", "res://graphics/", "res://graphics/Player Death/")
|
||||
dock_3="Scene,Import"
|
||||
dock_4="FileSystem"
|
||||
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", "res://scenes/platform.tscn")
|
||||
open_scenes=PackedStringArray("res://scenes/game.tscn", "res://scenes/character.tscn", "res://scenes/bullet.tscn", "res://scenes/crate.tscn", "res://scenes/platform.tscn", "res://scenes/coin.tscn", "res://scenes/badguy.tscn")
|
||||
current_scene="res://scenes/game.tscn"
|
||||
center_split_offset=-329
|
||||
center_split_offset=-247
|
||||
selected_default_debugger_tab_idx=0
|
||||
selected_main_editor_idx=2
|
||||
selected_bottom_panel_item=0
|
||||
|
||||
[ScriptEditor]
|
||||
|
||||
open_scripts=["res://scripts/bullet.gd", "res://scripts/CharacterBody2D.gd", "res://scripts/gamecontroller.gd", "res://scripts/Trigger.gd"]
|
||||
open_scripts=["res://scripts/badguy.gd", "res://scripts/bullet.gd", "res://scripts/CharacterBody2D.gd", "res://scripts/coin.gd", "res://scripts/gamecontroller.gd", "res://scripts/Trigger.gd"]
|
||||
selected_script="res://scripts/gamecontroller.gd"
|
||||
open_help=[]
|
||||
script_split_offset=70
|
||||
|
@ -1,26 +1,41 @@
|
||||
ea4bc82a6ad023ab7ee23ee620429895
|
||||
::res://::1722297822
|
||||
icon.svg::CompressedTexture2D::9114977118871582245::1722289482::1722289482::1::::<><>::
|
||||
::res://graphics/::1722297822
|
||||
bullet.png::CompressedTexture2D::4834894094516681527::1722297811::1722297822::1::::<><>::
|
||||
Terrain (32x32).png::CompressedTexture2D::8707534964839485024::1722289482::1722289482::1::::<><>::
|
||||
::res://graphics/items/::1722289482
|
||||
cannister.png::CompressedTexture2D::7418095402531000042::1722289482::1722289482::1::::<><>::
|
||||
::res://graphics/Player Idle/::1722289482
|
||||
Player Idle 48x48.png::CompressedTexture2D::6544563428604246579::1722289482::1722289482::1::::<><>::
|
||||
::res://graphics/Player Jump/::1722289482
|
||||
player jump 48x48.png::CompressedTexture2D::1627608568707791839::1722289482::1722289482::1::::<><>::
|
||||
::res://graphics/Player Land/::1722289482
|
||||
player land 48x48.png::CompressedTexture2D::3499637713582873633::1722289482::1722289482::1::::<><>::
|
||||
::res://graphics/Player Run/::1722289482
|
||||
player run 48x48.png::CompressedTexture2D::1502492849971408816::1722289482::1722289482::1::::<><>::
|
||||
::res://scenes/::1722297822
|
||||
bullet.tscn::PackedScene::6880909734590904373::1722297251::0::1::::<><>::res://scripts/bullet.gd
|
||||
character.tscn::PackedScene::451838158579532324::1722297251::0::1::::<><>::res://scripts/CharacterBody2D.gd<>uid://c0iiaebonyhh0::::res://graphics/Player Idle/Player Idle 48x48.png<>uid://xgoqfqmvorcx::::res://graphics/Player Jump/player jump 48x48.png<>uid://vn23qn3f0dvc::::res://graphics/Player Run/player run 48x48.png
|
||||
crate.tscn::PackedScene::41931541512830250::1722297251::0::1::::<><>::uid://ddxm7hj323fta::::res://graphics/items/cannister.png
|
||||
game.tscn::PackedScene::1738196330916037717::1722297251::0::1::::<><>::res://scripts/gamecontroller.gd<>uid://go4yc8hfo1gq::::res://scenes/character.tscn<>uid://dwb83f7uoweuy::::res://graphics/Terrain (32x32).png<>res://scripts/Trigger.gd<>uid://ukuu7p7vhlq::::res://scenes/crate.tscn
|
||||
::res://scripts/::1722293648
|
||||
bullet.gd::GDScript::-1::1722289482::0::1::::<>Area2D<>::
|
||||
CharacterBody2D.gd::GDScript::-1::1722293648::0::1::::<>CharacterBody2D<>::
|
||||
gamecontroller.gd::GDScript::-1::1722289482::0::1::::<>Node2D<>::
|
||||
Trigger.gd::GDScript::-1::1722289482::0::1::::<>Area2D<>::
|
||||
::res://::1723499748
|
||||
icon.svg::CompressedTexture2D::9114977118871582245::1723499516::1723499516::1::::<><>::
|
||||
::res://graphics/::1723509991
|
||||
bullet.png::CompressedTexture2D::4834894094516681527::1723499516::1723499516::1::::<><>::
|
||||
Terrain (32x32).png::CompressedTexture2D::8707534964839485024::1723499516::1723499516::1::::<><>::
|
||||
::res://graphics/background/::1723501213
|
||||
Additional Sky.png::CompressedTexture2D::6453351609810348480::1723501213::1723501213::1::::<><>::
|
||||
Additional Water.png::CompressedTexture2D::4106022825291545778::1723501213::1723501213::1::::<><>::
|
||||
BG Image.png::CompressedTexture2D::237374342318087251::1723501213::1723501213::1::::<><>::
|
||||
::res://graphics/enemies/::1723506305
|
||||
slime_purple.png::CompressedTexture2D::4414376887898401849::1723506305::1723506305::1::::<><>::
|
||||
::res://graphics/items/::1723499516
|
||||
cannister.png::CompressedTexture2D::7418095402531000042::1723499516::1723499516::1::::<><>::
|
||||
::res://graphics/pickups/::1723502323
|
||||
coin.png::CompressedTexture2D::9033362620640926021::1723502323::1723502323::1::::<><>::
|
||||
::res://graphics/Player Death/::1723509999
|
||||
Player Death 64x64.png::CompressedTexture2D::116608705279953946::1723509999::1723509999::1::::<><>::
|
||||
::res://graphics/Player Idle/::1723499516
|
||||
Player Idle 48x48.png::CompressedTexture2D::6544563428604246579::1723499516::1723499516::1::::<><>::
|
||||
::res://graphics/Player Jump/::1723499516
|
||||
player jump 48x48.png::CompressedTexture2D::1627608568707791839::1723499516::1723499516::1::::<><>::
|
||||
::res://graphics/Player Land/::1723499516
|
||||
player land 48x48.png::CompressedTexture2D::3499637713582873633::1723499516::1723499516::1::::<><>::
|
||||
::res://graphics/Player Run/::1723499516
|
||||
player run 48x48.png::CompressedTexture2D::1502492849971408816::1723499516::1723499516::1::::<><>::
|
||||
::res://scenes/::1723509898
|
||||
badguy.tscn::PackedScene::488149358851198558::1723509898::0::1::::<><>::uid://b35me3ux1dl8t::::res://graphics/enemies/slime_purple.png<>res://scripts/badguy.gd
|
||||
bullet.tscn::PackedScene::6880909734590904373::1723509898::0::1::::<><>::res://scripts/bullet.gd<>uid://ca5b88ipe5ks2::::res://graphics/bullet.png
|
||||
character.tscn::PackedScene::451838158579532324::1723509898::0::1::::<><>::res://scripts/CharacterBody2D.gd<>uid://c0iiaebonyhh0::::res://graphics/Player Idle/Player Idle 48x48.png<>uid://xgoqfqmvorcx::::res://graphics/Player Jump/player jump 48x48.png<>uid://vn23qn3f0dvc::::res://graphics/Player Run/player run 48x48.png
|
||||
coin.tscn::PackedScene::6452089725107733211::1723509898::0::1::::<><>::res://scripts/coin.gd<>uid://d1x3fr6xxt4mr::::res://graphics/pickups/coin.png
|
||||
crate.tscn::PackedScene::41931541512830250::1723509898::0::1::::<><>::uid://ddxm7hj323fta::::res://graphics/items/cannister.png
|
||||
game.tscn::PackedScene::1738196330916037717::1723509898::0::1::::<><>::res://scripts/gamecontroller.gd<>uid://go4yc8hfo1gq::::res://scenes/character.tscn<>uid://dwb83f7uoweuy::::res://graphics/Terrain (32x32).png<>res://scripts/Trigger.gd<>uid://dm8rx8b2mh3p::::res://graphics/background/BG Image.png<>uid://cx7b01o887hk7::::res://graphics/background/Additional Sky.png<>uid://byq8ujatf55a1::::res://graphics/background/Additional Water.png<>uid://ukuu7p7vhlq::::res://scenes/crate.tscn<>uid://ci10o5e0xpxm8::::res://scenes/platform.tscn<>uid://cx6o8fh0fj8kl::::res://scenes/coin.tscn<>uid://g7p0pn145hpe::::res://scenes/badguy.tscn
|
||||
platform.tscn::PackedScene::5389570447076805405::1723509898::0::1::::<><>::
|
||||
::res://scripts/::1723509883
|
||||
badguy.gd::GDScript::-1::1723509883::0::1::::<>Area2D<>::
|
||||
bullet.gd::GDScript::-1::1723499516::0::1::::<>Area2D<>::
|
||||
CharacterBody2D.gd::GDScript::-1::1723499516::0::1::::<>CharacterBody2D<>::
|
||||
coin.gd::GDScript::-1::1723504932::0::1::::<>Area2D<>::
|
||||
gamecontroller.gd::GDScript::-1::1723509526::0::1::::<>Node<>::
|
||||
Trigger.gd::GDScript::-1::1723499516::0::1::::<>Area2D<>::
|
||||
|
@ -2,6 +2,10 @@ res://scenes/game.tscn
|
||||
res://scenes/character.tscn
|
||||
res://scenes/bullet.tscn
|
||||
res://scenes/crate.tscn
|
||||
res://scripts/CharacterBody2D.gd
|
||||
res://scenes/platform.tscn
|
||||
res://scenes/coin.tscn
|
||||
res://scripts/coin.gd
|
||||
res://scripts/gamecontroller.gd
|
||||
res://scenes/badguy.tscn
|
||||
res://scripts/badguy.gd
|
||||
res://scripts/CharacterBody2D.gd
|
||||
|
@ -8,7 +8,7 @@ Anim={
|
||||
"grid_snap_active": false,
|
||||
"grid_step": Vector2(8, 8),
|
||||
"grid_visibility": 1,
|
||||
"ofs": Vector2(-271.671, -139.035),
|
||||
"ofs": Vector2(-206.898, -321.44),
|
||||
"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": 1.41421
|
||||
"zoom": 1.18921
|
||||
}
|
||||
3D={
|
||||
"fov": 70.01,
|
||||
|
@ -1,5 +1,5 @@
|
||||
[folding]
|
||||
|
||||
node_unfolds=[NodePath("."), PackedStringArray("Transform"), NodePath("TileMap"), PackedStringArray("tile_set"), NodePath("level"), PackedStringArray("Transform"), NodePath("level/StaticBody2D"), PackedStringArray("Transform"), NodePath("AreaTrigger"), PackedStringArray("Transform"), NodePath("Platform"), PackedStringArray("Transform")]
|
||||
node_unfolds=[NodePath("."), PackedStringArray("Transform"), NodePath("TileMap"), PackedStringArray("tile_set"), NodePath("ParallaxBackground/ParallaxLayer"), PackedStringArray("Motion"), NodePath("ParallaxBackground/ParallaxLayer/bg"), PackedStringArray("Transform"), NodePath("ParallaxBackground/ParallaxLayer/sky"), PackedStringArray("Transform"), NodePath("ParallaxBackground/ParallaxLayer/water"), PackedStringArray("Transform"), NodePath("level"), PackedStringArray("Transform"), NodePath("level/StaticBody2D"), PackedStringArray("Transform"), NodePath("AreaTrigger"), PackedStringArray("Transform"), NodePath("Platform"), PackedStringArray("Transform")]
|
||||
resource_unfolds=["res://scenes/game.tscn::TileSet_47g5u", PackedStringArray("terrain_set_0/terrain__array", "physics_layer__array"), "res://scenes/game.tscn::WorldBoundaryShape2D_3u4a8", PackedStringArray("Resource"), "res://scenes/game.tscn::CircleShape2D_x8qck", PackedStringArray("Resource")]
|
||||
nodes_folded=[NodePath("AreaTrigger")]
|
||||
nodes_folded=[]
|
||||
|
@ -14,8 +14,8 @@ run_debug_collisions=true
|
||||
|
||||
[recent_files]
|
||||
|
||||
scenes=["res://scenes/platform.tscn", "res://scenes/crate.tscn", "res://scenes/bullet.tscn", "res://scenes/character.tscn", "res://scenes/game.tscn"]
|
||||
scripts=["res://scripts/Trigger.gd", "res://scripts/bullet.gd", "res://scripts/CharacterBody2D.gd", "res://scripts/gamecontroller.gd"]
|
||||
scenes=["res://scenes/badguy.tscn", "res://scenes/coin.tscn", "res://scenes/platform.tscn", "res://scenes/crate.tscn", "res://scenes/bullet.tscn", "res://scenes/character.tscn", "res://scenes/game.tscn"]
|
||||
scripts=["res://scripts/badguy.gd", "res://scripts/coin.gd", "res://scripts/Trigger.gd", "res://scripts/bullet.gd", "res://scripts/CharacterBody2D.gd", "res://scripts/gamecontroller.gd"]
|
||||
|
||||
[linked_properties]
|
||||
|
||||
@ -31,8 +31,12 @@ MultiNodeEdit:scale=true
|
||||
TileMap:scale=true
|
||||
Camera2D:zoom=true
|
||||
Camera2D:scale=true
|
||||
Sprite2D:scale=true
|
||||
Sprite2D:scale=false
|
||||
AnimatableBody2D:scale=true
|
||||
ParallaxBackground:scroll_base_scale=true
|
||||
ParallaxBackground:scale=true
|
||||
ParallaxLayer:motion_scale=true
|
||||
ParallaxLayer:scale=true
|
||||
|
||||
[dialog_bounds]
|
||||
|
||||
|
@ -1,5 +1,8 @@
|
||||
res://graphics/Player Death
|
||||
res://scripts
|
||||
res://graphics/enemies
|
||||
res://scenes
|
||||
res://graphics/pickups
|
||||
res://graphics/Player Jump
|
||||
res://graphics/Player Run
|
||||
res://graphics/Player Idle
|
||||
res://scripts
|
||||
|
@ -3,11 +3,11 @@
|
||||
state={
|
||||
"bookmarks": PackedInt32Array(),
|
||||
"breakpoints": PackedInt32Array(),
|
||||
"column": 37,
|
||||
"column": 14,
|
||||
"folded_lines": Array[int]([]),
|
||||
"h_scroll_position": 0,
|
||||
"row": 25,
|
||||
"scroll_position": 12.0,
|
||||
"row": 40,
|
||||
"scroll_position": 28.0,
|
||||
"selection": false,
|
||||
"syntax_highlighter": "GDScript"
|
||||
}
|
||||
@ -17,12 +17,16 @@ state={
|
||||
state={
|
||||
"bookmarks": PackedInt32Array(),
|
||||
"breakpoints": PackedInt32Array(),
|
||||
"column": 26,
|
||||
"column": 0,
|
||||
"folded_lines": Array[int]([]),
|
||||
"h_scroll_position": 0,
|
||||
"row": 54,
|
||||
"scroll_position": 41.0,
|
||||
"selection": false,
|
||||
"row": 26,
|
||||
"scroll_position": 20.0,
|
||||
"selection": true,
|
||||
"selection_from_column": 0,
|
||||
"selection_from_line": 26,
|
||||
"selection_to_column": 15,
|
||||
"selection_to_line": 29,
|
||||
"syntax_highlighter": "GDScript"
|
||||
}
|
||||
|
||||
@ -45,11 +49,39 @@ state={
|
||||
state={
|
||||
"bookmarks": PackedInt32Array(),
|
||||
"breakpoints": PackedInt32Array(),
|
||||
"column": 28,
|
||||
"column": 25,
|
||||
"folded_lines": Array[int]([]),
|
||||
"h_scroll_position": 0,
|
||||
"row": 5,
|
||||
"row": 6,
|
||||
"scroll_position": 0.0,
|
||||
"selection": false,
|
||||
"syntax_highlighter": "GDScript"
|
||||
}
|
||||
|
||||
[res://scripts/coin.gd]
|
||||
|
||||
state={
|
||||
"bookmarks": PackedInt32Array(),
|
||||
"breakpoints": PackedInt32Array(),
|
||||
"column": 14,
|
||||
"folded_lines": Array[int]([]),
|
||||
"h_scroll_position": 0,
|
||||
"row": 18,
|
||||
"scroll_position": 1.0,
|
||||
"selection": false,
|
||||
"syntax_highlighter": "GDScript"
|
||||
}
|
||||
|
||||
[res://scripts/badguy.gd]
|
||||
|
||||
state={
|
||||
"bookmarks": PackedInt32Array(),
|
||||
"breakpoints": PackedInt32Array(),
|
||||
"column": 31,
|
||||
"folded_lines": Array[int]([]),
|
||||
"h_scroll_position": 0,
|
||||
"row": 38,
|
||||
"scroll_position": 24.0,
|
||||
"selection": false,
|
||||
"syntax_highlighter": "GDScript"
|
||||
}
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="ef05607ab18b6e14047ef305d4967bca"
|
||||
dest_md5="c4a79c607243be25d3669dc2144fdbe8"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="707fe1be51389c0a7dc6bce6b8df1ad8"
|
||||
dest_md5="a1f827ff5491bfc85a30898cd8164541"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="7f10db4045810c42977343e59a782178"
|
||||
dest_md5="c50c902db0eea75f65be64479d81b3ae"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="e5256a9ceb0ab699f4b89ff036b2a902"
|
||||
dest_md5="9cd9459a73f825afbfd37992d6a40bfb"
|
||||
|
BIN
.godot/imported/coin.png-b04a16f8896ddd41f884de642ba05be4.ctex
Normal file
BIN
.godot/imported/coin.png-b04a16f8896ddd41f884de642ba05be4.ctex
Normal file
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="9972ae36d7f15087663eef880c2522c7"
|
||||
dest_md5="6323bfa165d4025b36e466114be0533d"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="54f57af24a12b9a7016da6f96c55a77d"
|
||||
dest_md5="d56883b02fd383d0809e6e9ecbe5df3b"
|
||||
|
Binary file not shown.
BIN
graphics/Player Death/Player Death 64x64.png
Normal file
BIN
graphics/Player Death/Player Death 64x64.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
34
graphics/Player Death/Player Death 64x64.png.import
Normal file
34
graphics/Player Death/Player Death 64x64.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bwqr703yjxqw"
|
||||
path="res://.godot/imported/Player Death 64x64.png-264389d563a3f9dc55af6fd3aea47ce0.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://graphics/Player Death/Player Death 64x64.png"
|
||||
dest_files=["res://.godot/imported/Player Death 64x64.png-264389d563a3f9dc55af6fd3aea47ce0.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
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/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
graphics/background/Additional Sky.png
Normal file
BIN
graphics/background/Additional Sky.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 123 B |
34
graphics/background/Additional Sky.png.import
Normal file
34
graphics/background/Additional Sky.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cx7b01o887hk7"
|
||||
path="res://.godot/imported/Additional Sky.png-0c545090cde9f2fc7e943a672b099c59.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://graphics/background/Additional Sky.png"
|
||||
dest_files=["res://.godot/imported/Additional Sky.png-0c545090cde9f2fc7e943a672b099c59.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
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/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
graphics/background/Additional Water.png
Normal file
BIN
graphics/background/Additional Water.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 122 B |
34
graphics/background/Additional Water.png.import
Normal file
34
graphics/background/Additional Water.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://byq8ujatf55a1"
|
||||
path="res://.godot/imported/Additional Water.png-bf782f3705a1acaec1e3ab97da39a373.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://graphics/background/Additional Water.png"
|
||||
dest_files=["res://.godot/imported/Additional Water.png-bf782f3705a1acaec1e3ab97da39a373.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
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/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
graphics/background/BG Image.png
Normal file
BIN
graphics/background/BG Image.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 586 B |
34
graphics/background/BG Image.png.import
Normal file
34
graphics/background/BG Image.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dm8rx8b2mh3p"
|
||||
path="res://.godot/imported/BG Image.png-a4c16c98f815c26fe14456abfb54be92.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://graphics/background/BG Image.png"
|
||||
dest_files=["res://.godot/imported/BG Image.png-a4c16c98f815c26fe14456abfb54be92.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
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/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
graphics/enemies/slime_purple.png
Normal file
BIN
graphics/enemies/slime_purple.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
34
graphics/enemies/slime_purple.png.import
Normal file
34
graphics/enemies/slime_purple.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://b35me3ux1dl8t"
|
||||
path="res://.godot/imported/slime_purple.png-680c7cb80731795ced97a298ff076baf.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://graphics/enemies/slime_purple.png"
|
||||
dest_files=["res://.godot/imported/slime_purple.png-680c7cb80731795ced97a298ff076baf.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
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/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
graphics/pickups/coin.png
Normal file
BIN
graphics/pickups/coin.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 500 B |
34
graphics/pickups/coin.png.import
Normal file
34
graphics/pickups/coin.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://d1x3fr6xxt4mr"
|
||||
path="res://.godot/imported/coin.png-b04a16f8896ddd41f884de642ba05be4.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://graphics/pickups/coin.png"
|
||||
dest_files=["res://.godot/imported/coin.png-b04a16f8896ddd41f884de642ba05be4.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
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/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
|
73
scenes/badguy.tscn
Normal file
73
scenes/badguy.tscn
Normal file
@ -0,0 +1,73 @@
|
||||
[gd_scene load_steps=9 format=3 uid="uid://g7p0pn145hpe"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://b35me3ux1dl8t" path="res://graphics/enemies/slime_purple.png" id="1_1ntag"]
|
||||
[ext_resource type="Script" path="res://scripts/badguy.gd" id="1_v13iu"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_myg18"]
|
||||
atlas = ExtResource("1_1ntag")
|
||||
region = Rect2(0, 24, 24, 24)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_n2rjj"]
|
||||
atlas = ExtResource("1_1ntag")
|
||||
region = Rect2(24, 24, 24, 24)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_u7k88"]
|
||||
atlas = ExtResource("1_1ntag")
|
||||
region = Rect2(48, 24, 24, 24)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_nomh7"]
|
||||
atlas = ExtResource("1_1ntag")
|
||||
region = Rect2(72, 24, 24, 24)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_yk6ef"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_myg18")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_n2rjj")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_u7k88")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_nomh7")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"chase",
|
||||
"speed": 12.0
|
||||
}]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_1c86m"]
|
||||
size = Vector2(15, 15)
|
||||
|
||||
[node name="Area2D" type="Area2D"]
|
||||
script = ExtResource("1_v13iu")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
texture_filter = 1
|
||||
sprite_frames = SubResource("SpriteFrames_yk6ef")
|
||||
animation = &"chase"
|
||||
autoplay = "chase"
|
||||
frame_progress = 0.641285
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(-0.5, 4.5)
|
||||
shape = SubResource("RectangleShape2D_1c86m")
|
||||
|
||||
[node name="RightCast" type="RayCast2D" parent="."]
|
||||
target_position = Vector2(12, 0)
|
||||
|
||||
[node name="LeftCast" type="RayCast2D" parent="."]
|
||||
target_position = Vector2(-13, 0)
|
||||
|
||||
[node name="rightFloorCast" type="RayCast2D" parent="."]
|
||||
position = Vector2(8, 0)
|
||||
target_position = Vector2(0, 15)
|
||||
|
||||
[node name="leftFloorCast" type="RayCast2D" parent="."]
|
||||
position = Vector2(-9, 0)
|
||||
target_position = Vector2(0, 15)
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
@ -1,10 +1,51 @@
|
||||
[gd_scene load_steps=28 format=3 uid="uid://go4yc8hfo1gq"]
|
||||
[gd_scene load_steps=39 format=3 uid="uid://go4yc8hfo1gq"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/CharacterBody2D.gd" id="1_x87yo"]
|
||||
[ext_resource type="Texture2D" uid="uid://bwqr703yjxqw" path="res://graphics/Player Death/Player Death 64x64.png" id="2_f63vt"]
|
||||
[ext_resource type="Texture2D" uid="uid://c0iiaebonyhh0" path="res://graphics/Player Idle/Player Idle 48x48.png" id="2_hyqch"]
|
||||
[ext_resource type="Texture2D" uid="uid://xgoqfqmvorcx" path="res://graphics/Player Jump/player jump 48x48.png" id="3_mp84c"]
|
||||
[ext_resource type="Texture2D" uid="uid://vn23qn3f0dvc" path="res://graphics/Player Run/player run 48x48.png" id="4_bok64"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_auj82"]
|
||||
atlas = ExtResource("2_f63vt")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_jg08c"]
|
||||
atlas = ExtResource("2_f63vt")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_jfk8p"]
|
||||
atlas = ExtResource("2_f63vt")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_bqy6m"]
|
||||
atlas = ExtResource("2_f63vt")
|
||||
region = Rect2(144, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_70jtw"]
|
||||
atlas = ExtResource("2_f63vt")
|
||||
region = Rect2(192, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ynslf"]
|
||||
atlas = ExtResource("2_f63vt")
|
||||
region = Rect2(240, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_xice0"]
|
||||
atlas = ExtResource("2_f63vt")
|
||||
region = Rect2(288, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_8aad3"]
|
||||
atlas = ExtResource("2_f63vt")
|
||||
region = Rect2(336, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_tr830"]
|
||||
atlas = ExtResource("2_f63vt")
|
||||
region = Rect2(384, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_4hs1w"]
|
||||
atlas = ExtResource("2_f63vt")
|
||||
region = Rect2(432, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_htcu2"]
|
||||
atlas = ExtResource("2_hyqch")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
@ -93,6 +134,41 @@ region = Rect2(336, 0, 48, 48)
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_auj82")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_jg08c")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_jfk8p")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_bqy6m")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_70jtw")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ynslf")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_xice0")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_8aad3")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_tr830")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_4hs1w")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"death",
|
||||
"speed": 12.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_htcu2")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
@ -182,7 +258,7 @@ metadata/_edit_group_ = true
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
texture_filter = 1
|
||||
sprite_frames = SubResource("SpriteFrames_a6t6h")
|
||||
animation = &"idle"
|
||||
animation = &"death"
|
||||
autoplay = "idle"
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
|
113
scenes/coin.tscn
Normal file
113
scenes/coin.tscn
Normal file
@ -0,0 +1,113 @@
|
||||
[gd_scene load_steps=17 format=3 uid="uid://cx6o8fh0fj8kl"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/coin.gd" id="1_58pdp"]
|
||||
[ext_resource type="Texture2D" uid="uid://d1x3fr6xxt4mr" path="res://graphics/pickups/coin.png" id="1_niumm"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_nakd4"]
|
||||
atlas = ExtResource("1_niumm")
|
||||
region = Rect2(0, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_adin6"]
|
||||
atlas = ExtResource("1_niumm")
|
||||
region = Rect2(16, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_lfnrx"]
|
||||
atlas = ExtResource("1_niumm")
|
||||
region = Rect2(32, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_t0c4u"]
|
||||
atlas = ExtResource("1_niumm")
|
||||
region = Rect2(48, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_m0p2y"]
|
||||
atlas = ExtResource("1_niumm")
|
||||
region = Rect2(64, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_67ond"]
|
||||
atlas = ExtResource("1_niumm")
|
||||
region = Rect2(80, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_8xf7t"]
|
||||
atlas = ExtResource("1_niumm")
|
||||
region = Rect2(96, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_b5h36"]
|
||||
atlas = ExtResource("1_niumm")
|
||||
region = Rect2(112, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_hs4mo"]
|
||||
atlas = ExtResource("1_niumm")
|
||||
region = Rect2(128, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_s4w26"]
|
||||
atlas = ExtResource("1_niumm")
|
||||
region = Rect2(144, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_wpgnb"]
|
||||
atlas = ExtResource("1_niumm")
|
||||
region = Rect2(160, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_3yods"]
|
||||
atlas = ExtResource("1_niumm")
|
||||
region = Rect2(176, 0, 16, 16)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_h30lo"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_nakd4")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_adin6")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_lfnrx")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_t0c4u")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_m0p2y")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_67ond")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_8xf7t")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_b5h36")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_hs4mo")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_s4w26")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_wpgnb")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_3yods")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 12.0
|
||||
}]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_huvfs"]
|
||||
radius = 4.0
|
||||
|
||||
[node name="Area2D" type="Area2D"]
|
||||
script = ExtResource("1_58pdp")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
texture_filter = 1
|
||||
sprite_frames = SubResource("SpriteFrames_h30lo")
|
||||
autoplay = "default"
|
||||
frame_progress = 0.402311
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CircleShape2D_huvfs")
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
@ -1,11 +1,16 @@
|
||||
[gd_scene load_steps=14 format=3 uid="uid://y083suj12rld"]
|
||||
[gd_scene load_steps=19 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"]
|
||||
[ext_resource type="Texture2D" uid="uid://dwb83f7uoweuy" path="res://graphics/Terrain (32x32).png" id="2_l22q1"]
|
||||
[ext_resource type="Script" path="res://scripts/Trigger.gd" id="2_nfj1w"]
|
||||
[ext_resource type="Texture2D" uid="uid://dm8rx8b2mh3p" path="res://graphics/background/BG Image.png" id="3_fje8e"]
|
||||
[ext_resource type="Texture2D" uid="uid://cx7b01o887hk7" path="res://graphics/background/Additional Sky.png" id="4_j5t1o"]
|
||||
[ext_resource type="Texture2D" uid="uid://byq8ujatf55a1" path="res://graphics/background/Additional Water.png" id="5_pnfsl"]
|
||||
[ext_resource type="PackedScene" uid="uid://ukuu7p7vhlq" path="res://scenes/crate.tscn" id="5_u8rgi"]
|
||||
[ext_resource type="PackedScene" uid="uid://ci10o5e0xpxm8" path="res://scenes/platform.tscn" id="6_80wa1"]
|
||||
[ext_resource type="PackedScene" uid="uid://cx6o8fh0fj8kl" path="res://scenes/coin.tscn" id="10_0oixj"]
|
||||
[ext_resource type="PackedScene" uid="uid://g7p0pn145hpe" path="res://scenes/badguy.tscn" id="11_bxgbq"]
|
||||
|
||||
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_xg6qs"]
|
||||
texture = ExtResource("2_l22q1")
|
||||
@ -481,7 +486,22 @@ sources/0 = SubResource("TileSetAtlasSource_xg6qs")
|
||||
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_3u4a8"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_x8qck"]
|
||||
radius = 60.2993
|
||||
radius = 32.0
|
||||
|
||||
[sub_resource type="Animation" id="Animation_t7ite"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_n7r3j"]
|
||||
resource_name = "move"
|
||||
@ -499,21 +519,6 @@ tracks/0/keys = {
|
||||
"values": [Vector2(0, 0), Vector2(51, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_t7ite"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_dcgrv"]
|
||||
_data = {
|
||||
"RESET": SubResource("Animation_t7ite"),
|
||||
@ -521,12 +526,37 @@ _data = {
|
||||
}
|
||||
|
||||
[node name="Game" type="Node2D"]
|
||||
|
||||
[node name="GameController" type="Node" parent="."]
|
||||
unique_name_in_owner = true
|
||||
script = ExtResource("1_77wyw")
|
||||
|
||||
[node name="Timer" type="Timer" parent="GameController"]
|
||||
|
||||
[node name="TileMap" type="TileMap" parent="."]
|
||||
tile_set = SubResource("TileSet_47g5u")
|
||||
format = 2
|
||||
layer_0/tile_data = PackedInt32Array(393215, 0, 4, 327680, 65536, 4, 327681, 131072, 4, 131075, 0, 4, 131076, 131072, 4, 327683, 0, 4, 327684, 65536, 4, 327685, 65536, 4, 327686, 65536, 4, 327687, 65536, 4, 327688, 65536, 4, 327689, 65536, 4, 327690, 65536, 4, 327691, 786432, 4, 327692, 65536, 2, 327693, 131072, 2, 327694, 65536, 4, 327695, 131072, 4, 262155, 0, 0, 262156, 458752, 1, 196620, 393216, 3, 196621, 131072, 1, 262157, 458752, 4, 131084, 0, 0, 131085, 131072, 0, 65552, 0, 4, 65553, 131072, 4, 262161, 262144, 4, 65543, 0, 4, 65544, 65536, 4, 65545, 131072, 4, -65525, 983040, 4, -131061, 262144, 1, -196597, 983040, 3, -196596, 65536, 4, -196595, 1048576, 3, -131059, 262144, 1, -65523, 1048576, 4, -65524, 65536, 4)
|
||||
layer_0/tile_data = PackedInt32Array(393215, 0, 4, 327680, 65536, 4, 327681, 131072, 4, 131075, 0, 4, 131076, 131072, 4, 327683, 0, 4, 327684, 65536, 4, 327685, 65536, 4, 327686, 786432, 4, 327687, 131072, 2, 327688, 65536, 4, 327689, 65536, 4, 327690, 65536, 4, 327691, 786432, 4, 327692, 65536, 2, 327693, 131072, 2, 327694, 65536, 4, 327695, 131072, 4, 262155, 0, 0, 262156, 458752, 1, 196620, 393216, 3, 196621, 131072, 1, 262157, 458752, 4, 131084, 0, 0, 131085, 131072, 0, 65552, 0, 4, 65553, 131072, 4, 262161, 262144, 4, 65543, 0, 4, 65544, 65536, 4, 65545, 131072, 4, -65525, 983040, 4, -131061, 262144, 1, -196597, 983040, 3, -196596, 65536, 4, -196595, 1048576, 3, -131059, 262144, 1, -65523, 1048576, 4, -65524, 65536, 4, 262150, 0, 0, 262151, 131072, 0, 196615, 262144, 0)
|
||||
|
||||
[node name="ParallaxBackground" type="ParallaxBackground" parent="."]
|
||||
|
||||
[node name="ParallaxLayer" type="ParallaxLayer" parent="ParallaxBackground"]
|
||||
motion_mirroring = Vector2(324, 0)
|
||||
|
||||
[node name="bg" type="Sprite2D" parent="ParallaxBackground/ParallaxLayer"]
|
||||
position = Vector2(142.5, 50)
|
||||
scale = Vector2(0.960938, 1)
|
||||
texture = ExtResource("3_fje8e")
|
||||
|
||||
[node name="sky" type="Sprite2D" parent="ParallaxBackground/ParallaxLayer"]
|
||||
position = Vector2(164.5, -114)
|
||||
scale = Vector2(10.1562, 8)
|
||||
texture = ExtResource("4_j5t1o")
|
||||
|
||||
[node name="water" type="Sprite2D" parent="ParallaxBackground/ParallaxLayer"]
|
||||
position = Vector2(165, 200.024)
|
||||
scale = Vector2(10.165, 5.686)
|
||||
texture = ExtResource("5_pnfsl")
|
||||
|
||||
[node name="level" type="Node2D" parent="."]
|
||||
|
||||
@ -568,5 +598,23 @@ autoplay = "move"
|
||||
[node name="BoxTrap" type="Node2D" parent="."]
|
||||
position = Vector2(276, -83)
|
||||
|
||||
[connection signal="areatrigger" from="AreaTrigger" to="." method="_on_area_2d_areatrigger"]
|
||||
[node name="Coins" type="Node" parent="."]
|
||||
|
||||
[node name="coin" parent="Coins" instance=ExtResource("10_0oixj")]
|
||||
position = Vector2(116, 151)
|
||||
|
||||
[node name="coin2" parent="Coins" instance=ExtResource("10_0oixj")]
|
||||
position = Vector2(145, 58)
|
||||
|
||||
[node name="coin3" parent="Coins" instance=ExtResource("10_0oixj")]
|
||||
position = Vector2(389, 58)
|
||||
|
||||
[node name="coin4" parent="Coins" instance=ExtResource("10_0oixj")]
|
||||
position = Vector2(398, -40)
|
||||
|
||||
[node name="badguy" parent="." instance=ExtResource("11_bxgbq")]
|
||||
position = Vector2(153, 146)
|
||||
|
||||
[connection signal="timeout" from="GameController/Timer" to="GameController" method="resetWorld"]
|
||||
[connection signal="areatrigger" from="AreaTrigger" to="GameController" method="_on_area_2d_areatrigger"]
|
||||
[connection signal="body_entered" from="AreaTrigger" to="AreaTrigger" method="_on_body_entered"]
|
||||
|
@ -17,14 +17,20 @@ var faceLeft = false
|
||||
var pushLeftEnabled = false
|
||||
var pushRightEnabled = false
|
||||
var pushTarget
|
||||
var living = true
|
||||
|
||||
var bullet = preload("res://scenes/bullet.tscn")
|
||||
|
||||
# Get the gravity from the project settings to be synced with RigidBody nodes.
|
||||
var gravity = ProjectSettings.get_setting("physics/2d/default_gravity")
|
||||
|
||||
func die():
|
||||
print("kill the player")
|
||||
animated_sprite.play("death")
|
||||
living = false
|
||||
|
||||
func _physics_process(delta):
|
||||
# Add the gravity.
|
||||
if living:
|
||||
if not is_on_floor():
|
||||
velocity.y += gravity * delta
|
||||
|
||||
|
40
scripts/badguy.gd
Normal file
40
scripts/badguy.gd
Normal file
@ -0,0 +1,40 @@
|
||||
extends Area2D
|
||||
|
||||
const speed = 60
|
||||
var direction = 1
|
||||
|
||||
@onready var right_cast = $RightCast
|
||||
@onready var left_cast = $LeftCast
|
||||
@onready var right_floor_cast = $rightFloorCast
|
||||
@onready var left_floor_cast = $leftFloorCast
|
||||
@onready var sprite = $AnimatedSprite2D
|
||||
@onready var game = %GameController
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
if right_cast.is_colliding():
|
||||
if not right_cast.get_collider().is_in_group("player"):
|
||||
direction = -1
|
||||
sprite.flip_h = true
|
||||
if left_cast.is_colliding():
|
||||
if not left_cast.get_collider().is_in_group("player"):
|
||||
direction = 1
|
||||
sprite.flip_h = false
|
||||
if not right_floor_cast.is_colliding():
|
||||
direction = -1
|
||||
sprite.flip_h = true
|
||||
if not left_floor_cast.is_colliding():
|
||||
direction = 1
|
||||
sprite.flip_h = false
|
||||
#move the dude
|
||||
position.x += direction * speed * delta
|
||||
|
||||
|
||||
func _on_body_entered(body):
|
||||
if body.is_in_group("player"):
|
||||
game.playerDeath()
|
19
scripts/coin.gd
Normal file
19
scripts/coin.gd
Normal file
@ -0,0 +1,19 @@
|
||||
extends Area2D
|
||||
@onready var game = %GameController
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
||||
|
||||
|
||||
func _on_body_entered(body):
|
||||
if body.is_in_group("player"):
|
||||
print("something hit the coin")
|
||||
game.coinCollected()
|
||||
queue_free()
|
@ -1,7 +1,12 @@
|
||||
extends Node2D
|
||||
extends Node
|
||||
|
||||
var myBox = preload("res://scenes/crate.tscn")
|
||||
@onready var box_trap = $BoxTrap
|
||||
@onready var box_trap = $"../BoxTrap"
|
||||
@onready var timer = $Timer
|
||||
@onready var player = $"../CharacterBody2D"
|
||||
|
||||
|
||||
var totalCoins = 0
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
@ -22,7 +27,18 @@ func _on_area_2d_areatrigger(effect, body):
|
||||
if body.is_in_group("player"):
|
||||
for n in 3:
|
||||
var box = myBox.instantiate()
|
||||
add_child(box)
|
||||
owner.add_child(box)
|
||||
box.position = box_trap.position
|
||||
"powerup":
|
||||
print("you got power")
|
||||
|
||||
func coinCollected():
|
||||
|
||||
totalCoins += 1
|
||||
print("Game controller will add coin " + str(totalCoins) )
|
||||
func playerDeath():
|
||||
player.die()
|
||||
timer.start()
|
||||
|
||||
func resetWorld():
|
||||
get_tree().reload_current_scene()
|
||||
|
Loading…
Reference in New Issue
Block a user