multiple updates
This commit is contained in:
parent
638ba31c68
commit
0eb54aac54
28
README.md
28
README.md
@ -164,3 +164,31 @@ Set your user name:
|
|||||||
Set your email:
|
Set your email:
|
||||||
|
|
||||||
`git config --global user.email "mona@lisa.com"`
|
`git config --global user.email "mona@lisa.com"`
|
||||||
|
|
||||||
|
## Working from a branch
|
||||||
|
|
||||||
|
It is a good idea to create a branch each time you are working on a major milestone. For the sake of the course, you should create a branch for each week.
|
||||||
|
|
||||||
|
`git checkout -b week2`
|
||||||
|
|
||||||
|
As always, you will add and commit your changes into the branch.
|
||||||
|
|
||||||
|
`git add .`
|
||||||
|
`git commit -m "some message"`
|
||||||
|
|
||||||
|
And if you wish, you can push the new branch to the remote repository just like you did with the main branch.
|
||||||
|
|
||||||
|
`git push origin week2`
|
||||||
|
|
||||||
|
Now you can work away without fear of messing up your project. Because if you need to, you can always revert back to the main branch, undoing all your changes.
|
||||||
|
|
||||||
|
|
||||||
|
`git checkout -b main`
|
||||||
|
|
||||||
|
From the main branch, you can merge your updates from the week2 branch by simply using:
|
||||||
|
|
||||||
|
`git merge week2`
|
||||||
|
|
||||||
|
And after that, you are free to push the updates up to your repo.
|
||||||
|
|
||||||
|
`git push origin main`
|
||||||
|
@ -105,7 +105,7 @@ A very typical example is a variable that should be assigned during the “ready
|
|||||||
|
|
||||||
The “onready” decorator takes care of this by making sure the variable is assigned during the ready state.
|
The “onready” decorator takes care of this by making sure the variable is assigned during the ready state.
|
||||||
|
|
||||||
@onready var animated_sprite = $AnimatedSprite2D
|
`@onready var animated_sprite = $AnimatedSprite2D`
|
||||||
|
|
||||||
Note that the $ in front of the value assigned is a shortcut designation for the current scope. It is called an operator, and is used to retrieve children of the parent node.
|
Note that the $ in front of the value assigned is a shortcut designation for the current scope. It is called an operator, and is used to retrieve children of the parent node.
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ Anim={
|
|||||||
"grid_snap_active": false,
|
"grid_snap_active": false,
|
||||||
"grid_step": Vector2(8, 8),
|
"grid_step": Vector2(8, 8),
|
||||||
"grid_visibility": 1,
|
"grid_visibility": 1,
|
||||||
"ofs": Vector2(-53.4626, -32.546),
|
"ofs": Vector2(-145.758, -32.546),
|
||||||
"primary_grid_step": Vector2i(8, 8),
|
"primary_grid_step": Vector2i(8, 8),
|
||||||
"show_group_gizmos": true,
|
"show_group_gizmos": true,
|
||||||
"show_guides": true,
|
"show_guides": true,
|
||||||
@ -175,4 +175,4 @@ Anim={
|
|||||||
"zfar": 4000.01,
|
"zfar": 4000.01,
|
||||||
"znear": 0.05
|
"znear": 0.05
|
||||||
}
|
}
|
||||||
selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@16886/@Panel@13/@VBoxContainer@14/DockHSplitLeftL/DockHSplitLeftR/DockHSplitMain/@VBoxContainer@25/DockVSplitCenter/@VSplitContainer@52/@VBoxContainer@53/@PanelContainer@98/MainScreen/@CanvasItemEditor@9272/@VSplitContainer@9094/@HSplitContainer@9096/@HSplitContainer@9098/@Control@9099/@SubViewportContainer@9100/@SubViewport@9101/Game")])
|
selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@16886/@Panel@13/@VBoxContainer@14/DockHSplitLeftL/DockHSplitLeftR/DockHSplitMain/@VBoxContainer@25/DockVSplitCenter/@VSplitContainer@52/@VBoxContainer@53/@PanelContainer@98/MainScreen/@CanvasItemEditor@9272/@VSplitContainer@9094/@HSplitContainer@9096/@HSplitContainer@9098/@Control@9099/@SubViewportContainer@9100/@SubViewport@9101/Game/level")])
|
||||||
|
@ -175,4 +175,4 @@ Anim={
|
|||||||
"zfar": 4000.01,
|
"zfar": 4000.01,
|
||||||
"znear": 0.05
|
"znear": 0.05
|
||||||
}
|
}
|
||||||
selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@16886/@Panel@13/@VBoxContainer@14/DockHSplitLeftL/DockHSplitLeftR/DockHSplitMain/@VBoxContainer@25/DockVSplitCenter/@VSplitContainer@52/@VBoxContainer@53/@PanelContainer@98/MainScreen/@CanvasItemEditor@9272/@VSplitContainer@9094/@HSplitContainer@9096/@HSplitContainer@9098/@Control@9099/@SubViewportContainer@9100/@SubViewport@9101/Game")])
|
selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@16886/@Panel@13/@VBoxContainer@14/DockHSplitLeftL/DockHSplitLeftR/DockHSplitMain/@VBoxContainer@25/DockVSplitCenter/@VSplitContainer@52/@VBoxContainer@53/@PanelContainer@98/MainScreen/@CanvasItemEditor@9272/@VSplitContainer@9094/@HSplitContainer@9096/@HSplitContainer@9098/@Control@9099/@SubViewportContainer@9100/@SubViewport@9101/Game/level")])
|
||||||
|
@ -40,8 +40,8 @@ selected_bottom_panel_item=0
|
|||||||
|
|
||||||
[ScriptEditor]
|
[ScriptEditor]
|
||||||
|
|
||||||
open_scripts=["res://scripts/bullet.gd", "res://scripts/CharacterBody2D.gd", "res://scripts/gamecontroller.gd"]
|
open_scripts=["res://scripts/bullet.gd", "res://scripts/CharacterBody2D.gd", "res://scripts/gamecontroller.gd", "res://scripts/Trigger.gd"]
|
||||||
selected_script="res://scripts/gamecontroller.gd"
|
selected_script="res://scripts/Trigger.gd"
|
||||||
open_help=[]
|
open_help=[]
|
||||||
script_split_offset=70
|
script_split_offset=70
|
||||||
list_split_offset=0
|
list_split_offset=0
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
ea4bc82a6ad023ab7ee23ee620429895
|
ea4bc82a6ad023ab7ee23ee620429895
|
||||||
::res://::1725900023
|
::res://::1725904718
|
||||||
icon.svg::CompressedTexture2D::9114977118871582245::1718541837::1718541843::1::::<><>::
|
icon.svg::CompressedTexture2D::9114977118871582245::1718541837::1718541843::1::::<><>::
|
||||||
::res://assets/::1718552371
|
::res://assets/::1718552371
|
||||||
::res://scenes/::1724629924
|
::res://scenes/::1725900535
|
||||||
bullet.tscn::PackedScene::6880909734590904373::1724629924::0::1::::<><>::res://scripts/bullet.gd
|
bullet.tscn::PackedScene::6880909734590904373::1725900535::0::1::::<><>::res://scripts/bullet.gd
|
||||||
character.tscn::PackedScene::451838158579532324::1724629924::0::1::::<><>::res://scripts/CharacterBody2D.gd
|
character.tscn::PackedScene::451838158579532324::1725900535::0::1::::<><>::res://scripts/CharacterBody2D.gd
|
||||||
game.tscn::PackedScene::1738196330916037717::1724629924::0::1::::<><>::res://scripts/gamecontroller.gd<>uid://go4yc8hfo1gq::::res://scenes/character.tscn<>res://scripts/Trigger.gd
|
game.tscn::PackedScene::1738196330916037717::1725900535::0::1::::<><>::res://scripts/gamecontroller.gd<>uid://go4yc8hfo1gq::::res://scenes/character.tscn<>res://scripts/Trigger.gd
|
||||||
::res://scripts/::1722021779
|
::res://scripts/::1722021779
|
||||||
bullet.gd::GDScript::-1::1722021779::0::1::::<>Area2D<>::
|
bullet.gd::GDScript::-1::1722021779::0::1::::<>Area2D<>::
|
||||||
CharacterBody2D.gd::GDScript::-1::1721179661::0::1::::<>CharacterBody2D<>::
|
CharacterBody2D.gd::GDScript::-1::1721179661::0::1::::<>CharacterBody2D<>::
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
res://scenes/game.tscn
|
res://scenes/game.tscn
|
||||||
|
res://scripts/CharacterBody2D.gd
|
||||||
res://scenes/character.tscn
|
res://scenes/character.tscn
|
||||||
res://scenes/bullet.tscn
|
res://scenes/bullet.tscn
|
||||||
|
@ -175,4 +175,4 @@ Anim={
|
|||||||
"zfar": 4000.01,
|
"zfar": 4000.01,
|
||||||
"znear": 0.05
|
"znear": 0.05
|
||||||
}
|
}
|
||||||
selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@16886/@Panel@13/@VBoxContainer@14/DockHSplitLeftL/DockHSplitLeftR/DockHSplitMain/@VBoxContainer@25/DockVSplitCenter/@VSplitContainer@52/@VBoxContainer@53/@PanelContainer@98/MainScreen/@CanvasItemEditor@9272/@VSplitContainer@9094/@HSplitContainer@9096/@HSplitContainer@9098/@Control@9099/@SubViewportContainer@9100/@SubViewport@9101/Game")])
|
selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@16886/@Panel@13/@VBoxContainer@14/DockHSplitLeftL/DockHSplitLeftR/DockHSplitMain/@VBoxContainer@25/DockVSplitCenter/@VSplitContainer@52/@VBoxContainer@53/@PanelContainer@98/MainScreen/@CanvasItemEditor@9272/@VSplitContainer@9094/@HSplitContainer@9096/@HSplitContainer@9098/@Control@9099/@SubViewportContainer@9100/@SubViewport@9101/Game/level")])
|
||||||
|
@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
node_unfolds=[NodePath("."), PackedStringArray("Transform"), NodePath("RigidBody2D"), PackedStringArray("Transform"), NodePath("RigidBody2D/CollisionShape2D"), PackedStringArray("Transform"), NodePath("groundblock"), PackedStringArray("Transform"), NodePath("groundblock/CollisionShape2D"), PackedStringArray("Transform"), NodePath("groundblock2"), PackedStringArray("Transform"), NodePath("groundblock2/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("level/StaticBody2D"), PackedStringArray("Transform"), NodePath("CharacterBody2D"), PackedStringArray("Transform"), NodePath("Area2D"), PackedStringArray("Transform")]
|
node_unfolds=[NodePath("."), PackedStringArray("Transform"), NodePath("RigidBody2D"), PackedStringArray("Transform"), NodePath("RigidBody2D/CollisionShape2D"), PackedStringArray("Transform"), NodePath("groundblock"), PackedStringArray("Transform"), NodePath("groundblock/CollisionShape2D"), PackedStringArray("Transform"), NodePath("groundblock2"), PackedStringArray("Transform"), NodePath("groundblock2/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("level/StaticBody2D"), PackedStringArray("Transform"), NodePath("CharacterBody2D"), PackedStringArray("Transform"), NodePath("Area2D"), PackedStringArray("Transform")]
|
||||||
resource_unfolds=["res://scenes/game.tscn::RectangleShape2D_4vo4d", PackedStringArray("Resource"), "res://scenes/game.tscn::RectangleShape2D_cq7kj", PackedStringArray("Resource"), "res://scenes/game.tscn::WorldBoundaryShape2D_3u4a8", PackedStringArray("Resource"), "res://scenes/game.tscn::CircleShape2D_x8qck", PackedStringArray("Resource")]
|
resource_unfolds=["res://scenes/game.tscn::RectangleShape2D_4vo4d", PackedStringArray("Resource"), "res://scenes/game.tscn::RectangleShape2D_cq7kj", PackedStringArray("Resource"), "res://scenes/game.tscn::WorldBoundaryShape2D_3u4a8", PackedStringArray("Resource"), "res://scenes/game.tscn::CircleShape2D_x8qck", PackedStringArray("Resource")]
|
||||||
nodes_folded=[]
|
nodes_folded=[NodePath("RigidBody2D"), NodePath("groundblock"), NodePath("groundblock2"), NodePath("level"), NodePath("Area2D")]
|
||||||
|
@ -12,7 +12,7 @@ run_debug_collisions=true
|
|||||||
[recent_files]
|
[recent_files]
|
||||||
|
|
||||||
scenes=["res://scenes/bullet.tscn", "res://scenes/character.tscn", "res://scenes/game.tscn"]
|
scenes=["res://scenes/bullet.tscn", "res://scenes/character.tscn", "res://scenes/game.tscn"]
|
||||||
scripts=["res://scripts/bullet.gd", "res://scripts/CharacterBody2D.gd", "res://scripts/gamecontroller.gd"]
|
scripts=["res://scripts/Trigger.gd", "res://scripts/bullet.gd", "res://scripts/CharacterBody2D.gd", "res://scripts/gamecontroller.gd"]
|
||||||
|
|
||||||
[linked_properties]
|
[linked_properties]
|
||||||
|
|
||||||
|
@ -3,10 +3,10 @@
|
|||||||
state={
|
state={
|
||||||
"bookmarks": PackedInt32Array(),
|
"bookmarks": PackedInt32Array(),
|
||||||
"breakpoints": PackedInt32Array(),
|
"breakpoints": PackedInt32Array(),
|
||||||
"column": 0,
|
"column": 45,
|
||||||
"folded_lines": Array[int]([]),
|
"folded_lines": Array[int]([]),
|
||||||
"h_scroll_position": 0,
|
"h_scroll_position": 0,
|
||||||
"row": 0,
|
"row": 13,
|
||||||
"scroll_position": 0.0,
|
"scroll_position": 0.0,
|
||||||
"selection": false,
|
"selection": false,
|
||||||
"syntax_highlighter": "GDScript"
|
"syntax_highlighter": "GDScript"
|
||||||
@ -17,12 +17,16 @@ state={
|
|||||||
state={
|
state={
|
||||||
"bookmarks": PackedInt32Array(),
|
"bookmarks": PackedInt32Array(),
|
||||||
"breakpoints": PackedInt32Array(),
|
"breakpoints": PackedInt32Array(),
|
||||||
"column": 52,
|
"column": 12,
|
||||||
"folded_lines": Array[int]([]),
|
"folded_lines": Array[int]([]),
|
||||||
"h_scroll_position": 0,
|
"h_scroll_position": 0,
|
||||||
"row": 47,
|
"row": 33,
|
||||||
"scroll_position": 30.0,
|
"scroll_position": 22.0,
|
||||||
"selection": false,
|
"selection": true,
|
||||||
|
"selection_from_column": 2,
|
||||||
|
"selection_from_line": 33,
|
||||||
|
"selection_to_column": 12,
|
||||||
|
"selection_to_line": 33,
|
||||||
"syntax_highlighter": "GDScript"
|
"syntax_highlighter": "GDScript"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,3 +43,17 @@ state={
|
|||||||
"selection": false,
|
"selection": false,
|
||||||
"syntax_highlighter": "GDScript"
|
"syntax_highlighter": "GDScript"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[res://scripts/Trigger.gd]
|
||||||
|
|
||||||
|
state={
|
||||||
|
"bookmarks": PackedInt32Array(),
|
||||||
|
"breakpoints": PackedInt32Array(),
|
||||||
|
"column": 0,
|
||||||
|
"folded_lines": Array[int]([]),
|
||||||
|
"h_scroll_position": 0,
|
||||||
|
"row": 0,
|
||||||
|
"scroll_position": 0.0,
|
||||||
|
"selection": false,
|
||||||
|
"syntax_highlighter": "GDScript"
|
||||||
|
}
|
||||||
|
@ -31,7 +31,6 @@ func _physics_process(delta):
|
|||||||
velocity.y = JUMP_VELOCITY
|
velocity.y = JUMP_VELOCITY
|
||||||
# Hand force push (melee attack)
|
# Hand force push (melee attack)
|
||||||
if Input.is_action_just_pressed("push") && pushRightEnabled && faceLeft == false:
|
if Input.is_action_just_pressed("push") && pushRightEnabled && faceLeft == false:
|
||||||
print("I should force push")
|
|
||||||
pushTarget.apply_central_impulse(Vector2(1,0) * PUSH_FORCE * 10)
|
pushTarget.apply_central_impulse(Vector2(1,0) * PUSH_FORCE * 10)
|
||||||
pushRightEnabled = false
|
pushRightEnabled = false
|
||||||
if Input.is_action_just_pressed("push") && pushLeftEnabled:
|
if Input.is_action_just_pressed("push") && pushLeftEnabled:
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
ea4bc82a6ad023ab7ee23ee620429895
|
ea4bc82a6ad023ab7ee23ee620429895
|
||||||
::res://::1724630360
|
::res://::1725904667
|
||||||
icon.svg::CompressedTexture2D::9114977118871582245::1722277386::1722277386::1::::<><>::
|
icon.svg::CompressedTexture2D::9114977118871582245::1722277386::1722277386::1::::<><>::
|
||||||
::res://graphics/::1722285155
|
::res://graphics/::1722285155
|
||||||
Terrain (32x32).png::CompressedTexture2D::8707534964839485024::1722277386::1722277386::1::::<><>::
|
Terrain (32x32).png::CompressedTexture2D::8707534964839485024::1722277386::1722277386::1::::<><>::
|
||||||
@ -17,12 +17,12 @@ player jump 48x48.png::CompressedTexture2D::1627608568707791839::1722277386::172
|
|||||||
player land 48x48.png::CompressedTexture2D::3499637713582873633::1722277386::1722277386::1::::<><>::
|
player land 48x48.png::CompressedTexture2D::3499637713582873633::1722277386::1722277386::1::::<><>::
|
||||||
::res://graphics/Player Run/::1722277386
|
::res://graphics/Player Run/::1722277386
|
||||||
player run 48x48.png::CompressedTexture2D::1502492849971408816::1722277386::1722277386::1::::<><>::
|
player run 48x48.png::CompressedTexture2D::1502492849971408816::1722277386::1722277386::1::::<><>::
|
||||||
::res://scenes/::1724626017
|
::res://scenes/::1724634527
|
||||||
bullet.tscn::PackedScene::6880909734590904373::1724626017::0::1::::<><>::res://scripts/bullet.gd
|
bullet.tscn::PackedScene::6880909734590904373::1724634489::0::1::::<><>::res://scripts/bullet.gd
|
||||||
character.tscn::PackedScene::451838158579532324::1724626017::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
|
character.tscn::PackedScene::451838158579532324::1724634489::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::1724626017::0::1::::<><>::uid://ddxm7hj323fta::::res://graphics/items/cannister.png
|
crate.tscn::PackedScene::41931541512830250::1724634489::0::1::::<><>::uid://ddxm7hj323fta::::res://graphics/items/cannister.png
|
||||||
game.tscn::PackedScene::1738196330916037717::1724626017::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<>uid://dvd1p6xue0ub2::::res://scenes/platform.tscn<>uid://dly4g7fvvtamm::::res://graphics/background/BG Image.png<>uid://cw50mfjp2np08::::res://graphics/background/Additional Sky.png<>uid://6olcj1w1svdg::::res://graphics/background/Additional Water.png
|
game.tscn::PackedScene::1738196330916037717::1724634527::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<>uid://dvd1p6xue0ub2::::res://scenes/platform.tscn<>uid://dly4g7fvvtamm::::res://graphics/background/BG Image.png<>uid://cw50mfjp2np08::::res://graphics/background/Additional Sky.png<>uid://6olcj1w1svdg::::res://graphics/background/Additional Water.png
|
||||||
platform.tscn::PackedScene::8641027994130079701::1724626017::0::1::::<><>::
|
platform.tscn::PackedScene::8641027994130079701::1724634489::0::1::::<><>::
|
||||||
::res://scripts/::1722811640
|
::res://scripts/::1722811640
|
||||||
bullet.gd::GDScript::-1::1722277386::0::1::::<>Area2D<>::
|
bullet.gd::GDScript::-1::1722277386::0::1::::<>Area2D<>::
|
||||||
CharacterBody2D.gd::GDScript::-1::1722287010::0::1::::<>CharacterBody2D<>::
|
CharacterBody2D.gd::GDScript::-1::1722287010::0::1::::<>CharacterBody2D<>::
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
res://scenes/game.tscn
|
|
||||||
res://scenes/character.tscn
|
|
||||||
res://scenes/bullet.tscn
|
|
||||||
res://scenes/crate.tscn
|
|
||||||
res://scenes/platform.tscn
|
|
Loading…
Reference in New Issue
Block a user