├── .github └── FUNDING.yml ├── 2D ├── 8_direction_animation │ ├── Idle.png │ ├── Idle.png.import │ ├── Walk.png │ ├── Walk.png.import │ ├── character.gd │ └── character.tscn ├── @tool rope │ ├── Rope2 3px.png │ ├── rope.gd │ └── rope.tscn ├── QuestPointer.gd ├── arch_arrow │ ├── Arrow.png │ ├── arch_arrow.gd │ └── arch_arrow.tscn ├── car_light │ ├── light cone texture.png │ ├── speed_car.gd │ └── speed_car.tscn ├── character_move_on_grid │ ├── Grid.tscn │ ├── grid.gd │ ├── grid_cell.gd │ ├── grid_cell.tscn │ ├── knight.gd │ └── knight.tscn ├── chop_tree │ ├── Pawn_Blue.png │ ├── Tree.png │ ├── pawn.gd │ ├── pawn.tscn │ ├── tree.gd │ └── tree.tscn ├── connect_switches │ ├── door.gd │ ├── door.gd.uid │ ├── door.tscn │ ├── frog_character.gd │ ├── frog_character.gd.uid │ ├── frog_character.tscn │ ├── plattformer_pixel_adventure.tscn │ ├── switch.gd │ ├── switch.gd.uid │ └── switch.tscn ├── create_grid_map │ ├── Grid.tscn │ ├── grid.gd │ └── grid_cell.tscn ├── dash_with_effect │ ├── asset │ │ ├── Pink_Monster_Death_8.png │ │ ├── Pink_Monster_Death_8.png.import │ │ ├── Pink_Monster_Hurt_4.png │ │ ├── Pink_Monster_Hurt_4.png.import │ │ ├── Pink_Monster_Idle_4.png │ │ ├── Pink_Monster_Idle_4.png.import │ │ ├── Pink_Monster_Jump_8.png │ │ ├── Pink_Monster_Jump_8.png.import │ │ ├── Pink_Monster_Run_6.png │ │ └── Pink_Monster_Run_6.png.import │ ├── sidescroller_player_dash.gd │ └── sidescroller_player_dash.tscn ├── day_and_night_cycle │ ├── day_and_night_cycle.gd │ └── day_and_night_cycle.tscn ├── diagonal_movement │ ├── knight.gd │ ├── knight.tscn │ └── top_down_scene.tscn ├── dig_out_and_throw │ ├── fox_player.gd │ ├── object.gd │ └── object.tscn ├── dino_ride │ ├── assets │ │ ├── DinoSprites - doux.png │ │ ├── DinoSprites - doux.png.import │ │ ├── player.png │ │ └── player.png.import │ ├── dino.gd │ ├── dino.tscn │ ├── fox_player.gd │ └── fox_player.tscn ├── endless_runner_level │ ├── endless_runner_scene.gd │ ├── endless_runner_scene.tscn │ ├── fox_player.gd │ ├── fox_player.tscn │ ├── parallax_background.gd │ └── parallax_background.tscn ├── endless_runner_obstacles │ ├── box.tscn │ ├── eagle.gd │ ├── eagle.tscn │ ├── endless_runner_scene.gd │ ├── endless_runner_scene.tscn │ ├── fox_player.gd │ ├── fox_player.tscn │ ├── obstacle.gd │ ├── parallax_background.gd │ └── parallax_background.tscn ├── enter_and_control_car │ ├── Blue_SPORT_CLEAN_EAST_000-sheet.png │ ├── Blue_SPORT_CLEAN_NORTHEAST_000-sheet.png │ ├── Blue_SPORT_CLEAN_NORTHWEST_000-sheet.png │ ├── Blue_SPORT_CLEAN_NORTH_000-sheet.png │ ├── Blue_SPORT_CLEAN_SOUTHEAST_000-sheet.png │ ├── Blue_SPORT_CLEAN_SOUTHWEST_000-sheet.png │ ├── Blue_SPORT_CLEAN_SOUTH_000-sheet.png │ ├── Blue_SPORT_CLEAN_WEST_000-sheet.png │ ├── car.gd │ └── car.tscn ├── fan_platformer │ ├── fan.gd │ ├── fan.tscn │ ├── frog_character.gd │ ├── frog_character.tscn │ └── plattformer_pixel_adventure.tscn ├── fishing_minigame_serie │ ├── fishing minigame │ │ ├── assets │ │ │ ├── Box_Orange_Square.png │ │ │ ├── Box_Orange_Square.png.import │ │ │ ├── Orange.png │ │ │ ├── Orange.png.import │ │ │ ├── SlimSlider_Background.png │ │ │ ├── SlimSlider_Background.png.import │ │ │ ├── SlimSlider_Base.png │ │ │ ├── SlimSlider_Base.png.import │ │ │ ├── crosshair026.png │ │ │ └── crosshair026.png.import │ │ ├── fish.gd │ │ ├── fish.tscn │ │ ├── fishing_game.gd │ │ ├── fishing_minigame.tscn │ │ ├── target.gd │ │ └── target.tscn │ ├── fishing_rod │ │ ├── assets │ │ │ ├── fishing_end.png │ │ │ ├── fishing_start.png │ │ │ ├── idle.png │ │ │ ├── run.png │ │ │ └── walk.png │ │ ├── fishing_scene.tscn │ │ ├── goblin_player.gd │ │ └── goblin_player.tscn │ ├── full_version │ │ ├── assets │ │ │ ├── Box_Orange_Square.png │ │ │ ├── Box_Orange_Square.png.import │ │ │ ├── Orange.png │ │ │ ├── Orange.png.import │ │ │ ├── SlimSlider_Background.png │ │ │ ├── SlimSlider_Background.png.import │ │ │ ├── SlimSlider_Base.png │ │ │ ├── SlimSlider_Base.png.import │ │ │ ├── crosshair026.png │ │ │ └── crosshair026.png.import │ │ ├── fish.gd │ │ ├── fish.tscn │ │ ├── fishing_game.gd │ │ ├── fishing_minigame.tscn │ │ ├── fishing_scene.tscn │ │ ├── goblin_player.gd │ │ ├── goblin_player.tscn │ │ ├── target.gd │ │ └── target.tscn │ └── wait_for_fish │ │ ├── assets │ │ ├── fishing_end.png │ │ └── fishing_start.png │ │ ├── goblin_player.gd │ │ └── goblin_player.tscn ├── flutter_jump │ ├── scene.tscn │ ├── yoshi.gd │ └── yoshi.tscn ├── gravity_field │ ├── frog_character.gd │ ├── frog_character.tscn │ ├── gravity_field.gd │ ├── gravity_field.tscn │ └── plattformer_pixel_adventure.tscn ├── handle_bridge_top_down │ ├── layer_switch.gd │ ├── layer_switch.tscn │ └── top_down_scene.gd ├── handle_multiple_floors │ ├── house_layer.gd │ ├── multi_house_floor.tscn │ ├── player.gd │ ├── player.tscn │ ├── switch_layer_point.gd │ └── switch_layer_point.tscn ├── handle_stairs_top_down │ ├── stair_player.gd │ └── stair_player.tscn ├── hexa_movement │ ├── Soldier.png │ ├── Soldier.png.import │ ├── character_body_2d.tscn │ ├── hex_agent.gd │ ├── hex_grid.tscn │ └── tile_map_layer.gd ├── inhale │ ├── assets │ │ ├── kirby-like.png │ │ └── kirby-like.png.import │ ├── enemy.tscn │ ├── kirby.gd │ └── kirby.tscn ├── jump_buffer │ ├── frog_character.gd │ ├── frog_character.tscn │ └── plattformer_pixel_adventure.tscn ├── ladder_climb │ ├── assets │ │ ├── SpriteSheet.png │ │ ├── SpriteSheet.png.import │ │ ├── fox_side_climb.png │ │ └── fox_side_climb.png.import │ ├── fox_player.gd │ └── fox_player.tscn ├── light_effects_on_evening │ ├── assets │ │ ├── Campfire36.png │ │ ├── Campfire36.png.import │ │ ├── light_point.webp │ │ ├── light_point.webp.import │ │ ├── moon.png │ │ ├── moon.png.import │ │ ├── sun.png │ │ └── sun.png.import │ ├── campfire.gd │ ├── campfire.tscn │ ├── ui.gd │ └── ui.tscn ├── make_npc_look_busy │ ├── castle.gd │ ├── castle.tscn │ ├── pawn.gd │ ├── pawn.tscn │ ├── woodcutter_house.gd │ └── woodcutter_house.tscn ├── map_full_video │ ├── assets │ │ ├── Fox.png │ │ ├── Fox.png.import │ │ ├── Fox_Map_1.png │ │ ├── Fox_Map_1.png.import │ │ ├── IconButton_Small_Red_Circle.png │ │ ├── IconButton_Small_Red_Circle.png.import │ │ ├── Map.png │ │ ├── Map.png.import │ │ ├── circle.png │ │ ├── circle.png.import │ │ ├── wide.png │ │ └── wide.png.import │ ├── city.tscn │ ├── fox_player_Map.tscn │ ├── fox_player_map.gd │ ├── info_window.gd │ ├── info_window.tscn │ ├── jungle_scene.tscn │ ├── map.tscn │ ├── scene.gd │ ├── way_connection.gd │ ├── way_connection.tscn │ ├── way_point.gd │ └── way_point.tscn ├── momentum_movement │ ├── assets │ │ ├── Fox.png │ │ └── Fox.png.import │ ├── fox_momentum_movement.gd │ └── fox_momentum_movement.tscn ├── npcs_transport_materials │ ├── castle.gd │ ├── castle.tscn │ ├── material.gd │ ├── pawn.gd │ ├── pawn.tscn │ ├── ui.gd │ ├── ui.tscn │ ├── wood.tres │ ├── woodcutter_house.gd │ ├── woodcutter_house.tscn │ ├── woodcutter_npc.gd │ └── woodcutter_npc.tscn ├── open_map │ ├── assets │ │ ├── Fox.png │ │ ├── Fox.png.import │ │ ├── Fox_Map_1.png │ │ ├── Fox_Map_1.png.import │ │ ├── Map.png │ │ └── Map.png.import │ ├── fox_player_Map.tscn │ └── fox_player_map.gd ├── physicBridge.tscn ├── physic_rope │ ├── Rope2 3px.png │ └── physicRope.tscn ├── place_objects_on_grid │ ├── grid_map │ │ ├── Grid.tscn │ │ ├── grid.gd │ │ ├── grid.gd.uid │ │ ├── grid_cell.gd │ │ ├── grid_cell.gd.uid │ │ └── grid_cell.tscn │ ├── object.gd │ ├── object.gd.uid │ ├── object.tscn │ ├── scene.gd │ ├── scene.gd.uid │ └── scene.tscn ├── planet_movement │ ├── Planet.tscn │ ├── planet_char.gd │ ├── planet_char.tscn │ └── scene.tscn ├── random_dungeon │ ├── randomRoom.tscn │ ├── random_dungeon.gd │ ├── random_dungeon.tscn │ └── random_room.gd ├── random_room │ ├── randomRoom.tscn │ └── random_room.gd ├── respawn │ ├── frog_character.gd │ ├── frog_character.tscn │ ├── plattformer_pixel_adventure.gd │ ├── plattformer_pixel_adventure.tscn │ ├── saw.gd │ ├── saw.tscn │ ├── worldEnd.gd │ └── worldEnd.tscn ├── rigidbody 2D │ ├── rigidBody_player.tscn │ └── rigidbody_player.gd ├── room_random_objects │ ├── chest.tscn │ ├── randomRoom.tscn │ ├── random_dungeon.gd │ ├── random_dungeon.tscn │ ├── random_room.gd │ ├── random_room.tscn │ └── slime_enemy.tscn ├── scene_transitions │ ├── level_switch.gd │ ├── level_switch.tscn │ ├── plattformer_pixel_adventure (2).tscn │ ├── plattformer_pixel_adventure.tscn │ ├── transition.gd │ └── transition.tscn ├── shoot_only_in_area │ ├── arrow.gd │ ├── arrow.gd.uid │ ├── arrow.tscn │ ├── enemy.gd │ ├── enemy.gd.uid │ ├── enemy.tscn │ └── top_down_scene.tscn ├── show_grid_char_movement │ ├── Grid.tscn │ ├── grid.gd │ ├── grid_cell.gd │ ├── grid_cell.tscn │ ├── knight.gd │ └── knight.tscn ├── simple_steering_system │ ├── assets │ │ └── PixelPlanesAssetPack.png │ ├── plane.gd │ └── plane.tscn ├── sliding_on_ice │ ├── fox.gd │ ├── fox.tscn │ └── winter_scene.tscn ├── switch │ ├── door.gd │ ├── door.tscn │ ├── frog_character.gd │ ├── frog_character.tscn │ ├── plattformer_pixel_adventure.tscn │ ├── switch.gd │ └── switch.tscn ├── sync_gun_with_crosshair │ ├── gun_character.gd │ ├── gun_character.gd.uid │ └── gun_character.tscn ├── unit_drag_and_drop │ ├── archer.tscn │ ├── assets │ │ ├── archer single.png │ │ ├── pawn single.png │ │ └── warrior.png │ ├── pawn.tscn │ ├── unit selection.gd │ ├── unit selection.tscn │ ├── unit_container.gd │ ├── unit_container.tscn │ └── warrior.tscn ├── wall_hold_and_climb │ ├── FoxClimb.png │ ├── fox_player.gd │ ├── fox_player.tscn │ └── fox_side_climb.png ├── wall_slide_and_double_wall_jump │ ├── assets │ │ ├── Pink_Monster_Death_8.png │ │ ├── Pink_Monster_Hurt_4.png │ │ ├── Pink_Monster_Idle_4.png │ │ ├── Pink_Monster_Jump_8.png │ │ └── Pink_Monster_Run_6.png │ ├── wall_jump_slide.gd │ └── wall_jump_slide.tscn ├── woodcutter npc │ ├── pawn.tscn │ ├── top_down_scene.tscn │ ├── woodcutter.gd │ ├── woodcutter_house.gd │ ├── woodcutter_house.tscn │ ├── woodcutter_npc.gd │ └── woodcutter_npc.tscn ├── yoshi_create_eggs │ ├── egg.tscn │ ├── scene.tscn │ ├── yoshi.gd │ ├── yoshi.gd.uid │ └── yoshi.tscn ├── yoshi_eggs_follow │ ├── egg.gd │ ├── egg.gd.uid │ ├── egg.tscn │ ├── scene.tscn │ ├── yoshi.gd │ ├── yoshi.gd.uid │ └── yoshi.tscn ├── yoshi_push_objects │ ├── scene.tscn │ ├── stone.gd │ ├── stone.gd.uid │ ├── stone.tscn │ ├── yoshi.gd │ ├── yoshi.gd.uid │ └── yoshi.tscn ├── yoshi_shoot_egg │ ├── egg.gd │ ├── egg.gd.uid │ ├── egg.tscn │ ├── scene.tscn │ ├── yoshi.gd │ ├── yoshi.gd.uid │ └── yoshi.tscn ├── yoshi_stomp │ ├── camera_shake.gd │ ├── pale.gd │ ├── pale.tscn │ ├── scene.tscn │ ├── yoshi.gd │ └── yoshi.tscn ├── yoshi_swallow_enemies │ ├── enemy.gd │ ├── enemy.gd.uid │ ├── enemy.tscn │ ├── scene.tscn │ ├── yoshi.gd │ ├── yoshi.gd.uid │ └── yoshi.tscn └── yoshi_tongue │ ├── scene.tscn │ ├── yoshi.gd │ └── yoshi.tscn ├── 3D ├── 2D_Sprite_character │ ├── 2D_Player.tscn │ ├── 2d_player.gd │ └── assets │ │ ├── DinoSprites - mort.png │ │ └── DinoSprites - mort.png.import ├── Plugin_DragAndDrop3D │ ├── Part1 │ │ └── draganddrop3d │ │ │ ├── dragIcon.png │ │ │ ├── dragIcon.png.import │ │ │ ├── nodes │ │ │ ├── DragAndDrop3D.tscn │ │ │ ├── dragAndDrop3D │ │ │ │ ├── DragAndDrop3D.tscn │ │ │ │ └── drag_and_drop_3d.gd │ │ │ └── draggingObject │ │ │ │ ├── DraggingObject.tscn │ │ │ │ └── dragging_object.gd │ │ │ ├── plugin.cfg │ │ │ ├── plugin.gd │ │ │ └── test │ │ │ └── testScene.tscn │ └── Part2 │ │ ├── DragAndDropGroupHelper.gd │ │ ├── dragIcon.png │ │ ├── dragIcon.png.import │ │ ├── nodes │ │ ├── DragAndDrop3D.tscn │ │ ├── dragAndDrop3D │ │ │ ├── DragAndDrop3D.tscn │ │ │ └── drag_and_drop_3d.gd │ │ └── draggingObject │ │ │ ├── DraggingObject.tscn │ │ │ └── dragging_object.gd │ │ ├── plugin.cfg │ │ ├── plugin.gd │ │ └── test │ │ └── testScene.tscn ├── arcade_sphere_car │ ├── car.gd │ └── car.tscn ├── attract_collectables │ ├── Coin.tscn │ ├── coin.gd │ ├── godot_player.gd │ └── godot_player.tscn ├── car_Ki_with_navigation │ ├── carKI.tscn │ └── car_ki.gd ├── cooldown_and_reload │ ├── Player.tscn │ ├── assets │ │ ├── blasterA.glb │ │ ├── blasterA.glb.import │ │ ├── crosshair007.png │ │ └── crosshair007.png.import │ ├── effects │ │ ├── bulletHole.tscn │ │ ├── bulletTrail.tscn │ │ ├── bullet_hole.gd │ │ └── bullet_trail.gd │ ├── gun.gd │ ├── gun.tscn │ ├── player.gd │ ├── resources │ │ └── guns │ │ │ ├── gun_1.tres │ │ │ └── gun_resource.gd │ ├── target.gd │ └── target.tscn ├── create_gun │ ├── Player.tscn │ ├── assets │ │ ├── blasterA.glb │ │ ├── blasterA.glb.import │ │ ├── crosshair007.png │ │ └── crosshair007.png.import │ ├── gun.gd │ ├── gun.tscn │ ├── player.gd │ ├── resources │ │ └── guns │ │ │ ├── gun_1.tres │ │ │ └── gun_resource.gd │ ├── target.gd │ └── target.tscn ├── damage_indicator │ ├── character.gd │ ├── character.tscn │ ├── damage_indicator.gd │ ├── damage_indicator.tscn │ ├── indicator_label.gd │ └── indicator_label.tscn ├── dash │ ├── character.gd │ ├── character.tscn │ └── platformer_scene.tscn ├── dragAndDrop3D.gd ├── fez_camera │ ├── 2d_Player.tscn │ ├── 2d_player.gd │ └── fez_scene.tscn ├── first_person_camera │ ├── first_person_player.gd │ └── first_person_player.tscn ├── first_person_object_interaction_full_video │ ├── carrot.gd │ ├── carrot.tscn │ ├── first_person_player.gd │ ├── first_person_player.tscn │ ├── kitchen_scene.tscn │ └── room_scene.tscn ├── get_and_cut_cheese │ ├── cheese.gd │ ├── cheese.tscn │ ├── cheese_box.gd │ ├── cheese_box.tscn │ ├── cutting_board.gd │ ├── cutting_board.tscn │ ├── first_person_player.gd │ ├── first_person_player.tscn │ └── kitchen_scene.tscn ├── grid3D │ ├── grid.gd │ └── grid.tscn ├── group_formation │ ├── camera_target.gd │ ├── companion.gd │ ├── companion1.tscn │ ├── companion2.tscn │ ├── group_formation.gd │ ├── group_formation.tscn │ ├── mainChar.tscn │ ├── main_char.gd │ └── platformer_scene.tscn ├── gun_effects │ ├── Player.tscn │ ├── assets │ │ ├── blasterA.glb │ │ ├── blasterA.glb.import │ │ ├── crosshair007.png │ │ └── crosshair007.png.import │ ├── effects │ │ ├── bulletHole.tscn │ │ ├── bulletTrail.tscn │ │ ├── bullet_hole.gd │ │ └── bullet_trail.gd │ ├── gun.gd │ ├── gun.tscn │ ├── player.gd │ ├── resources │ │ └── guns │ │ │ ├── gun_1.tres │ │ │ └── gun_resource.gd │ ├── target.gd │ └── target.tscn ├── interact_with_ui_3D │ ├── door.tscn │ ├── door_lock.gd │ ├── door_lock.gd.uid │ ├── door_lock.tscn │ ├── first_person_player.gd │ ├── first_person_player.gd.uid │ ├── first_person_player.tscn │ ├── house.tscn │ ├── ui.gd │ ├── ui.gd.uid │ └── ui.tscn ├── move_on_grid │ ├── grid.gd │ ├── grid.tscn │ ├── grid_character.gd │ ├── grid_character.tscn │ └── test.tscn ├── moving_platform │ ├── movingPlatform.tscn │ ├── platform_character.gd │ ├── platform_character.tscn │ └── platform_scene.tscn ├── pick_up_and_throw │ ├── ball.gd │ ├── ball.gd.uid │ ├── ball.tscn │ ├── mainChar.tscn │ ├── main_char.gd │ ├── main_char.gd.uid │ └── platformer_scene.tscn ├── pick_up_objects │ ├── carrot.gd │ ├── carrot.tscn │ ├── first_person_player.gd │ ├── first_person_player.tscn │ └── kitchen_scene.tscn ├── racer_track_rounds │ ├── checkPoint.tscn │ ├── check_point.gd │ ├── startPoint.tscn │ ├── start_point.gd │ ├── ui.gd │ └── ui.tscn ├── random_dungeon │ ├── random_dungeon.gd │ ├── random_dungeon.gd.uid │ ├── random_dungeon.tscn │ ├── random_room.gd │ ├── random_room.gd.uid │ └── random_room.tscn ├── random_room │ ├── dungeon_tile_maps │ │ ├── floor_tile_set.tres │ │ ├── floor_tile_set.tscn │ │ ├── wall_tile_set.tres │ │ └── wall_tile_set.tscn │ ├── random_room.gd │ ├── random_room.gd.uid │ └── random_room.tscn ├── rigidBody3D │ ├── ball.tscn │ ├── player.gd │ ├── player.tscn │ └── soccerField.tscn ├── roll_dice │ ├── Dice.gd │ ├── Dice.tscn │ └── dice.glb ├── select_and_switch_targets │ ├── enemy.gd │ ├── enemy.gd.uid │ ├── enemy.tscn │ ├── mainChar.tscn │ ├── main_char.gd │ ├── main_char.gd.uid │ └── platformer_scene.tscn ├── select_nearest_object │ ├── ball.gd │ ├── ball.gd.uid │ ├── ball.tscn │ ├── mainChar.tscn │ ├── main_char.gd │ ├── main_char.gd.uid │ └── platformer_scene.tscn ├── shoot_fireball │ ├── DragonPlayer.gd │ ├── DragonPlayer.tscn │ ├── Fireball.gd │ └── Fireball.tscn ├── simple_car_game_full_video │ ├── car.gd │ ├── car.gd.uid │ ├── car.tscn │ ├── carKI.tscn │ ├── car_ki.gd │ ├── car_ki.gd.uid │ └── race_scene.tscn ├── simple_enemy_ki │ ├── enemy.gd │ ├── enemy.tscn │ ├── platform_character.gd │ ├── platform_character.tscn │ └── platformer_scene.tscn ├── simple_random_dungeon │ ├── dungeon.gd │ ├── dungeon.tscn │ ├── dungeon_room.gd │ ├── dungeon_room.tscn │ └── enemy.tscn ├── simple_state_machine │ ├── boss_duck.gd │ ├── boss_duck.tscn │ ├── follow.gd │ ├── idle.gd │ ├── platform_character.gd │ ├── platform_character.tscn │ ├── platformer_scene.tscn │ └── push.gd ├── store_items_cupboard │ ├── first_person_player.gd │ ├── kitchenCounter.tscn │ └── kitchen_counter.gd ├── switch guns │ ├── Player.tscn │ ├── assets │ │ ├── blasterA.glb │ │ ├── blasterA.glb.import │ │ ├── crosshair007.png │ │ └── crosshair007.png.import │ ├── effects │ │ ├── bulletHole.tscn │ │ ├── bulletTrail.tscn │ │ ├── bullet_hole.gd │ │ └── bullet_trail.gd │ ├── gun.gd │ ├── gun.tscn │ ├── player.gd │ ├── resources │ │ └── guns │ │ │ ├── gun_1.tres │ │ │ ├── gun_2.tres │ │ │ └── gun_resource.gd │ ├── target.gd │ └── target.tscn └── top_down_shooter │ ├── bullet.gd │ ├── bullet.tscn │ ├── tank.gd │ ├── tank.tscn │ └── top_down_scene.tscn ├── README.md ├── UI ├── Map_way_points │ ├── assets │ │ ├── IconButton_Small_Red_Circle.png │ │ ├── IconButton_Small_Red_Circle.png.import │ │ ├── Map.png │ │ ├── Map.png.import │ │ ├── wide.png │ │ └── wide.png.import │ ├── info_window.gd │ ├── info_window.tscn │ ├── map.tscn │ ├── way_point.gd │ └── way_point.tscn ├── Talent_Tree │ ├── resource │ │ ├── talent1.tres │ │ ├── talent2.tres │ │ ├── talent3.tres │ │ ├── talent4.tres │ │ └── talent_resource.gd │ ├── talent_icon.gd │ ├── talent_icon.tscn │ ├── talent_icon_style.tres │ ├── talent_tree.gd │ └── talent_tree.tscn ├── battle_result_screen │ ├── Battle_Result_Screen.tscn │ ├── battle_result_screen.gd │ ├── battle_result_screen.gd.uid │ ├── character_resource.gd │ ├── character_resource.gd.uid │ ├── character_result_container.gd │ ├── character_result_container.gd.uid │ ├── character_result_container.tscn │ ├── player1.tres │ └── player2.tres ├── button_sequence │ ├── buttonSequence.tscn │ └── button_sequence.gd ├── calendar │ ├── DateLabel.tscn │ ├── assets │ │ ├── left-arrow.png │ │ └── left-arrow.png.import │ ├── calendar.gd │ ├── calendar.tscn │ └── date_label.gd ├── carusel_menu │ ├── assets │ │ ├── archer single.png │ │ ├── pawn single.png │ │ └── warrior.png │ ├── carusel_selection.gd │ └── carusel_selection.tscn ├── character_selection │ ├── assets │ │ ├── archer single.png │ │ ├── pawn single.png │ │ └── warrior.png │ ├── characterSlot.gd │ ├── characterSlot.tscn │ ├── global_data.gd │ ├── selection_screen.gd │ └── selection_screen.tscn ├── create_map_path │ ├── circle.png │ ├── circle.png.import │ ├── way_connection.gd │ └── way_connection.tscn ├── dynamic_inspector │ ├── dynamic_inspector.gd │ └── dynamic_inspector.tscn ├── hotbar_with_cooldown │ ├── assets │ │ ├── Inventory_Bar.png │ │ └── Inventory_Bar.png.import │ ├── hotbar.gd │ ├── hotbar.tscn │ ├── hotbar_item.gd │ ├── hotbar_item.tscn │ └── item_resource │ │ ├── health_potion.tres │ │ ├── item_resource.gd │ │ ├── mana_potion.tres │ │ └── mix_potion.tres ├── map_fast_travel │ ├── assets │ │ ├── Fox.png │ │ ├── Fox.png.import │ │ ├── Fox_Map_1.png │ │ ├── Fox_Map_1.png.import │ │ ├── IconButton_Small_Red_Circle.png │ │ ├── IconButton_Small_Red_Circle.png.import │ │ ├── Map.png │ │ ├── Map.png.import │ │ ├── wide.png │ │ └── wide.png.import │ ├── fox_player_Map.tscn │ ├── fox_player_map.gd │ ├── info_window.gd │ ├── info_window.tscn │ ├── map.tscn │ ├── scene.gd │ ├── way_point.gd │ └── way_point.tscn ├── monolog │ ├── Dialog.tscn │ ├── dialog.gd │ ├── frog_character.gd │ ├── frog_character.tscn │ ├── frog_npc.gd │ ├── frog_npc.tscn │ └── plattformer_pixel_adventure.tscn ├── navigation_bar │ ├── navigation_bar.gd │ ├── navigation_bar.tscn │ ├── skill_tree_main_page.tscn │ ├── statistic_main_page.tscn │ └── workout_main_page.tscn ├── radial_menu │ ├── radial_menu_button.gd │ └── radial_menu_button.tscn ├── save_and_load_resources │ ├── DevDrache.tres │ ├── SaveAndLoad.gd │ ├── character_resource.gd │ ├── show_interface.gd │ └── show_interface.tscn ├── series_turn_based_combat │ ├── command_menu │ │ ├── Attack.tres │ │ ├── command_button.tscn │ │ ├── command_menu.gd │ │ ├── command_menu.tscn │ │ ├── heal.tres │ │ ├── skillResource.gd │ │ ├── slash.tres │ │ ├── test_scene.gd │ │ └── test_scene.tscn │ ├── status_bar │ │ ├── Player_Status_Display.tscn │ │ ├── focus_player_stats.tres │ │ ├── player_stats_container.gd │ │ ├── player_stats_container.tscn │ │ ├── player_status_display.gd │ │ ├── resource │ │ │ ├── character_resource.gd │ │ │ ├── enemy1.tres │ │ │ ├── enemy2.tres │ │ │ ├── enemy3.tres │ │ │ ├── player1.tres │ │ │ └── player2.tres │ │ └── turn_based_agent.gd │ ├── targeting_enemies │ │ ├── Attack.tres │ │ ├── character.gd │ │ ├── heal.tres │ │ ├── skillResource.gd │ │ ├── slash.tres │ │ ├── test_scene.tscn │ │ ├── turn_based_agent.gd │ │ └── turn_based_agent.tscn │ ├── turn_and_rounds │ │ ├── Attack.tres │ │ ├── character.gd │ │ ├── command_button.tscn │ │ ├── command_menu.gd │ │ ├── heal.tres │ │ ├── skillResource.gd │ │ ├── slash.tres │ │ ├── test_scene.tscn │ │ ├── turn_based_agent.gd │ │ ├── turn_based_agent.tscn │ │ ├── turn_based_controller.gd │ │ └── turn_based_controller.tscn │ └── turn_order_bar │ │ ├── character_display_container.tscn │ │ ├── turn_based_controller.gd │ │ ├── turn_based_controller.tscn │ │ ├── turn_order_bar.gd │ │ └── turn_order_bar.tscn ├── talent_tree_part2_connect_talent_stats │ ├── knight.gd │ ├── knight.tscn │ ├── resource │ │ ├── character_resource.gd │ │ ├── player.tres │ │ ├── talent1.tres │ │ ├── talent2.tres │ │ ├── talent3.tres │ │ ├── talent4.tres │ │ ├── talent5.tres │ │ ├── talent6.tres │ │ ├── talent7.tres │ │ └── talent_resource.gd │ ├── talE127.tmp │ ├── talent_icon.gd │ ├── talent_icon.tscn │ ├── talent_icon_style.tres │ ├── talent_tree.gd │ └── talent_tree.tscn └── turn_based_system_full_video │ ├── character.gd │ ├── character.gd.uid │ ├── command_menu │ ├── command_button.tscn │ ├── command_menu.gd │ └── command_menu.gd.uid │ ├── player_status_display │ ├── Player_Status_Display.tscn │ ├── focus_player_stats.tres │ ├── player_stats_container.gd │ ├── player_stats_container.gd.uid │ ├── player_stats_container.tscn │ ├── player_status_display.gd │ └── player_status_display.gd.uid │ ├── resource │ ├── character │ │ ├── character_resource.gd │ │ ├── character_resource.gd.uid │ │ ├── enemy1.tres │ │ ├── enemy2.tres │ │ ├── enemy3.tres │ │ ├── player1.tres │ │ └── player2.tres │ └── skills │ │ ├── Attack.tres │ │ ├── heal.tres │ │ ├── skillResource.gd │ │ ├── skillResource.gd.uid │ │ └── slash.tres │ ├── turnOrderScene.tscn │ ├── turn_based_agent.gd │ ├── turn_based_agent.gd.uid │ ├── turn_based_agent.tscn │ ├── turn_based_controller.gd │ ├── turn_based_controller.gd.uid │ ├── turn_based_controller.tscn │ └── turn_order_bar │ ├── character_display_container.tscn │ ├── turn_order_bar.gd │ ├── turn_order_bar.gd.uid │ └── turn_order_bar.tscn ├── effects ├── car_sound │ ├── car horn.mp3 │ ├── car idle.mp3 │ ├── car start.mp3 │ ├── speed_car.gd │ └── speed_car.tscn ├── firefly_effect │ ├── Flare_small.PNG │ ├── Flare_small.PNG.import │ ├── firefly_effect.gd │ ├── firefly_effect.gd.uid │ ├── firefly_effect.tscn │ └── plattformer_pixel_adventure.tscn └── simple_shake_camera │ └── camera_2d.gd ├── shader ├── 2D_interactive_grass │ ├── assets │ │ ├── grass.png │ │ └── grass.png.import │ ├── interactive_grass.gd │ ├── interactive_grass.gdshader │ └── interactive_grass.tscn └── 3D_simple_water_shader │ ├── water.tres │ └── water.tscn └── templates └── 2D_top_down_basic.gd /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | ko_fi: devdrache 2 | 3 | -------------------------------------------------------------------------------- /2D/8_direction_animation/Idle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/8_direction_animation/Idle.png -------------------------------------------------------------------------------- /2D/8_direction_animation/Idle.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://c7wfaseajj8yt" 6 | path="res://.godot/imported/Idle.png-8d2b0601bd32573c4f30204c8950d076.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://8_direction_animation/Idle.png" 14 | dest_files=["res://.godot/imported/Idle.png-8d2b0601bd32573c4f30204c8950d076.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /2D/8_direction_animation/Walk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/8_direction_animation/Walk.png -------------------------------------------------------------------------------- /2D/8_direction_animation/Walk.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://3rmfwwi45ah0" 6 | path="res://.godot/imported/Walk.png-23e2839c2aa0ef7de34bdfdde38f84cd.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://8_direction_animation/Walk.png" 14 | dest_files=["res://.godot/imported/Walk.png-23e2839c2aa0ef7de34bdfdde38f84cd.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /2D/@tool rope/Rope2 3px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/@tool rope/Rope2 3px.png -------------------------------------------------------------------------------- /2D/@tool rope/rope.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=4 format=3 uid="uid://duq8682s3qda3"] 2 | 3 | [ext_resource type="Script" path="res://tutorial_collection/toolRope/rope.gd" id="1_dunjd"] 4 | [ext_resource type="Texture2D" uid="uid://b18k88vm580qv" path="res://assets/sprites/ropes/Rope2 3px.png" id="2_4yfor"] 5 | 6 | [sub_resource type="RectangleShape2D" id="RectangleShape2D_r2f2l"] 7 | size = Vector2(3, 176) 8 | 9 | [node name="Rope" type="Area2D" groups=["rope"]] 10 | script = ExtResource("1_dunjd") 11 | ropeTexture = ExtResource("2_4yfor") 12 | length = 11 13 | 14 | [node name="CollisionShape2D" type="CollisionShape2D" parent="."] 15 | position = Vector2(0.5, 80) 16 | shape = SubResource("RectangleShape2D_r2f2l") 17 | -------------------------------------------------------------------------------- /2D/arch_arrow/Arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/arch_arrow/Arrow.png -------------------------------------------------------------------------------- /2D/arch_arrow/arch_arrow.gd: -------------------------------------------------------------------------------- 1 | extends Path2D 2 | 3 | @export var speed = 500 4 | @export var targetPosition: Vector2 5 | 6 | @onready var path_follow_2d = $PathFollow2D 7 | 8 | func _ready(): 9 | curve.set_point_out(0,Vector2(targetPosition.x / 2, - abs(targetPosition.x))) 10 | curve.set_point_position(1, targetPosition) 11 | 12 | func _process(delta): 13 | if not targetPosition: return 14 | 15 | if path_follow_2d.progress_ratio >= 0.98: queue_free() 16 | 17 | path_follow_2d.progress += speed * delta 18 | -------------------------------------------------------------------------------- /2D/car_light/light cone texture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/car_light/light cone texture.png -------------------------------------------------------------------------------- /2D/character_move_on_grid/Grid.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://bo1cpe7ekrm1q"] 2 | 3 | [ext_resource type="Script" path="res://2D_move_character_in_grid/grid.gd" id="1_u48it"] 4 | 5 | [node name="Grid" type="GridContainer"] 6 | anchors_preset = 15 7 | anchor_right = 1.0 8 | anchor_bottom = 1.0 9 | grow_horizontal = 2 10 | grow_vertical = 2 11 | columns = 5 12 | script = ExtResource("1_u48it") 13 | -------------------------------------------------------------------------------- /2D/character_move_on_grid/grid_cell.gd: -------------------------------------------------------------------------------- 1 | extends PanelContainer 2 | 3 | func highlight_cell(): 4 | var styleBox := get_theme_stylebox("panel").duplicate() 5 | styleBox.bg_color = Color(1,1,0,0.5) 6 | add_theme_stylebox_override("panel",styleBox) 7 | 8 | func select_cell(): 9 | var styleBox := get_theme_stylebox("panel").duplicate() 10 | styleBox.bg_color = Color(1,1,1, 0.5) 11 | add_theme_stylebox_override("panel",styleBox) 12 | 13 | func deselect_cell(): 14 | var styleBox := get_theme_stylebox("panel").duplicate() 15 | styleBox.bg_color = Color(0.5,0.5,0.5, 0.5) 16 | add_theme_stylebox_override("panel",styleBox) 17 | 18 | func get_center_position(): 19 | return global_position + size / 2 20 | -------------------------------------------------------------------------------- /2D/character_move_on_grid/grid_cell.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://dfuis7ev3jsyx"] 2 | 3 | [ext_resource type="Script" path="res://2D_move_character_in_grid/grid_cell.gd" id="1_yhhsd"] 4 | 5 | [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_5b1hb"] 6 | bg_color = Color(0.5, 0.5, 0.5, 0.5) 7 | border_width_left = 2 8 | border_width_top = 2 9 | border_width_right = 2 10 | border_width_bottom = 2 11 | border_color = Color(0, 0, 0, 1) 12 | 13 | [node name="PanelContainer" type="PanelContainer"] 14 | custom_minimum_size = Vector2(32, 32) 15 | mouse_filter = 1 16 | theme_override_styles/panel = SubResource("StyleBoxFlat_5b1hb") 17 | script = ExtResource("1_yhhsd") 18 | -------------------------------------------------------------------------------- /2D/chop_tree/Pawn_Blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/chop_tree/Pawn_Blue.png -------------------------------------------------------------------------------- /2D/chop_tree/Tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/chop_tree/Tree.png -------------------------------------------------------------------------------- /2D/chop_tree/tree.gd: -------------------------------------------------------------------------------- 1 | extends StaticBody2D 2 | 3 | @onready var animated_sprite_2d = $AnimatedSprite2D 4 | 5 | var health = 3 6 | 7 | func _ready(): 8 | add_to_group("trees") 9 | 10 | func _process(delta): 11 | if health == 0: _death() 12 | 13 | func _death(): 14 | if health > 0: return 15 | 16 | animated_sprite_2d.play("death") 17 | 18 | func get_hit(playerDirectionX): 19 | animated_sprite_2d.flip_h = playerDirectionX == 1 20 | animated_sprite_2d.play("chop") 21 | 22 | health -= 1 23 | 24 | 25 | func _on_animated_sprite_2d_animation_finished(): 26 | animated_sprite_2d.flip_h = false 27 | animated_sprite_2d.play("idle") 28 | -------------------------------------------------------------------------------- /2D/connect_switches/door.gd: -------------------------------------------------------------------------------- 1 | extends Node2D 2 | 3 | @onready var animated_sprite_2d: AnimatedSprite2D = $AnimatedSprite2D 4 | 5 | func activate(boolean: bool): 6 | if boolean: 7 | animated_sprite_2d.play("open") 8 | else: 9 | animated_sprite_2d.play_backwards("open") 10 | -------------------------------------------------------------------------------- /2D/connect_switches/door.gd.uid: -------------------------------------------------------------------------------- 1 | uid://dnhxgylngny3p 2 | -------------------------------------------------------------------------------- /2D/connect_switches/frog_character.gd.uid: -------------------------------------------------------------------------------- 1 | uid://xhta2jswbjg8 2 | -------------------------------------------------------------------------------- /2D/connect_switches/switch.gd: -------------------------------------------------------------------------------- 1 | extends Node2D 2 | 3 | @export var connectedObject:Node2D 4 | @export var groupName: String 5 | 6 | @onready var animated_sprite_2d: AnimatedSprite2D = $AnimatedSprite2D 7 | 8 | var isActive = false 9 | 10 | func _ready() -> void: 11 | add_to_group(groupName) 12 | 13 | func _on_area_2d_body_entered(body: Node2D) -> void: 14 | if body == get_tree().get_first_node_in_group("player"): 15 | for object in get_tree().get_nodes_in_group(groupName): 16 | object.use_switch() 17 | 18 | func use_switch(): 19 | if isActive: 20 | animated_sprite_2d.play_backwards("activate") 21 | else: 22 | animated_sprite_2d.play("activate") 23 | 24 | await animated_sprite_2d.animation_finished 25 | connectedObject.activate(not isActive) 26 | isActive = not isActive 27 | -------------------------------------------------------------------------------- /2D/connect_switches/switch.gd.uid: -------------------------------------------------------------------------------- 1 | uid://ct7aq0cm4hjuw 2 | -------------------------------------------------------------------------------- /2D/create_grid_map/Grid.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://bo1cpe7ekrm1q"] 2 | 3 | [ext_resource type="PackedScene" uid="uid://bjj0nk40mshxd" path="res://grid_map P2/grid_cell.tscn" id="2_y0eii"] 4 | 5 | [node name="Grid" type="GridContainer"] 6 | anchors_preset = 15 7 | anchor_right = 1.0 8 | anchor_bottom = 1.0 9 | grow_horizontal = 2 10 | grow_vertical = 2 11 | columns = 5 12 | 13 | [node name="PanelContainer2" parent="." instance=ExtResource("2_y0eii")] 14 | layout_mode = 2 15 | -------------------------------------------------------------------------------- /2D/create_grid_map/grid_cell.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://dfuis7ev3jsyx"] 2 | 3 | [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_5b1hb"] 4 | bg_color = Color(0.5, 0.5, 0.5, 0.5) 5 | border_width_left = 2 6 | border_width_top = 2 7 | border_width_right = 2 8 | border_width_bottom = 2 9 | border_color = Color(0, 0, 0, 1) 10 | 11 | [node name="PanelContainer" type="PanelContainer"] 12 | custom_minimum_size = Vector2(32, 32) 13 | theme_override_styles/panel = SubResource("StyleBoxFlat_5b1hb") 14 | -------------------------------------------------------------------------------- /2D/dash_with_effect/asset/Pink_Monster_Death_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/dash_with_effect/asset/Pink_Monster_Death_8.png -------------------------------------------------------------------------------- /2D/dash_with_effect/asset/Pink_Monster_Hurt_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/dash_with_effect/asset/Pink_Monster_Hurt_4.png -------------------------------------------------------------------------------- /2D/dash_with_effect/asset/Pink_Monster_Idle_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/dash_with_effect/asset/Pink_Monster_Idle_4.png -------------------------------------------------------------------------------- /2D/dash_with_effect/asset/Pink_Monster_Jump_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/dash_with_effect/asset/Pink_Monster_Jump_8.png -------------------------------------------------------------------------------- /2D/dash_with_effect/asset/Pink_Monster_Run_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/dash_with_effect/asset/Pink_Monster_Run_6.png -------------------------------------------------------------------------------- /2D/day_and_night_cycle/day_and_night_cycle.gd: -------------------------------------------------------------------------------- 1 | extends CanvasModulate 2 | class_name DayAndNightCycle 3 | 4 | signal changeDayTime(dayTime: DAY_STATE) 5 | 6 | @onready var animation_player: AnimationPlayer = $AnimationPlayer 7 | 8 | enum DAY_STATE{NOON, EVENING} 9 | 10 | var dayTime : DAY_STATE = DAY_STATE.NOON 11 | 12 | func _ready() -> void: 13 | add_to_group("dayAndNightCycle") 14 | 15 | func _process(delta: float) -> void: 16 | var animationPos = animation_player.current_animation_position 17 | var animationLength = animation_player.current_animation_length / 2 18 | 19 | if animationPos > animationLength: 20 | dayTime = DAY_STATE.EVENING 21 | changeDayTime.emit(dayTime) 22 | elif animationPos < animationLength: 23 | dayTime = DAY_STATE.NOON 24 | changeDayTime.emit(dayTime) 25 | -------------------------------------------------------------------------------- /2D/diagonal_movement/knight.gd: -------------------------------------------------------------------------------- 1 | extends CharacterBody2D 2 | 3 | @onready var animated_sprite_2d: AnimatedSprite2D = $AnimatedSprite2D 4 | 5 | const SPEED = 300.0 6 | 7 | func _physics_process(delta: float) -> void: 8 | var direction := Vector2.ZERO 9 | direction.x = Input.get_axis("ui_left", "ui_right") 10 | direction.y = Input.get_axis("ui_up", "ui_down") 11 | 12 | if direction: 13 | velocity = direction.normalized() * SPEED 14 | else: 15 | velocity = Vector2.ZERO 16 | 17 | set_animation(direction) 18 | 19 | move_and_slide() 20 | 21 | func set_animation(direction): 22 | if direction.x > 0: animated_sprite_2d.flip_h = false 23 | elif direction.x < 0: animated_sprite_2d.flip_h = true 24 | 25 | if velocity: 26 | animated_sprite_2d.play("walk") 27 | else: 28 | animated_sprite_2d.play("idle") 29 | -------------------------------------------------------------------------------- /2D/dino_ride/assets/DinoSprites - doux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/dino_ride/assets/DinoSprites - doux.png -------------------------------------------------------------------------------- /2D/dino_ride/assets/player.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/dino_ride/assets/player.png -------------------------------------------------------------------------------- /2D/dino_ride/assets/player.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://djle4e2tk3com" 6 | path="res://.godot/imported/player.png-eca3d67defbdfeaeab7b6a7228ac6f80.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://dino_ride/assets/player.png" 14 | dest_files=["res://.godot/imported/player.png-eca3d67defbdfeaeab7b6a7228ac6f80.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /2D/endless_runner_level/endless_runner_scene.gd: -------------------------------------------------------------------------------- 1 | extends Node2D 2 | 3 | @export var speed = 0.1 4 | 5 | @onready var tile_map_layer: TileMapLayer = $TileMapLayer 6 | 7 | func _process(delta: float) -> void: 8 | tile_map_layer.position.x -= speed 9 | 10 | if tile_map_layer.position.x < -270: 11 | tile_map_layer.position.x = 0 12 | _change_tile_map() 13 | 14 | func _change_tile_map(): 15 | pass 16 | #maybe another time 17 | -------------------------------------------------------------------------------- /2D/endless_runner_level/parallax_background.gd: -------------------------------------------------------------------------------- 1 | extends ParallaxBackground 2 | 3 | @onready var sky: ParallaxLayer = $ParallaxLayer 4 | @onready var wood1: ParallaxLayer = $ParallaxLayer2 5 | @onready var wood2: ParallaxLayer = $ParallaxLayer3 6 | 7 | @export var skySpeed = 0.1 8 | @export var woodSpeed = 0.2 9 | 10 | func _process(delta: float) -> void: 11 | sky.motion_offset -= Vector2(skySpeed,0) 12 | wood1.motion_offset -= Vector2(woodSpeed,0) 13 | wood2.motion_offset -= Vector2(woodSpeed,0) 14 | -------------------------------------------------------------------------------- /2D/endless_runner_obstacles/box.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=4 format=3 uid="uid://ccygkuytievgr"] 2 | 3 | [ext_resource type="Texture2D" uid="uid://dm0nkwmhar3ve" path="res://block-big.png" id="1_h5ub7"] 4 | [ext_resource type="Script" path="res://2D_endless_runner_obstacles/obstacle.gd" id="1_q4ii0"] 5 | 6 | [sub_resource type="RectangleShape2D" id="RectangleShape2D_ackgu"] 7 | size = Vector2(32, 32) 8 | 9 | [node name="Box" type="CharacterBody2D"] 10 | script = ExtResource("1_q4ii0") 11 | spawnPoint = Vector2(350, 160) 12 | 13 | [node name="Sprite2D" type="Sprite2D" parent="."] 14 | texture = ExtResource("1_h5ub7") 15 | 16 | [node name="Area2D" type="Area2D" parent="."] 17 | 18 | [node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] 19 | shape = SubResource("RectangleShape2D_ackgu") 20 | -------------------------------------------------------------------------------- /2D/endless_runner_obstacles/eagle.gd: -------------------------------------------------------------------------------- 1 | extends Obstacle 2 | 3 | func _process(delta: float) -> void: 4 | $AnimatedSprite2D.play("fly") 5 | -------------------------------------------------------------------------------- /2D/endless_runner_obstacles/endless_runner_scene.gd: -------------------------------------------------------------------------------- 1 | extends Node2D 2 | 3 | @export var speed = 0.1 4 | 5 | @onready var tile_map_layer: TileMapLayer = $TileMapLayer 6 | 7 | const EAGLE = preload("res://eagle.tscn") 8 | const BOX = preload("res://box.tscn") 9 | 10 | var obstacleList: Array = [EAGLE, BOX] 11 | 12 | func _process(delta: float) -> void: 13 | tile_map_layer.position.x -= speed 14 | 15 | if tile_map_layer.position.x < -270: 16 | tile_map_layer.position.x = 0 17 | _change_tile_map() 18 | 19 | func _change_tile_map(): 20 | pass 21 | #maybe another time 22 | 23 | func _on_obstacle_spawn_timer_timeout() -> void: 24 | _spawn_obstacles() 25 | 26 | func _spawn_obstacles(): 27 | var obstacleNode = obstacleList.pick_random().instantiate() 28 | add_child(obstacleNode) 29 | obstacleNode.global_position = obstacleNode.get_spawn_point() 30 | -------------------------------------------------------------------------------- /2D/endless_runner_obstacles/obstacle.gd: -------------------------------------------------------------------------------- 1 | extends CharacterBody2D 2 | class_name Obstacle 3 | 4 | @export var spawnPoint = Vector2.ZERO 5 | 6 | const SPEED = 100 7 | 8 | func _ready() -> void: 9 | $Area2D.body_entered.connect(_on_body_entered) 10 | 11 | func _on_body_entered(body): 12 | if body.is_in_group("player"): 13 | body.take_damage(1) 14 | 15 | func _physics_process(delta: float) -> void: 16 | velocity.x = -SPEED 17 | 18 | move_and_slide() 19 | 20 | if global_position.x <= 0: 21 | queue_free() 22 | 23 | func get_spawn_point(): 24 | return spawnPoint 25 | -------------------------------------------------------------------------------- /2D/endless_runner_obstacles/parallax_background.gd: -------------------------------------------------------------------------------- 1 | extends ParallaxBackground 2 | 3 | @onready var sky: ParallaxLayer = $ParallaxLayer 4 | @onready var wood1: ParallaxLayer = $ParallaxLayer2 5 | @onready var wood2: ParallaxLayer = $ParallaxLayer3 6 | 7 | @export var skySpeed = 0.1 8 | @export var woodSpeed = 0.2 9 | 10 | func _process(delta: float) -> void: 11 | sky.motion_offset -= Vector2(skySpeed,0) 12 | wood1.motion_offset -= Vector2(woodSpeed,0) 13 | wood2.motion_offset -= Vector2(woodSpeed,0) 14 | -------------------------------------------------------------------------------- /2D/enter_and_control_car/Blue_SPORT_CLEAN_EAST_000-sheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/enter_and_control_car/Blue_SPORT_CLEAN_EAST_000-sheet.png -------------------------------------------------------------------------------- /2D/enter_and_control_car/Blue_SPORT_CLEAN_NORTHEAST_000-sheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/enter_and_control_car/Blue_SPORT_CLEAN_NORTHEAST_000-sheet.png -------------------------------------------------------------------------------- /2D/enter_and_control_car/Blue_SPORT_CLEAN_NORTHWEST_000-sheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/enter_and_control_car/Blue_SPORT_CLEAN_NORTHWEST_000-sheet.png -------------------------------------------------------------------------------- /2D/enter_and_control_car/Blue_SPORT_CLEAN_NORTH_000-sheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/enter_and_control_car/Blue_SPORT_CLEAN_NORTH_000-sheet.png -------------------------------------------------------------------------------- /2D/enter_and_control_car/Blue_SPORT_CLEAN_SOUTHEAST_000-sheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/enter_and_control_car/Blue_SPORT_CLEAN_SOUTHEAST_000-sheet.png -------------------------------------------------------------------------------- /2D/enter_and_control_car/Blue_SPORT_CLEAN_SOUTHWEST_000-sheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/enter_and_control_car/Blue_SPORT_CLEAN_SOUTHWEST_000-sheet.png -------------------------------------------------------------------------------- /2D/enter_and_control_car/Blue_SPORT_CLEAN_SOUTH_000-sheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/enter_and_control_car/Blue_SPORT_CLEAN_SOUTH_000-sheet.png -------------------------------------------------------------------------------- /2D/enter_and_control_car/Blue_SPORT_CLEAN_WEST_000-sheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/enter_and_control_car/Blue_SPORT_CLEAN_WEST_000-sheet.png -------------------------------------------------------------------------------- /2D/fan_platformer/fan.gd: -------------------------------------------------------------------------------- 1 | extends StaticBody2D 2 | 3 | @export var fanStrength := 100 4 | 5 | var playerBody 6 | 7 | func _physics_process(delta: float) -> void: 8 | if playerBody: playerBody.velocity.y = -fanStrength 9 | 10 | func _on_area_2d_body_entered(body: Node2D) -> void: 11 | if body.is_in_group("player"): 12 | playerBody = body 13 | 14 | func _on_area_2d_body_exited(body: Node2D) -> void: 15 | if body.is_in_group("player"): 16 | playerBody = null 17 | -------------------------------------------------------------------------------- /2D/fishing_minigame_serie/fishing minigame/assets/Box_Orange_Square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/fishing_minigame_serie/fishing minigame/assets/Box_Orange_Square.png -------------------------------------------------------------------------------- /2D/fishing_minigame_serie/fishing minigame/assets/Orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/fishing_minigame_serie/fishing minigame/assets/Orange.png -------------------------------------------------------------------------------- /2D/fishing_minigame_serie/fishing minigame/assets/SlimSlider_Background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/fishing_minigame_serie/fishing minigame/assets/SlimSlider_Background.png -------------------------------------------------------------------------------- /2D/fishing_minigame_serie/fishing minigame/assets/SlimSlider_Base.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/fishing_minigame_serie/fishing minigame/assets/SlimSlider_Base.png -------------------------------------------------------------------------------- /2D/fishing_minigame_serie/fishing minigame/assets/crosshair026.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/fishing_minigame_serie/fishing minigame/assets/crosshair026.png -------------------------------------------------------------------------------- /2D/fishing_minigame_serie/fishing minigame/target.gd: -------------------------------------------------------------------------------- 1 | extends Area2D 2 | 3 | signal target_entered() 4 | signal target_exited() 5 | 6 | const SPEED := 200 7 | 8 | var on_fish := false 9 | 10 | func _physics_process(delta: float) -> void: 11 | _check_on_fish() 12 | 13 | var direction := Vector2.ZERO 14 | direction.x = Input.get_axis("ui_left", "ui_right") 15 | direction.y = Input.get_axis("ui_up", "ui_down") 16 | 17 | global_position += direction * SPEED * delta 18 | 19 | func _check_on_fish() -> void: 20 | var bodies := get_overlapping_bodies() 21 | 22 | if bodies.is_empty() and on_fish: 23 | on_fish = false 24 | target_exited.emit() 25 | elif not bodies.is_empty() and not on_fish: 26 | on_fish = true 27 | target_entered.emit() 28 | -------------------------------------------------------------------------------- /2D/fishing_minigame_serie/fishing minigame/target.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=4 format=3 uid="uid://d3t8ptgatajj7"] 2 | 3 | [ext_resource type="Script" path="res://fishing minigame/target.gd" id="1_tturu"] 4 | [ext_resource type="Texture2D" uid="uid://cebxve41gms4r" path="res://fishing minigame/assets/crosshair026.png" id="2_kp1jm"] 5 | 6 | [sub_resource type="RectangleShape2D" id="RectangleShape2D_5ktnj"] 7 | size = Vector2(45, 45) 8 | 9 | [node name="Target" type="Area2D"] 10 | script = ExtResource("1_tturu") 11 | 12 | [node name="Sprite2D" type="Sprite2D" parent="."] 13 | texture = ExtResource("2_kp1jm") 14 | 15 | [node name="CollisionShape2D" type="CollisionShape2D" parent="."] 16 | shape = SubResource("RectangleShape2D_5ktnj") 17 | -------------------------------------------------------------------------------- /2D/fishing_minigame_serie/fishing_rod/assets/fishing_end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/fishing_minigame_serie/fishing_rod/assets/fishing_end.png -------------------------------------------------------------------------------- /2D/fishing_minigame_serie/fishing_rod/assets/fishing_start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/fishing_minigame_serie/fishing_rod/assets/fishing_start.png -------------------------------------------------------------------------------- /2D/fishing_minigame_serie/fishing_rod/assets/idle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/fishing_minigame_serie/fishing_rod/assets/idle.png -------------------------------------------------------------------------------- /2D/fishing_minigame_serie/fishing_rod/assets/run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/fishing_minigame_serie/fishing_rod/assets/run.png -------------------------------------------------------------------------------- /2D/fishing_minigame_serie/fishing_rod/assets/walk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/fishing_minigame_serie/fishing_rod/assets/walk.png -------------------------------------------------------------------------------- /2D/fishing_minigame_serie/full_version/assets/Box_Orange_Square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/fishing_minigame_serie/full_version/assets/Box_Orange_Square.png -------------------------------------------------------------------------------- /2D/fishing_minigame_serie/full_version/assets/Orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/fishing_minigame_serie/full_version/assets/Orange.png -------------------------------------------------------------------------------- /2D/fishing_minigame_serie/full_version/assets/SlimSlider_Background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/fishing_minigame_serie/full_version/assets/SlimSlider_Background.png -------------------------------------------------------------------------------- /2D/fishing_minigame_serie/full_version/assets/SlimSlider_Base.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/fishing_minigame_serie/full_version/assets/SlimSlider_Base.png -------------------------------------------------------------------------------- /2D/fishing_minigame_serie/full_version/assets/crosshair026.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/fishing_minigame_serie/full_version/assets/crosshair026.png -------------------------------------------------------------------------------- /2D/fishing_minigame_serie/full_version/target.gd: -------------------------------------------------------------------------------- 1 | extends Area2D 2 | 3 | signal target_entered() 4 | signal target_exited() 5 | 6 | const SPEED := 200 7 | 8 | var on_fish := false 9 | 10 | func _physics_process(delta: float) -> void: 11 | _check_on_fish() 12 | 13 | var direction := Vector2.ZERO 14 | direction.x = Input.get_axis("ui_left", "ui_right") 15 | direction.y = Input.get_axis("ui_up", "ui_down") 16 | 17 | global_position += direction * SPEED * delta 18 | 19 | func _check_on_fish() -> void: 20 | var bodies := get_overlapping_bodies() 21 | 22 | if bodies.is_empty() and on_fish: 23 | on_fish = false 24 | target_exited.emit() 25 | elif not bodies.is_empty() and not on_fish: 26 | on_fish = true 27 | target_entered.emit() 28 | -------------------------------------------------------------------------------- /2D/fishing_minigame_serie/full_version/target.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=4 format=3 uid="uid://d3t8ptgatajj7"] 2 | 3 | [ext_resource type="Script" path="res://tutorial_collection/fishing minigame/target.gd" id="1_tturu"] 4 | [ext_resource type="Texture2D" uid="uid://cebxve41gms4r" path="res://tutorial_collection/fishing minigame/assets/crosshair026.png" id="2_kp1jm"] 5 | 6 | [sub_resource type="RectangleShape2D" id="RectangleShape2D_5ktnj"] 7 | size = Vector2(45, 45) 8 | 9 | [node name="Target" type="Area2D"] 10 | script = ExtResource("1_tturu") 11 | 12 | [node name="Sprite2D" type="Sprite2D" parent="."] 13 | texture = ExtResource("2_kp1jm") 14 | 15 | [node name="CollisionShape2D" type="CollisionShape2D" parent="."] 16 | shape = SubResource("RectangleShape2D_5ktnj") 17 | -------------------------------------------------------------------------------- /2D/fishing_minigame_serie/wait_for_fish/assets/fishing_end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/fishing_minigame_serie/wait_for_fish/assets/fishing_end.png -------------------------------------------------------------------------------- /2D/fishing_minigame_serie/wait_for_fish/assets/fishing_start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/fishing_minigame_serie/wait_for_fish/assets/fishing_start.png -------------------------------------------------------------------------------- /2D/gravity_field/gravity_field.gd: -------------------------------------------------------------------------------- 1 | extends Area2D 2 | 3 | @onready var collision_shape_2d: CollisionShape2D = $CollisionShape2D 4 | 5 | func _draw() -> void: 6 | draw_rect(collision_shape_2d.shape.get_rect(), collision_shape_2d.debug_color) 7 | 8 | func _on_body_entered(body: Node2D) -> void: 9 | if body.is_in_group("player"): 10 | body.reverse_gravity(true) 11 | 12 | func _on_body_exited(body: Node2D) -> void: 13 | if body.is_in_group("player"): 14 | body.reverse_gravity(false) 15 | -------------------------------------------------------------------------------- /2D/gravity_field/gravity_field.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://b33xdjn6gyigp"] 2 | 3 | [ext_resource type="Script" path="res://gravity_field/gravity_field.gd" id="1_8amid"] 4 | 5 | [sub_resource type="RectangleShape2D" id="RectangleShape2D_27xvo"] 6 | size = Vector2(113, 208) 7 | 8 | [node name="GravityField" type="Area2D"] 9 | script = ExtResource("1_8amid") 10 | 11 | [node name="CollisionShape2D" type="CollisionShape2D" parent="."] 12 | position = Vector2(2.5, 0) 13 | shape = SubResource("RectangleShape2D_27xvo") 14 | 15 | [node name="CPUParticles2D" type="CPUParticles2D" parent="."] 16 | position = Vector2(0, 51) 17 | amount = 30 18 | lifetime = 0.5 19 | speed_scale = 0.1 20 | emission_shape = 1 21 | emission_sphere_radius = 50.0 22 | gravity = Vector2(0, -980) 23 | 24 | [connection signal="body_entered" from="." to="." method="_on_body_entered"] 25 | [connection signal="body_exited" from="." to="." method="_on_body_exited"] 26 | -------------------------------------------------------------------------------- /2D/handle_bridge_top_down/layer_switch.gd: -------------------------------------------------------------------------------- 1 | extends Area2D 2 | 3 | signal change_layer() 4 | 5 | @onready var collision_shape_2d: CollisionShape2D = $CollisionShape2D 6 | 7 | var entryPoint := Vector2.ZERO 8 | 9 | func _ready() -> void: 10 | add_to_group("layer_switch") 11 | 12 | func _change_layer(body): 13 | var changePoint : Vector2 = collision_shape_2d.shape.size / 2 14 | var movedDistance = entryPoint - body.global_position 15 | 16 | if abs(movedDistance.y) > changePoint.y: 17 | change_layer.emit() 18 | 19 | func _on_body_entered(body: Node2D) -> void: 20 | if body.is_in_group("player"): 21 | entryPoint = body.global_position 22 | 23 | func _on_body_exited(body: Node2D) -> void: 24 | if body.is_in_group("player"): 25 | _change_layer(body) 26 | -------------------------------------------------------------------------------- /2D/handle_bridge_top_down/layer_switch.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://clp3n4uqnf32f"] 2 | 3 | [ext_resource type="Script" path="res://2D_handle_bridge_top_down/layer_switch.gd" id="1_5x2vf"] 4 | 5 | [sub_resource type="RectangleShape2D" id="RectangleShape2D_jy8li"] 6 | size = Vector2(125, 61) 7 | 8 | [node name="layer_switch" type="Area2D"] 9 | script = ExtResource("1_5x2vf") 10 | 11 | [node name="CollisionShape2D" type="CollisionShape2D" parent="."] 12 | position = Vector2(704.5, 480.5) 13 | shape = SubResource("RectangleShape2D_jy8li") 14 | 15 | [connection signal="body_entered" from="." to="." method="_on_body_entered"] 16 | [connection signal="body_exited" from="." to="." method="_on_body_exited"] 17 | -------------------------------------------------------------------------------- /2D/handle_bridge_top_down/top_down_scene.gd: -------------------------------------------------------------------------------- 1 | extends Node2D 2 | 3 | @onready var bridge_down: TileMapLayer = $environment/TileMap/BridgeDown 4 | @onready var bridge_above: TileMapLayer = $environment/TileMap/BridgeAbove 5 | 6 | 7 | func _ready() -> void: 8 | for layerSwitch in get_tree().get_nodes_in_group("layer_switch"): 9 | layerSwitch.change_layer.connect(_change_layer) 10 | 11 | func _change_layer(): 12 | bridge_down.enabled = not bridge_down.enabled 13 | bridge_above.enabled = not bridge_above.enabled 14 | -------------------------------------------------------------------------------- /2D/handle_multiple_floors/house_layer.gd: -------------------------------------------------------------------------------- 1 | extends TileMapLayer 2 | 3 | @export var default := false 4 | 5 | func _ready() -> void: 6 | set_active(default) 7 | 8 | func set_active(boolean: bool) -> void: 9 | enabled = boolean 10 | 11 | for child: TileMapLayer in get_children(): 12 | child.enabled = boolean 13 | -------------------------------------------------------------------------------- /2D/handle_multiple_floors/player.gd: -------------------------------------------------------------------------------- 1 | extends CharacterBody2D 2 | 3 | @onready var animated_sprite_2d: AnimatedSprite2D = $AnimatedSprite2D 4 | 5 | const SPEED = 75.0 6 | 7 | func _ready() -> void: 8 | add_to_group("player") 9 | 10 | func _physics_process(delta: float) -> void: 11 | var direction := Vector2.ZERO 12 | direction.x = Input.get_axis("ui_left", "ui_right") 13 | direction.y = Input.get_axis("ui_up", "ui_down") 14 | 15 | if direction: 16 | velocity = direction * SPEED 17 | else: 18 | velocity = Vector2.ZERO 19 | 20 | _set_animation() 21 | 22 | move_and_slide() 23 | 24 | func _set_animation(): 25 | if velocity.x > 0: 26 | animated_sprite_2d.flip_h = false 27 | elif velocity.x < 0: 28 | animated_sprite_2d.flip_h = true 29 | 30 | if velocity: 31 | animated_sprite_2d.play("walk") 32 | else: 33 | animated_sprite_2d.play("idle") 34 | -------------------------------------------------------------------------------- /2D/handle_multiple_floors/switch_layer_point.gd: -------------------------------------------------------------------------------- 1 | extends Area2D 2 | 3 | @export var layer1: TileMapLayer 4 | @export var layer2: TileMapLayer 5 | @export var reverseSwitch := false 6 | 7 | const MINIMUM_DISTANCE = 4 8 | 9 | var enterPoint: Vector2 10 | 11 | func _on_body_entered(body: Node2D) -> void: 12 | if body == get_tree().get_first_node_in_group("player"): 13 | enterPoint = body.global_position 14 | _switch_layer() 15 | 16 | func _on_body_exited(body: Node2D) -> void: 17 | if body == get_tree().get_first_node_in_group("player"): 18 | var leaveOnSamePoint = enterPoint.distance_to(body.global_position) < MINIMUM_DISTANCE 19 | 20 | if leaveOnSamePoint and not reverseSwitch: 21 | _switch_layer() 22 | 23 | func _switch_layer(): 24 | layer1.set_active(not layer1.enabled) 25 | layer2.set_active(not layer2.enabled) 26 | -------------------------------------------------------------------------------- /2D/handle_multiple_floors/switch_layer_point.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://b3kqdnk0vhk7l"] 2 | 3 | [ext_resource type="Script" path="res://handle_multiple_floors/switch_layer_point.gd" id="1_yndve"] 4 | 5 | [sub_resource type="RectangleShape2D" id="RectangleShape2D_nmotm"] 6 | size = Vector2(16, 16) 7 | 8 | [node name="SwitchLayerPoint" type="Area2D"] 9 | script = ExtResource("1_yndve") 10 | 11 | [node name="CollisionShape2D" type="CollisionShape2D" parent="."] 12 | shape = SubResource("RectangleShape2D_nmotm") 13 | 14 | [connection signal="body_entered" from="." to="." method="_on_body_entered"] 15 | [connection signal="body_exited" from="." to="." method="_on_body_exited"] 16 | -------------------------------------------------------------------------------- /2D/hexa_movement/Soldier.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/hexa_movement/Soldier.png -------------------------------------------------------------------------------- /2D/hexa_movement/Soldier.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://dovlekehejs4s" 6 | path="res://.godot/imported/Soldier.png-8b2cef771e9afe5b3cb7030d2d2f0520.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://hex_movement/Soldier.png" 14 | dest_files=["res://.godot/imported/Soldier.png-8b2cef771e9afe5b3cb7030d2d2f0520.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /2D/hexa_movement/tile_map_layer.gd: -------------------------------------------------------------------------------- 1 | extends TileMapLayer 2 | 3 | func _ready() -> void: 4 | return 5 | for cell in get_used_cells(): 6 | var label = Label.new() 7 | label.text = str(cell.x) + "," + str(cell.y) 8 | label.add_theme_font_size_override("font_size",10) 9 | add_child(label) 10 | label.global_position = map_to_local(cell) + (Vector2(-10,-10)) 11 | -------------------------------------------------------------------------------- /2D/inhale/assets/kirby-like.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/inhale/assets/kirby-like.png -------------------------------------------------------------------------------- /2D/inhale/assets/kirby-like.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://b17akkty3yfic" 6 | path="res://.godot/imported/kirby-like.png-64bb9e6131460032c7c14737d455a7b2.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://inhale_2D/assets/kirby-like.png" 14 | dest_files=["res://.godot/imported/kirby-like.png-64bb9e6131460032c7c14737d455a7b2.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /2D/inhale/enemy.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://b1res74tqp3ds"] 2 | 3 | [ext_resource type="Texture2D" uid="uid://b17akkty3yfic" path="res://inhale_2D/assets/kirby-like.png" id="1_bwn2c"] 4 | 5 | [sub_resource type="RectangleShape2D" id="RectangleShape2D_h1b2w"] 6 | size = Vector2(14, 15) 7 | 8 | [node name="Enemy" type="CharacterBody2D"] 9 | 10 | [node name="Sprite2D" type="Sprite2D" parent="."] 11 | texture = ExtResource("1_bwn2c") 12 | region_enabled = true 13 | region_rect = Rect2(17, 33, 15, 15) 14 | 15 | [node name="CollisionShape2D" type="CollisionShape2D" parent="."] 16 | position = Vector2(0, 0.5) 17 | shape = SubResource("RectangleShape2D_h1b2w") 18 | -------------------------------------------------------------------------------- /2D/ladder_climb/assets/SpriteSheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/ladder_climb/assets/SpriteSheet.png -------------------------------------------------------------------------------- /2D/ladder_climb/assets/fox_side_climb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/ladder_climb/assets/fox_side_climb.png -------------------------------------------------------------------------------- /2D/light_effects_on_evening/assets/Campfire36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/light_effects_on_evening/assets/Campfire36.png -------------------------------------------------------------------------------- /2D/light_effects_on_evening/assets/light_point.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/light_effects_on_evening/assets/light_point.webp -------------------------------------------------------------------------------- /2D/light_effects_on_evening/assets/moon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/light_effects_on_evening/assets/moon.png -------------------------------------------------------------------------------- /2D/light_effects_on_evening/assets/sun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/light_effects_on_evening/assets/sun.png -------------------------------------------------------------------------------- /2D/light_effects_on_evening/campfire.gd: -------------------------------------------------------------------------------- 1 | extends StaticBody2D 2 | 3 | @onready var point_light_2d: PointLight2D = $PointLight2D 4 | 5 | func _ready() -> void: 6 | point_light_2d.enabled = false 7 | _set_signals() 8 | 9 | func _set_signals(): 10 | await get_tree().current_scene.ready 11 | 12 | var dayAndNightCycle : DayAndNightCycle= get_tree().get_first_node_in_group("dayAndNightCycle") 13 | dayAndNightCycle.changeDayTime.connect(_change_light) 14 | 15 | func _change_light(dayTime: DayAndNightCycle.DAY_STATE): 16 | point_light_2d.enabled = not point_light_2d.enabled 17 | -------------------------------------------------------------------------------- /2D/light_effects_on_evening/ui.gd: -------------------------------------------------------------------------------- 1 | extends CanvasLayer 2 | 3 | @onready var sun: TextureRect = $Sun 4 | @onready var moon: TextureRect = $Moon 5 | 6 | func _ready() -> void: 7 | _set_signals() 8 | 9 | func _set_signals(): 10 | await get_tree().current_scene.ready 11 | 12 | var dayAndNightCycle : DayAndNightCycle= get_tree().get_first_node_in_group("dayAndNightCycle") 13 | dayAndNightCycle.changeDayTime.connect(_change_day_icons) 14 | 15 | func _change_day_icons(dayTime: DayAndNightCycle.DAY_STATE): 16 | if dayTime == DayAndNightCycle.DAY_STATE.NOON: 17 | sun.show() 18 | moon.hide() 19 | elif dayTime == DayAndNightCycle.DAY_STATE.EVENING: 20 | sun.hide() 21 | moon.show() 22 | -------------------------------------------------------------------------------- /2D/make_npc_look_busy/castle.gd: -------------------------------------------------------------------------------- 1 | extends Node2D 2 | 3 | func _ready() -> void: 4 | add_to_group("storage_house") 5 | -------------------------------------------------------------------------------- /2D/make_npc_look_busy/woodcutter_house.gd: -------------------------------------------------------------------------------- 1 | extends Node2D 2 | 3 | func _ready() -> void: 4 | add_to_group("production_house") 5 | -------------------------------------------------------------------------------- /2D/map_full_video/assets/Fox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/map_full_video/assets/Fox.png -------------------------------------------------------------------------------- /2D/map_full_video/assets/Fox_Map_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/map_full_video/assets/Fox_Map_1.png -------------------------------------------------------------------------------- /2D/map_full_video/assets/IconButton_Small_Red_Circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/map_full_video/assets/IconButton_Small_Red_Circle.png -------------------------------------------------------------------------------- /2D/map_full_video/assets/Map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/map_full_video/assets/Map.png -------------------------------------------------------------------------------- /2D/map_full_video/assets/circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/map_full_video/assets/circle.png -------------------------------------------------------------------------------- /2D/map_full_video/assets/wide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/map_full_video/assets/wide.png -------------------------------------------------------------------------------- /2D/map_full_video/scene.gd: -------------------------------------------------------------------------------- 1 | extends Node2D 2 | 3 | @export var onFastTravel = false 4 | @export var spawnPoint: Node2D 5 | @export var fastTravelSpawnPoint : Node2D 6 | 7 | const FOX_PLAYER_MAP = preload("res://tutorial_collection/Map_Fast_Travel/fox_player_Map.tscn") 8 | 9 | func _ready() -> void: 10 | var player = FOX_PLAYER_MAP.instantiate() 11 | add_child(player) 12 | 13 | if onFastTravel: player.global_position = fastTravelSpawnPoint.global_position 14 | else: player.global_position = spawnPoint.global_position 15 | -------------------------------------------------------------------------------- /2D/map_full_video/way_connection.gd: -------------------------------------------------------------------------------- 1 | extends Line2D 2 | 3 | @export var hide:= true 4 | 5 | var connectionPoints: Array 6 | 7 | func _ready() -> void: 8 | connectionPoints = points 9 | 10 | if hide: clear_points() 11 | 12 | show_animation() 13 | 14 | func show_animation() -> void: 15 | hide = true 16 | 17 | for point in connectionPoints: 18 | add_point(point) 19 | await get_tree().create_timer(0.2).timeout 20 | -------------------------------------------------------------------------------- /2D/map_full_video/way_point.gd: -------------------------------------------------------------------------------- 1 | extends Control 2 | 3 | signal pressed(title, sceneNumber) 4 | 5 | @export var title: String 6 | @export var sceneNumber: int 7 | 8 | func _ready() -> void: 9 | add_to_group("map_way_points") 10 | tooltip_text = "test" 11 | 12 | func _make_custom_tooltip(_for_text) -> Object: 13 | var theme = Theme.new() 14 | theme.set_stylebox("panel", "TooltipPanel", StyleBoxEmpty.new()) 15 | set_theme(theme) 16 | 17 | #var newLabel = preload("res://customLabel.tscn").instantiate() 18 | var newLabel = Label.new() 19 | newLabel.text = title 20 | newLabel.add_theme_color_override("font_color", Color(0,0,0)) 21 | 22 | return newLabel 23 | 24 | func _on_button_pressed() -> void: 25 | pressed.emit(title, sceneNumber) 26 | -------------------------------------------------------------------------------- /2D/momentum_movement/assets/Fox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/momentum_movement/assets/Fox.png -------------------------------------------------------------------------------- /2D/momentum_movement/assets/Fox.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://bxjp0u6ilq6qh" 6 | path="res://.godot/imported/Fox.png-b1136d78483c79cf83361b2b93f50516.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://momentum_movement/assets/Fox.png" 14 | dest_files=["res://.godot/imported/Fox.png-b1136d78483c79cf83361b2b93f50516.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /2D/npcs_transport_materials/castle.gd: -------------------------------------------------------------------------------- 1 | extends Node2D 2 | 3 | signal add_raw_material(material) 4 | 5 | func _ready() -> void: 6 | add_to_group("storage_house") 7 | 8 | func add_material(material: Materials): 9 | add_raw_material.emit(material) 10 | -------------------------------------------------------------------------------- /2D/npcs_transport_materials/material.gd: -------------------------------------------------------------------------------- 1 | extends Resource 2 | class_name Materials 3 | 4 | enum TYPES {WOOD, STONE} 5 | 6 | @export var type: TYPES 7 | @export var quantity: int 8 | -------------------------------------------------------------------------------- /2D/npcs_transport_materials/ui.gd: -------------------------------------------------------------------------------- 1 | extends CanvasLayer 2 | 3 | @onready var wood_label: Label = %WoodLabel 4 | 5 | func _ready() -> void: 6 | _connect_signals() 7 | 8 | func _connect_signals(): 9 | for storage in get_tree().get_nodes_in_group("storage_house"): 10 | storage.add_raw_material.connect(_add_material) 11 | 12 | func _add_material(material: Materials): 13 | if material.type == Materials.TYPES.WOOD: 14 | var storage = int(wood_label.text) 15 | wood_label.text = str(storage + material.quantity) 16 | -------------------------------------------------------------------------------- /2D/npcs_transport_materials/wood.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="Materials" load_steps=2 format=3 uid="uid://byrpb10o0kty"] 2 | 3 | [ext_resource type="Script" path="res://material.gd" id="1_8rnyo"] 4 | 5 | [resource] 6 | script = ExtResource("1_8rnyo") 7 | type = 0 8 | quantity = 0 9 | -------------------------------------------------------------------------------- /2D/npcs_transport_materials/woodcutter_house.gd: -------------------------------------------------------------------------------- 1 | extends Node2D 2 | 3 | var rawMaterial: Materials 4 | 5 | func _ready() -> void: 6 | add_to_group("production_house") 7 | 8 | func add_material(material:Materials): 9 | rawMaterial = material 10 | 11 | func remove_material() -> Materials: 12 | if not rawMaterial: return 13 | 14 | var material = rawMaterial 15 | rawMaterial = null 16 | 17 | return material 18 | -------------------------------------------------------------------------------- /2D/open_map/assets/Fox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/open_map/assets/Fox.png -------------------------------------------------------------------------------- /2D/open_map/assets/Fox.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://cnerctaqr575k" 6 | path="res://.godot/imported/Fox.png-fe5ad1005c88ef28f5a9826167f8760e.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://open a Map/assets/Fox.png" 14 | dest_files=["res://.godot/imported/Fox.png-fe5ad1005c88ef28f5a9826167f8760e.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /2D/open_map/assets/Fox_Map_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/open_map/assets/Fox_Map_1.png -------------------------------------------------------------------------------- /2D/open_map/assets/Fox_Map_1.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://dg5b5e6wm3lfj" 6 | path="res://.godot/imported/Fox_Map_1.png-6795f574277066f49dd1f59c59680b89.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://open a Map/assets/Fox_Map_1.png" 14 | dest_files=["res://.godot/imported/Fox_Map_1.png-6795f574277066f49dd1f59c59680b89.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /2D/open_map/assets/Map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/open_map/assets/Map.png -------------------------------------------------------------------------------- /2D/open_map/assets/Map.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://fnjgpme4bmdw" 6 | path="res://.godot/imported/Map.png-59b9b5dcaf8716ae5baaf3df3b93a4d1.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://open a Map/assets/Map.png" 14 | dest_files=["res://.godot/imported/Map.png-59b9b5dcaf8716ae5baaf3df3b93a4d1.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /2D/physic_rope/Rope2 3px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/physic_rope/Rope2 3px.png -------------------------------------------------------------------------------- /2D/place_objects_on_grid/grid_map/Grid.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://bo1cpe7ekrm1q"] 2 | 3 | [ext_resource type="Script" uid="uid://n5hsjfry046q" path="res://place_objects_in_grid/grid_map/grid.gd" id="1_xm2js"] 4 | [ext_resource type="PackedScene" uid="uid://dubpphj3layjp" path="res://place_objects_in_grid/grid_map/grid_cell.tscn" id="2_y0eii"] 5 | 6 | [node name="Grid" type="GridContainer"] 7 | anchors_preset = 15 8 | anchor_right = 1.0 9 | anchor_bottom = 1.0 10 | grow_horizontal = 2 11 | grow_vertical = 2 12 | columns = 7 13 | script = ExtResource("1_xm2js") 14 | 15 | [node name="PanelContainer2" parent="." instance=ExtResource("2_y0eii")] 16 | layout_mode = 2 17 | -------------------------------------------------------------------------------- /2D/place_objects_on_grid/grid_map/grid.gd.uid: -------------------------------------------------------------------------------- 1 | uid://n5hsjfry046q 2 | -------------------------------------------------------------------------------- /2D/place_objects_on_grid/grid_map/grid_cell.gd: -------------------------------------------------------------------------------- 1 | extends PanelContainer 2 | 3 | @export var full = false 4 | 5 | func change_color(color:Color): 6 | var styleBox := get_theme_stylebox("panel").duplicate() 7 | styleBox.bg_color = color 8 | add_theme_stylebox_override("panel",styleBox) 9 | -------------------------------------------------------------------------------- /2D/place_objects_on_grid/grid_map/grid_cell.gd.uid: -------------------------------------------------------------------------------- 1 | uid://bkslghx3g3j0u 2 | -------------------------------------------------------------------------------- /2D/place_objects_on_grid/grid_map/grid_cell.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://dubpphj3layjp"] 2 | 3 | [ext_resource type="Script" uid="uid://bkslghx3g3j0u" path="res://place_objects_in_grid/grid_map/grid_cell.gd" id="1_0npa5"] 4 | 5 | [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_5b1hb"] 6 | bg_color = Color(0.5, 0.5, 0.5, 0.5) 7 | border_width_left = 2 8 | border_width_top = 2 9 | border_width_right = 2 10 | border_width_bottom = 2 11 | border_color = Color(0, 0, 0, 1) 12 | 13 | [node name="PanelContainer" type="PanelContainer"] 14 | custom_minimum_size = Vector2(32, 32) 15 | mouse_filter = 2 16 | theme_override_styles/panel = SubResource("StyleBoxFlat_5b1hb") 17 | script = ExtResource("1_0npa5") 18 | -------------------------------------------------------------------------------- /2D/place_objects_on_grid/object.gd: -------------------------------------------------------------------------------- 1 | extends Sprite2D 2 | 3 | @export var rect: Rect2 4 | 5 | func get_global_rect(): 6 | return Rect2( 7 | global_position - rect.size / 2, 8 | rect.size 9 | ) 10 | 11 | func set_on_place(): 12 | modulate.a = 1 13 | -------------------------------------------------------------------------------- /2D/place_objects_on_grid/object.gd.uid: -------------------------------------------------------------------------------- 1 | uid://wkjwjg6p64bp 2 | -------------------------------------------------------------------------------- /2D/place_objects_on_grid/object.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://c5y26y845kq8q"] 2 | 3 | [ext_resource type="Texture2D" uid="uid://c2h8c7hnojlpx" path="res://assets/tiny_swords/House_Blue.png" id="1_3xuqs"] 4 | [ext_resource type="Script" uid="uid://wkjwjg6p64bp" path="res://place_objects_in_grid/object.gd" id="1_l2ofb"] 5 | 6 | [node name="Object" type="Sprite2D"] 7 | modulate = Color(1, 1, 1, 0.392157) 8 | texture = ExtResource("1_3xuqs") 9 | script = ExtResource("1_l2ofb") 10 | rect = Rect2(0, 0, 128, 192) 11 | -------------------------------------------------------------------------------- /2D/place_objects_on_grid/scene.gd.uid: -------------------------------------------------------------------------------- 1 | uid://did1db2pmpv3t 2 | -------------------------------------------------------------------------------- /2D/planet_movement/scene.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://d36ks6syu426e"] 2 | 3 | [ext_resource type="PackedScene" uid="uid://i5ynl4bwr8nx" path="res://planet_movement/planet_char.tscn" id="1_8b3cd"] 4 | [ext_resource type="PackedScene" uid="uid://cg0emttdfu7rb" path="res://planet_movement/Planet.tscn" id="2_o75am"] 5 | 6 | [node name="Scene" type="Node2D"] 7 | 8 | [node name="PlanetChar" parent="." node_paths=PackedStringArray("currentplanet") instance=ExtResource("1_8b3cd")] 9 | position = Vector2(0, -82) 10 | currentplanet = NodePath("../Planet") 11 | 12 | [node name="Camera2D" type="Camera2D" parent="."] 13 | zoom = Vector2(2.5, 2.5) 14 | 15 | [node name="Planet" parent="." instance=ExtResource("2_o75am")] 16 | position = Vector2(0, 1) 17 | scale = Vector2(2, 2) 18 | -------------------------------------------------------------------------------- /2D/random_dungeon/random_dungeon.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://c5a3qkc4rk8jp"] 2 | 3 | [ext_resource type="Script" path="res://random_dungeon_2d/random_dungeon.gd" id="1_7k88l"] 4 | 5 | [node name="RandomDungeon" type="Node2D"] 6 | script = ExtResource("1_7k88l") 7 | 8 | [node name="rooms" type="Node2D" parent="."] 9 | 10 | [node name="CanvasLayer" type="CanvasLayer" parent="."] 11 | visible = false 12 | 13 | [node name="Button" type="Button" parent="CanvasLayer"] 14 | offset_right = 8.0 15 | offset_bottom = 8.0 16 | theme_override_font_sizes/font_size = 40 17 | text = "REFRESH" 18 | 19 | [node name="Camera2D" type="Camera2D" parent="."] 20 | position = Vector2(-4, 4) 21 | zoom = Vector2(0.3, 0.3) 22 | 23 | [connection signal="pressed" from="CanvasLayer/Button" to="." method="_on_button_pressed"] 24 | -------------------------------------------------------------------------------- /2D/respawn/plattformer_pixel_adventure.gd: -------------------------------------------------------------------------------- 1 | extends Node2D 2 | 3 | @onready var marker_2d: Marker2D = $Marker2D 4 | 5 | func _ready() -> void: 6 | for player in get_tree().get_nodes_in_group("player"): 7 | player.respawned.connect(_on_player_respawned.bind(player)) 8 | 9 | func _on_player_respawned(player): 10 | player.global_position = marker_2d.global_position 11 | -------------------------------------------------------------------------------- /2D/respawn/saw.gd: -------------------------------------------------------------------------------- 1 | extends StaticBody2D 2 | 3 | 4 | func _on_area_2d_body_entered(body: Node2D) -> void: 5 | if body.is_in_group("player"): 6 | body.take_damage(1) 7 | -------------------------------------------------------------------------------- /2D/respawn/worldEnd.gd: -------------------------------------------------------------------------------- 1 | extends Area2D 2 | 3 | 4 | 5 | func _on_body_entered(body: Node2D) -> void: 6 | if body.is_in_group("player"): 7 | body.respawned.emit() 8 | -------------------------------------------------------------------------------- /2D/respawn/worldEnd.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://cdtpcwonvm6tl"] 2 | 3 | [ext_resource type="Script" path="res://respawn/worldEnd.gd" id="1_u3oni"] 4 | 5 | [sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_d7tcb"] 6 | 7 | [node name="WorldEnd" type="Area2D"] 8 | script = ExtResource("1_u3oni") 9 | 10 | [node name="CollisionShape2D" type="CollisionShape2D" parent="."] 11 | position = Vector2(-97, 158) 12 | shape = SubResource("WorldBoundaryShape2D_d7tcb") 13 | 14 | [connection signal="body_entered" from="." to="." method="_on_body_entered"] 15 | -------------------------------------------------------------------------------- /2D/room_random_objects/chest.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://cievxxbulmnjd"] 2 | 3 | [ext_resource type="Texture2D" uid="uid://dh6stmijbmptk" path="res://assets/random_dungeon/DungeonDecorations.png" id="1_oes53"] 4 | 5 | [node name="Chest" type="Node2D"] 6 | 7 | [node name="Sprite2D" type="Sprite2D" parent="."] 8 | scale = Vector2(0.5, 0.5) 9 | texture = ExtResource("1_oes53") 10 | region_enabled = true 11 | region_rect = Rect2(320, 38, 16, 19) 12 | -------------------------------------------------------------------------------- /2D/room_random_objects/random_dungeon.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://bcpuf0y2fuqx7"] 2 | 3 | [ext_resource type="Script" path="res://random_objects/random_dungeon.gd" id="1_ccb21"] 4 | 5 | [node name="RandomDungeon" type="Node2D"] 6 | script = ExtResource("1_ccb21") 7 | 8 | [node name="rooms" type="Node2D" parent="."] 9 | 10 | [node name="CanvasLayer" type="CanvasLayer" parent="."] 11 | 12 | [node name="Button" type="Button" parent="CanvasLayer"] 13 | offset_right = 8.0 14 | offset_bottom = 8.0 15 | theme_override_font_sizes/font_size = 35 16 | text = "REFRESH" 17 | 18 | [node name="Camera2D" type="Camera2D" parent="."] 19 | position = Vector2(-4, 4) 20 | zoom = Vector2(1.2, 1.2) 21 | 22 | [connection signal="pressed" from="CanvasLayer/Button" to="." method="_on_button_pressed"] 23 | -------------------------------------------------------------------------------- /2D/scene_transitions/level_switch.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://6alwqh7ocxsk"] 2 | 3 | [ext_resource type="Script" path="res://scene_transitions/level_switch.gd" id="1_bo5tl"] 4 | 5 | [sub_resource type="RectangleShape2D" id="RectangleShape2D_oroq4"] 6 | size = Vector2(20, 39) 7 | 8 | [node name="LevelSwitch" type="Area2D"] 9 | script = ExtResource("1_bo5tl") 10 | 11 | [node name="CollisionShape2D" type="CollisionShape2D" parent="."] 12 | position = Vector2(0, -9.5) 13 | shape = SubResource("RectangleShape2D_oroq4") 14 | 15 | [connection signal="body_entered" from="." to="." method="_on_body_entered"] 16 | -------------------------------------------------------------------------------- /2D/scene_transitions/transition.gd: -------------------------------------------------------------------------------- 1 | extends CanvasLayer 2 | 3 | @onready var animation_player: AnimationPlayer = $AnimationPlayer 4 | 5 | func fade_in(): 6 | animation_player.play("fade") 7 | await animation_player.animation_finished 8 | 9 | func fade_out(): 10 | animation_player.play_backwards("fade") 11 | await animation_player.animation_finished 12 | 13 | func wipe_in(): 14 | animation_player.play("wipe_in") 15 | await animation_player.animation_finished 16 | 17 | func wipe_out(): 18 | animation_player.play("wipe_out") 19 | await animation_player.animation_finished 20 | -------------------------------------------------------------------------------- /2D/shoot_only_in_area/arrow.gd: -------------------------------------------------------------------------------- 1 | extends Area2D 2 | 3 | @export var speed = 1000 4 | 5 | var direction : Vector2 6 | 7 | func _physics_process(delta): 8 | position += direction * speed * delta 9 | 10 | func set_arrow(position, targetPosition): 11 | global_position = position 12 | direction = (targetPosition - position).normalized() 13 | 14 | look_at(targetPosition) 15 | 16 | func _on_body_entered(body: Node2D) -> void: 17 | if body in get_tree().get_nodes_in_group("player"): 18 | queue_free() 19 | -------------------------------------------------------------------------------- /2D/shoot_only_in_area/arrow.gd.uid: -------------------------------------------------------------------------------- 1 | uid://b68ybg61n7mcf 2 | -------------------------------------------------------------------------------- /2D/shoot_only_in_area/arrow.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=4 format=3 uid="uid://5lcrd1gg0qht"] 2 | 3 | [ext_resource type="Script" uid="uid://b68ybg61n7mcf" path="res://shoot_in_area/arrow.gd" id="1_2ndhl"] 4 | [ext_resource type="Texture2D" uid="uid://dut8us2bg1blb" path="res://assets/Arrow.png" id="1_l5ahi"] 5 | 6 | [sub_resource type="RectangleShape2D" id="RectangleShape2D_2ndhl"] 7 | size = Vector2(61, 14) 8 | 9 | [node name="Arrow" type="Area2D"] 10 | script = ExtResource("1_2ndhl") 11 | 12 | [node name="Sprite2D" type="Sprite2D" parent="."] 13 | texture = ExtResource("1_l5ahi") 14 | region_enabled = true 15 | region_rect = Rect2(0, 24, 64, 22) 16 | 17 | [node name="CollisionShape2D" type="CollisionShape2D" parent="."] 18 | visible = false 19 | position = Vector2(0.5, 0) 20 | shape = SubResource("RectangleShape2D_2ndhl") 21 | 22 | [connection signal="body_entered" from="." to="." method="_on_body_entered"] 23 | -------------------------------------------------------------------------------- /2D/shoot_only_in_area/enemy.gd.uid: -------------------------------------------------------------------------------- 1 | uid://c6031dix5ac2h 2 | -------------------------------------------------------------------------------- /2D/show_grid_char_movement/Grid.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://bo1cpe7ekrm1q"] 2 | 3 | [ext_resource type="Script" path="res://2D_show_grid_char_movement/grid.gd" id="1_q85ue"] 4 | 5 | [node name="Grid" type="GridContainer"] 6 | anchors_preset = 15 7 | anchor_right = 1.0 8 | anchor_bottom = 1.0 9 | grow_horizontal = 2 10 | grow_vertical = 2 11 | columns = 5 12 | script = ExtResource("1_q85ue") 13 | -------------------------------------------------------------------------------- /2D/show_grid_char_movement/grid_cell.gd: -------------------------------------------------------------------------------- 1 | extends PanelContainer 2 | 3 | func highlight_cell(): 4 | var styleBox := get_theme_stylebox("panel").duplicate() 5 | styleBox.bg_color = Color(1,1,0,0.5) 6 | add_theme_stylebox_override("panel",styleBox) 7 | 8 | func select_cell(): 9 | var styleBox := get_theme_stylebox("panel").duplicate() 10 | styleBox.bg_color = Color(1,1,1, 0.5) 11 | add_theme_stylebox_override("panel",styleBox) 12 | 13 | func deselect_cell(): 14 | var styleBox := get_theme_stylebox("panel").duplicate() 15 | styleBox.bg_color = Color(0.5,0.5,0.5, 0.5) 16 | add_theme_stylebox_override("panel",styleBox) 17 | 18 | func get_center_position(): 19 | return global_position + size / 2 20 | -------------------------------------------------------------------------------- /2D/show_grid_char_movement/grid_cell.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://dfuis7ev3jsyx"] 2 | 3 | [ext_resource type="Script" path="res://2D_show_grid_char_movement/grid_cell.gd" id="1_yhhsd"] 4 | 5 | [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_5b1hb"] 6 | bg_color = Color(0.5, 0.5, 0.5, 0.5) 7 | border_width_left = 2 8 | border_width_top = 2 9 | border_width_right = 2 10 | border_width_bottom = 2 11 | border_color = Color(0, 0, 0, 1) 12 | 13 | [node name="PanelContainer" type="PanelContainer"] 14 | custom_minimum_size = Vector2(32, 32) 15 | mouse_filter = 1 16 | theme_override_styles/panel = SubResource("StyleBoxFlat_5b1hb") 17 | script = ExtResource("1_yhhsd") 18 | -------------------------------------------------------------------------------- /2D/show_grid_char_movement/knight.gd: -------------------------------------------------------------------------------- 1 | extends CharacterBody2D 2 | 3 | signal character_selected 4 | 5 | var movement = 2 6 | 7 | func _ready() -> void: 8 | add_to_group("character") 9 | 10 | func _on_input_event(viewport: Node, event: InputEvent, shape_idx: int) -> void: 11 | var onLeftClicked :bool = event is InputEventMouseButton and event.button_index == 1 and event.is_pressed() 12 | if onLeftClicked: character_selected.emit(movement) 13 | -------------------------------------------------------------------------------- /2D/simple_steering_system/assets/PixelPlanesAssetPack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/simple_steering_system/assets/PixelPlanesAssetPack.png -------------------------------------------------------------------------------- /2D/simple_steering_system/plane.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://b7itx1xi25qsl"] 2 | 3 | [ext_resource type="Script" path="res://Plane.gd" id="1_74hgx"] 4 | [ext_resource type="Texture2D" uid="uid://ccyqxueu1tg4w" path="res://assets/sprites/PixelPlanesAssetPack.png" id="2_xg00g"] 5 | 6 | [node name="Plane" type="CharacterBody2D"] 7 | script = ExtResource("1_74hgx") 8 | 9 | [node name="Sprite2D" type="Sprite2D" parent="."] 10 | rotation = -1.5708 11 | scale = Vector2(4, 4) 12 | texture = ExtResource("2_xg00g") 13 | region_enabled = true 14 | region_rect = Rect2(1, 97, 29, 30) 15 | -------------------------------------------------------------------------------- /2D/switch/door.gd: -------------------------------------------------------------------------------- 1 | extends Node2D 2 | 3 | @onready var animated_sprite_2d: AnimatedSprite2D = $AnimatedSprite2D 4 | 5 | func activate(boolean: bool): 6 | if boolean: 7 | animated_sprite_2d.play("open") 8 | else: 9 | animated_sprite_2d.play_backwards("open") 10 | -------------------------------------------------------------------------------- /2D/switch/switch.gd: -------------------------------------------------------------------------------- 1 | extends Node2D 2 | 3 | @export var connectedObject:Node2D 4 | 5 | @onready var animated_sprite_2d: AnimatedSprite2D = $AnimatedSprite2D 6 | 7 | var isActive = false 8 | 9 | func _on_area_2d_body_entered(body: Node2D) -> void: 10 | if body == get_tree().get_first_node_in_group("player"): 11 | _use_switch() 12 | 13 | func _use_switch(): 14 | if isActive: 15 | animated_sprite_2d.play_backwards("activate") 16 | else: 17 | animated_sprite_2d.play("activate") 18 | 19 | await animated_sprite_2d.animation_finished 20 | connectedObject.activate(not isActive) 21 | isActive = not isActive 22 | -------------------------------------------------------------------------------- /2D/sync_gun_with_crosshair/gun_character.gd.uid: -------------------------------------------------------------------------------- 1 | uid://6nrusf5cqv0j 2 | -------------------------------------------------------------------------------- /2D/unit_drag_and_drop/archer.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://cp445e3ip8e32"] 2 | 3 | [ext_resource type="Texture2D" uid="uid://c5ui7u45elvse" path="res://unit_drag_and_drop/archer single.png" id="1_llulc"] 4 | 5 | [node name="Archer" type="Node2D"] 6 | 7 | [node name="Sprite2D" type="Sprite2D" parent="."] 8 | texture = ExtResource("1_llulc") 9 | -------------------------------------------------------------------------------- /2D/unit_drag_and_drop/assets/archer single.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/unit_drag_and_drop/assets/archer single.png -------------------------------------------------------------------------------- /2D/unit_drag_and_drop/assets/pawn single.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/unit_drag_and_drop/assets/pawn single.png -------------------------------------------------------------------------------- /2D/unit_drag_and_drop/assets/warrior.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/unit_drag_and_drop/assets/warrior.png -------------------------------------------------------------------------------- /2D/unit_drag_and_drop/pawn.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://baef6r3rptnxy"] 2 | 3 | [ext_resource type="Texture2D" uid="uid://bcgcrjfrxysgo" path="res://unit_drag_and_drop/pawn single.png" id="1_q1jqi"] 4 | 5 | [node name="Pawn" type="Node2D"] 6 | 7 | [node name="Sprite2D" type="Sprite2D" parent="."] 8 | texture = ExtResource("1_q1jqi") 9 | -------------------------------------------------------------------------------- /2D/unit_drag_and_drop/unit selection.gd: -------------------------------------------------------------------------------- 1 | extends Control 2 | 3 | signal placed_char 4 | 5 | func _get_drag_data(at_position): 6 | var charNode 7 | 8 | for node in get_tree().get_nodes_in_group("char"): 9 | if node.is_on_position(at_position): 10 | charNode = node 11 | 12 | if not charNode: return 13 | 14 | var prewviewImage = charNode.get_preview() 15 | set_drag_preview(prewviewImage) 16 | 17 | return charNode 18 | 19 | func _can_drop_data(at_position, data): 20 | return true 21 | 22 | func _drop_data(at_position, data): 23 | placed_char.emit(data.charScene, at_position) 24 | -------------------------------------------------------------------------------- /2D/unit_drag_and_drop/unit_container.gd: -------------------------------------------------------------------------------- 1 | extends PanelContainer 2 | 3 | @export var charScene: PackedScene 4 | @export var icon: CompressedTexture2D 5 | 6 | @onready var texture_rect = $TextureRect 7 | 8 | func _ready(): 9 | add_to_group("char") 10 | texture_rect.texture = icon 11 | 12 | func is_on_position(position): 13 | return texture_rect.get_global_rect().has_point(position) 14 | 15 | func get_preview(): 16 | return texture_rect.duplicate() 17 | -------------------------------------------------------------------------------- /2D/unit_drag_and_drop/unit_container.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=4 format=3 uid="uid://brcv17byla0u8"] 2 | 3 | [ext_resource type="Script" path="res://unit_drag_and_drop/unit_container.gd" id="1_61qy6"] 4 | [ext_resource type="Texture2D" uid="uid://c5ui7u45elvse" path="res://unit_drag_and_drop/archer single.png" id="1_xm2f0"] 5 | 6 | [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_bpnmb"] 7 | bg_color = Color(0.6, 0.6, 0.6, 0.392157) 8 | border_width_left = 2 9 | border_width_top = 2 10 | border_width_right = 2 11 | border_width_bottom = 2 12 | border_color = Color(0, 0, 0, 1) 13 | 14 | [node name="PanelContainer" type="PanelContainer"] 15 | mouse_filter = 1 16 | theme_override_styles/panel = SubResource("StyleBoxFlat_bpnmb") 17 | script = ExtResource("1_61qy6") 18 | 19 | [node name="TextureRect" type="TextureRect" parent="."] 20 | layout_mode = 2 21 | texture = ExtResource("1_xm2f0") 22 | -------------------------------------------------------------------------------- /2D/unit_drag_and_drop/warrior.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://dwplwqx84g7w0"] 2 | 3 | [ext_resource type="Texture2D" uid="uid://epajpeu0gfm6" path="res://unit_drag_and_drop/warrior.png" id="1_kpisq"] 4 | 5 | [node name="Warrior" type="Node2D"] 6 | 7 | [node name="Sprite2D" type="Sprite2D" parent="."] 8 | texture = ExtResource("1_kpisq") 9 | -------------------------------------------------------------------------------- /2D/wall_hold_and_climb/FoxClimb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/wall_hold_and_climb/FoxClimb.png -------------------------------------------------------------------------------- /2D/wall_hold_and_climb/fox_side_climb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/wall_hold_and_climb/fox_side_climb.png -------------------------------------------------------------------------------- /2D/wall_slide_and_double_wall_jump/assets/Pink_Monster_Death_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/wall_slide_and_double_wall_jump/assets/Pink_Monster_Death_8.png -------------------------------------------------------------------------------- /2D/wall_slide_and_double_wall_jump/assets/Pink_Monster_Hurt_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/wall_slide_and_double_wall_jump/assets/Pink_Monster_Hurt_4.png -------------------------------------------------------------------------------- /2D/wall_slide_and_double_wall_jump/assets/Pink_Monster_Idle_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/wall_slide_and_double_wall_jump/assets/Pink_Monster_Idle_4.png -------------------------------------------------------------------------------- /2D/wall_slide_and_double_wall_jump/assets/Pink_Monster_Jump_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/wall_slide_and_double_wall_jump/assets/Pink_Monster_Jump_8.png -------------------------------------------------------------------------------- /2D/wall_slide_and_double_wall_jump/assets/Pink_Monster_Run_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/2D/wall_slide_and_double_wall_jump/assets/Pink_Monster_Run_6.png -------------------------------------------------------------------------------- /2D/woodcutter npc/woodcutter_house.gd: -------------------------------------------------------------------------------- 1 | extends Node2D 2 | 3 | func _ready() -> void: 4 | add_to_group("production_house") 5 | -------------------------------------------------------------------------------- /2D/yoshi_create_eggs/egg.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://cchm5660qat0b"] 2 | 3 | [ext_resource type="Texture2D" uid="uid://dkx3pxf7572hh" path="res://yoshis_island/assets/misc1.png" id="1_6upkn"] 4 | 5 | [sub_resource type="RectangleShape2D" id="RectangleShape2D_6upkn"] 6 | size = Vector2(12, 16) 7 | 8 | [node name="Egg" type="CharacterBody2D"] 9 | 10 | [node name="Sprite2D" type="Sprite2D" parent="."] 11 | texture = ExtResource("1_6upkn") 12 | region_enabled = true 13 | region_rect = Rect2(61, 220, 12, 16) 14 | 15 | [node name="CollisionShape2D" type="CollisionShape2D" parent="."] 16 | shape = SubResource("RectangleShape2D_6upkn") 17 | disabled = true 18 | -------------------------------------------------------------------------------- /2D/yoshi_create_eggs/yoshi.gd.uid: -------------------------------------------------------------------------------- 1 | uid://ci5i3ew2s0hqj 2 | -------------------------------------------------------------------------------- /2D/yoshi_eggs_follow/egg.gd.uid: -------------------------------------------------------------------------------- 1 | uid://xl77egdbfxjl 2 | -------------------------------------------------------------------------------- /2D/yoshi_eggs_follow/egg.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://bv7pcloll63yq"] 2 | 3 | [ext_resource type="Texture2D" uid="uid://dkx3pxf7572hh" path="res://yoshis_island/assets/misc1.png" id="1_6upkn"] 4 | [ext_resource type="Script" uid="uid://xl77egdbfxjl" path="res://objects_follow_player/egg.gd" id="1_60cwx"] 5 | 6 | [node name="Egg" type="CharacterBody2D"] 7 | top_level = true 8 | script = ExtResource("1_60cwx") 9 | 10 | [node name="Sprite2D" type="Sprite2D" parent="."] 11 | texture = ExtResource("1_6upkn") 12 | region_enabled = true 13 | region_rect = Rect2(61, 220, 12, 16) 14 | -------------------------------------------------------------------------------- /2D/yoshi_eggs_follow/yoshi.gd.uid: -------------------------------------------------------------------------------- 1 | uid://ci7xjrphsy0k5 2 | -------------------------------------------------------------------------------- /2D/yoshi_push_objects/stone.gd: -------------------------------------------------------------------------------- 1 | extends CharacterBody2D 2 | 3 | @onready var sprite_2d: Sprite2D = $Sprite2D 4 | 5 | func _physics_process(delta: float) -> void: 6 | if not is_on_floor(): 7 | velocity += get_gravity() * delta 8 | 9 | if velocity.x: 10 | velocity.x *= 0.995 11 | 12 | sprite_2d.rotate(velocity.x / 750.0) 13 | 14 | move_and_slide() 15 | -------------------------------------------------------------------------------- /2D/yoshi_push_objects/stone.gd.uid: -------------------------------------------------------------------------------- 1 | uid://csyli8rwjmx18 2 | -------------------------------------------------------------------------------- /2D/yoshi_push_objects/stone.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=4 format=3 uid="uid://bhnobs00q64eh"] 2 | 3 | [ext_resource type="Texture2D" uid="uid://dhsytbjtb0s5o" path="res://yoshis_island/assets/environment/pushable-objects.png" id="1_6s6ed"] 4 | [ext_resource type="Script" uid="uid://csyli8rwjmx18" path="res://push_objects/stone.gd" id="1_rq0vd"] 5 | 6 | [sub_resource type="RectangleShape2D" id="RectangleShape2D_rq0vd"] 7 | size = Vector2(26, 26) 8 | 9 | [node name="Stone" type="CharacterBody2D"] 10 | script = ExtResource("1_rq0vd") 11 | 12 | [node name="Sprite2D" type="Sprite2D" parent="."] 13 | texture = ExtResource("1_6s6ed") 14 | region_enabled = true 15 | region_rect = Rect2(9, 75, 32, 32) 16 | 17 | [node name="CollisionShape2D" type="CollisionShape2D" parent="."] 18 | shape = SubResource("RectangleShape2D_rq0vd") 19 | -------------------------------------------------------------------------------- /2D/yoshi_push_objects/yoshi.gd.uid: -------------------------------------------------------------------------------- 1 | uid://cfkeliqhcuow3 2 | -------------------------------------------------------------------------------- /2D/yoshi_shoot_egg/egg.gd: -------------------------------------------------------------------------------- 1 | extends CharacterBody2D 2 | class_name Egg 3 | 4 | const SPEED = 300 5 | const BOUNCE_SPEED_MODIFIER = 1.3 6 | 7 | var shootDirection: Vector2 8 | 9 | func _physics_process(delta): 10 | if not shootDirection: return 11 | 12 | var collisionInfo = move_and_collide(velocity * delta) 13 | 14 | if collisionInfo: 15 | velocity = velocity.bounce(collisionInfo.get_normal()) 16 | velocity *= BOUNCE_SPEED_MODIFIER 17 | 18 | func shoot(targetPosition): 19 | shootDirection = (targetPosition - global_position).normalized() 20 | 21 | velocity = shootDirection * SPEED 22 | 23 | await get_tree().create_timer(2.0).timeout 24 | 25 | queue_free() 26 | -------------------------------------------------------------------------------- /2D/yoshi_shoot_egg/egg.gd.uid: -------------------------------------------------------------------------------- 1 | uid://cnu72q0tvj2yc 2 | -------------------------------------------------------------------------------- /2D/yoshi_shoot_egg/egg.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=4 format=3 uid="uid://dfgt3ejwmia7a"] 2 | 3 | [ext_resource type="Script" uid="uid://cnu72q0tvj2yc" path="res://shoot_egg/egg.gd" id="1_60cwx"] 4 | [ext_resource type="Texture2D" uid="uid://dkx3pxf7572hh" path="res://yoshis_island/assets/misc1.png" id="1_et260"] 5 | 6 | [sub_resource type="CircleShape2D" id="CircleShape2D_6upkn"] 7 | radius = 7.0 8 | 9 | [node name="Egg" type="CharacterBody2D"] 10 | script = ExtResource("1_60cwx") 11 | 12 | [node name="Sprite2D" type="Sprite2D" parent="."] 13 | texture = ExtResource("1_et260") 14 | region_enabled = true 15 | region_rect = Rect2(61, 220, 12, 16) 16 | 17 | [node name="CollisionShape2D" type="CollisionShape2D" parent="."] 18 | shape = SubResource("CircleShape2D_6upkn") 19 | -------------------------------------------------------------------------------- /2D/yoshi_shoot_egg/yoshi.gd.uid: -------------------------------------------------------------------------------- 1 | uid://fbvbqs5aebj4 2 | -------------------------------------------------------------------------------- /2D/yoshi_stomp/camera_shake.gd: -------------------------------------------------------------------------------- 1 | extends Camera2D 2 | 3 | var rng = RandomNumberGenerator.new() 4 | var duration = 0 5 | var force 6 | 7 | func _ready() -> void: 8 | add_to_group("camera") 9 | 10 | func _process(delta: float) -> void: 11 | if duration > 0: 12 | var forceX = rng.randf_range(-1,1) * force 13 | var forceY = rng.randf_range(-1,1) * force 14 | 15 | offset = Vector2(forceX, forceY) 16 | 17 | duration -= delta 18 | 19 | func shake_camera(shakeForce, shakeDuration): 20 | duration = shakeDuration 21 | force = shakeForce 22 | 23 | func is_shaking(): 24 | return duration > 0 25 | -------------------------------------------------------------------------------- /2D/yoshi_stomp/pale.gd: -------------------------------------------------------------------------------- 1 | extends StaticBody2D 2 | 3 | var stompUses = 2 4 | 5 | func on_stomp(): 6 | if stompUses > 0: 7 | stompUses -= 1 8 | global_position.y += 16 9 | -------------------------------------------------------------------------------- /2D/yoshi_stomp/pale.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=4 format=3 uid="uid://d3nwdckv8w1ma"] 2 | 3 | [ext_resource type="Script" path="res://stomp/pale.gd" id="1_lp48o"] 4 | [ext_resource type="Texture2D" uid="uid://bsn7j0u06nfyd" path="res://yoshis_island/assets/island-objects.png" id="1_yn6qd"] 5 | 6 | [sub_resource type="RectangleShape2D" id="RectangleShape2D_g71x5"] 7 | size = Vector2(14, 30) 8 | 9 | [node name="Pale" type="StaticBody2D"] 10 | z_index = -1 11 | position = Vector2(1, -16) 12 | script = ExtResource("1_lp48o") 13 | 14 | [node name="CollisionShape2D" type="CollisionShape2D" parent="."] 15 | position = Vector2(0, -1) 16 | shape = SubResource("RectangleShape2D_g71x5") 17 | 18 | [node name="Sprite2D" type="Sprite2D" parent="."] 19 | texture = ExtResource("1_yn6qd") 20 | region_enabled = true 21 | region_rect = Rect2(197, 124, 14, 32) 22 | -------------------------------------------------------------------------------- /2D/yoshi_swallow_enemies/enemy.gd: -------------------------------------------------------------------------------- 1 | extends CharacterBody2D 2 | 3 | var catcher: CharacterBody2D 4 | var offSet = Vector2(0,8) 5 | 6 | func _ready() -> void: 7 | add_to_group("enemy") 8 | 9 | func _physics_process(delta: float) -> void: 10 | if catcher: 11 | var direction = global_position.direction_to(catcher.global_position) 12 | global_position = catcher.global_position + (direction.x * catcher.ray_cast_2d.target_position) + offSet 13 | 14 | if global_position.distance_to(catcher.global_position) < 18: 15 | catcher.eat() 16 | queue_free() 17 | 18 | func catch(player: CharacterBody2D): 19 | set_physics_process(false) 20 | catcher = player 21 | -------------------------------------------------------------------------------- /2D/yoshi_swallow_enemies/enemy.gd.uid: -------------------------------------------------------------------------------- 1 | uid://bkl2yvbp0muge 2 | -------------------------------------------------------------------------------- /2D/yoshi_swallow_enemies/yoshi.gd.uid: -------------------------------------------------------------------------------- 1 | uid://dhkm18a1qutwa 2 | -------------------------------------------------------------------------------- /3D/2D_Sprite_character/assets/DinoSprites - mort.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/3D/2D_Sprite_character/assets/DinoSprites - mort.png -------------------------------------------------------------------------------- /3D/Plugin_DragAndDrop3D/Part1/draganddrop3d/dragIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/3D/Plugin_DragAndDrop3D/Part1/draganddrop3d/dragIcon.png -------------------------------------------------------------------------------- /3D/Plugin_DragAndDrop3D/Part1/draganddrop3d/nodes/DragAndDrop3D.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://dh33opgk8nlqr"] 2 | 3 | [sub_resource type="GDScript" id="GDScript_kpkkf"] 4 | script/source = "extends Node3D 5 | 6 | 7 | # Called when the node enters the scene tree for the first time. 8 | func _ready() -> void: 9 | pass # Replace with function body. 10 | 11 | 12 | # Called every frame. 'delta' is the elapsed time since the previous frame. 13 | func _process(delta: float) -> void: 14 | pass 15 | " 16 | 17 | [node name="DragAndDrop3d" type="Node3D"] 18 | script = SubResource("GDScript_kpkkf") 19 | -------------------------------------------------------------------------------- /3D/Plugin_DragAndDrop3D/Part1/draganddrop3d/nodes/dragAndDrop3D/DragAndDrop3D.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://dnfygaxd2xpf8"] 2 | 3 | [ext_resource type="Script" path="res://addons/draganddrop3d/nodes/dragAndDrop3D/drag_and_drop_3d.gd" id="1_buak0"] 4 | 5 | [node name="DragAndDrop3d" type="Node3D"] 6 | script = ExtResource("1_buak0") 7 | -------------------------------------------------------------------------------- /3D/Plugin_DragAndDrop3D/Part1/draganddrop3d/nodes/draggingObject/DraggingObject.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://d0kgwy578sogo"] 2 | 3 | [ext_resource type="Script" path="res://addons/draganddrop3d/nodes/draggingObject/dragging_object.gd" id="1_1jl2b"] 4 | 5 | [node name="DraggingObject" type="Node3D"] 6 | script = ExtResource("1_1jl2b") 7 | -------------------------------------------------------------------------------- /3D/Plugin_DragAndDrop3D/Part1/draganddrop3d/plugin.cfg: -------------------------------------------------------------------------------- 1 | [plugin] 2 | 3 | name="DragAndDrop3D" 4 | description="" 5 | author="DevDrache" 6 | version="" 7 | script="plugin.gd" 8 | -------------------------------------------------------------------------------- /3D/Plugin_DragAndDrop3D/Part1/draganddrop3d/plugin.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends EditorPlugin 3 | 4 | func _enter_tree(): 5 | add_custom_type( 6 | "DragAndDrop3D", 7 | "Node3D", 8 | preload("res://addons/draganddrop3d/nodes/dragAndDrop3D/drag_and_drop_3d.gd"), 9 | preload("dragIcon.png") 10 | ) 11 | add_custom_type( 12 | "DraggingObject", 13 | "Node", 14 | preload("res://addons/draganddrop3d/nodes/draggingObject/dragging_object.gd"), 15 | preload("dragIcon.png") 16 | ) 17 | 18 | func _exit_tree(): 19 | remove_custom_type("DragAndDrop3D") 20 | remove_custom_type("DraggingObject") 21 | -------------------------------------------------------------------------------- /3D/Plugin_DragAndDrop3D/Part2/DragAndDropGroupHelper.gd: -------------------------------------------------------------------------------- 1 | extends Node 2 | 3 | signal group_added(group, node) 4 | signal group_exited(group, node) 5 | 6 | func add_node_to_group(node: Node, group: String) -> void: 7 | node.add_to_group(group) 8 | group_added.emit(group, node) 9 | 10 | func remove_node_from_group(node: Node, group: String) -> void: 11 | node.remove_from_group(group) 12 | group_exited.emit(group, node) 13 | -------------------------------------------------------------------------------- /3D/Plugin_DragAndDrop3D/Part2/dragIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/3D/Plugin_DragAndDrop3D/Part2/dragIcon.png -------------------------------------------------------------------------------- /3D/Plugin_DragAndDrop3D/Part2/nodes/DragAndDrop3D.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://cbsk8soc6wjik"] 2 | 3 | [sub_resource type="GDScript" id="GDScript_kpkkf"] 4 | script/source = "extends Node3D 5 | 6 | 7 | # Called when the node enters the scene tree for the first time. 8 | func _ready() -> void: 9 | pass # Replace with function body. 10 | 11 | 12 | # Called every frame. 'delta' is the elapsed time since the previous frame. 13 | func _process(delta: float) -> void: 14 | pass 15 | " 16 | 17 | [node name="DragAndDrop3d" type="Node3D"] 18 | script = SubResource("GDScript_kpkkf") 19 | -------------------------------------------------------------------------------- /3D/Plugin_DragAndDrop3D/Part2/nodes/dragAndDrop3D/DragAndDrop3D.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://c8r0t6wm6f1t6"] 2 | 3 | [ext_resource type="Script" path="res://addons/DragAndDrop3D/nodes/dragAndDrop3D/drag_and_drop_3d.gd" id="1_xxmt3"] 4 | 5 | [node name="DragAndDrop3d" type="Node3D"] 6 | script = ExtResource("1_xxmt3") 7 | -------------------------------------------------------------------------------- /3D/Plugin_DragAndDrop3D/Part2/nodes/draggingObject/DraggingObject.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://70t8mynrkn4s"] 2 | 3 | [ext_resource type="Script" path="res://addons/DragAndDrop3D/nodes/draggingObject/dragging_object.gd" id="1_mpfnw"] 4 | 5 | [node name="DraggingObject" type="Node3D"] 6 | script = ExtResource("1_mpfnw") 7 | heightOffset = null 8 | -------------------------------------------------------------------------------- /3D/Plugin_DragAndDrop3D/Part2/plugin.cfg: -------------------------------------------------------------------------------- 1 | [plugin] 2 | 3 | name="DragAndDrop3D" 4 | description="" 5 | author="DevDrache" 6 | version="" 7 | script="plugin.gd" 8 | -------------------------------------------------------------------------------- /3D/Plugin_DragAndDrop3D/Part2/plugin.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends EditorPlugin 3 | 4 | func _ready() -> void: 5 | add_autoload_singleton("DragAndDropGroupHelper", "res://addons/DragAndDrop3D/DragAndDropGroupHelper.gd") 6 | 7 | func _enter_tree(): 8 | add_custom_type( 9 | "DragAndDrop3D", 10 | "Node3D", 11 | preload("res://addons/DragAndDrop3D/nodes/dragAndDrop3D/drag_and_drop_3d.gd"), 12 | preload("dragIcon.png") 13 | ) 14 | add_custom_type( 15 | "DraggingObject", 16 | "Node", 17 | preload("res://addons/DragAndDrop3D/nodes/draggingObject/dragging_object.gd"), 18 | preload("dragIcon.png") 19 | ) 20 | 21 | func _exit_tree(): 22 | remove_custom_type("DragAndDrop3D") 23 | remove_custom_type("DraggingObject") 24 | -------------------------------------------------------------------------------- /3D/attract_collectables/Coin.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=4 format=3 uid="uid://drtb47to53a5p"] 2 | 3 | [ext_resource type="Script" path="res://3D_attract_collectables/coin.gd" id="1_bio7a"] 4 | [ext_resource type="PackedScene" uid="uid://c3refnh1611v7" path="res://assets/collectable/Coin.gltf" id="1_yf2io"] 5 | 6 | [sub_resource type="SphereShape3D" id="SphereShape3D_s7lnx"] 7 | radius = 0.0981099 8 | 9 | [node name="Coin" type="Area3D"] 10 | script = ExtResource("1_bio7a") 11 | 12 | [node name="Coin2" parent="." instance=ExtResource("1_yf2io")] 13 | transform = Transform3D(0.1, 0, 0, 0, 0.1, 0, 0, 0, 0.1, 0, 0, 0) 14 | 15 | [node name="CollisionShape3D" type="CollisionShape3D" parent="."] 16 | shape = SubResource("SphereShape3D_s7lnx") 17 | -------------------------------------------------------------------------------- /3D/attract_collectables/coin.gd: -------------------------------------------------------------------------------- 1 | extends Area3D 2 | class_name Collectable 3 | 4 | @export var isCollected := false 5 | 6 | const SPEED = 1 7 | 8 | 9 | func _physics_process(delta: float) -> void: 10 | if not isCollected: return 11 | 12 | var playerPosition = get_tree().get_first_node_in_group("player").global_position 13 | var direction: Vector3 = (playerPosition - global_position).normalized() 14 | 15 | global_position += direction * SPEED * delta 16 | 17 | if global_position.distance_to(playerPosition) < 0.1: queue_free() 18 | -------------------------------------------------------------------------------- /3D/cooldown_and_reload/assets/blasterA.glb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/3D/cooldown_and_reload/assets/blasterA.glb -------------------------------------------------------------------------------- /3D/cooldown_and_reload/assets/crosshair007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/3D/cooldown_and_reload/assets/crosshair007.png -------------------------------------------------------------------------------- /3D/cooldown_and_reload/effects/bulletHole.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=4 format=3 uid="uid://uxt2pckwso32"] 2 | 3 | [ext_resource type="Script" path="res://cooldown_and_reload/effects/bullet_hole.gd" id="1_uwhgx"] 4 | 5 | [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_jyjst"] 6 | albedo_color = Color(0, 0, 0, 1) 7 | 8 | [sub_resource type="CylinderMesh" id="CylinderMesh_0wkpp"] 9 | material = SubResource("StandardMaterial3D_jyjst") 10 | top_radius = 0.05 11 | bottom_radius = 0.05 12 | height = 0.001 13 | 14 | [node name="BulletHole" type="Node3D"] 15 | script = ExtResource("1_uwhgx") 16 | 17 | [node name="MeshInstance3D" type="MeshInstance3D" parent="."] 18 | transform = Transform3D(1.91069e-15, 4.37114e-08, 1, 1, -4.37114e-08, 0, 4.37114e-08, 1, -4.37114e-08, 0, 0, 0) 19 | mesh = SubResource("CylinderMesh_0wkpp") 20 | -------------------------------------------------------------------------------- /3D/cooldown_and_reload/effects/bullet_hole.gd: -------------------------------------------------------------------------------- 1 | extends Node3D 2 | 3 | @export var despawnTime := 3.0 4 | 5 | func _ready() -> void: 6 | get_tree().create_timer(despawnTime).timeout.connect(queue_free) 7 | -------------------------------------------------------------------------------- /3D/cooldown_and_reload/effects/bullet_trail.gd: -------------------------------------------------------------------------------- 1 | extends Node3D 2 | 3 | @export var speed:= 40.0 4 | @export var spawnTime := 1.0 5 | 6 | @onready var ray_cast_3d: RayCast3D = $RayCast3D 7 | 8 | var direction:Vector3 9 | 10 | func _ready() -> void: 11 | get_tree().create_timer(spawnTime).timeout.connect(queue_free) 12 | 13 | func _process(delta: float) -> void: 14 | if ray_cast_3d.is_colliding(): queue_free() 15 | 16 | position += direction * speed * delta 17 | scale *= 0.96 18 | 19 | func set_direction(newDirection): 20 | direction = newDirection 21 | -------------------------------------------------------------------------------- /3D/cooldown_and_reload/gun.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://ivread0rtkas"] 2 | 3 | [ext_resource type="Script" path="res://cooldown_and_reload/gun.gd" id="1_6wlrm"] 4 | [ext_resource type="Resource" uid="uid://ddebq8fpyktj6" path="res://cooldown_and_reload/resources/guns/gun_1.tres" id="2_367en"] 5 | 6 | [node name="Gun" type="Node3D"] 7 | script = ExtResource("1_6wlrm") 8 | gunResource = ExtResource("2_367en") 9 | 10 | [node name="Marker3D" type="Marker3D" parent="."] 11 | transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.153104, 0.171201, 0.3514) 12 | 13 | [node name="shootCooldownTimer" type="Timer" parent="."] 14 | wait_time = 0.5 15 | one_shot = true 16 | 17 | [node name="reloadTimer" type="Timer" parent="."] 18 | wait_time = 4.0 19 | one_shot = true 20 | -------------------------------------------------------------------------------- /3D/cooldown_and_reload/resources/guns/gun_1.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="GunResource" load_steps=3 format=3 uid="uid://ddebq8fpyktj6"] 2 | 3 | [ext_resource type="PackedScene" uid="uid://ca17lxmi82kt" path="res://assets/blaster_packages/blasterA.glb" id="1_tx3d2"] 4 | [ext_resource type="Script" path="res://cooldown_and_reload/resources/guns/gun_resource.gd" id="2_b4nv7"] 5 | 6 | [resource] 7 | script = ExtResource("2_b4nv7") 8 | model = ExtResource("1_tx3d2") 9 | bulletSpawnOffset = Vector3(-0.153104, 0.171201, 0.3514) 10 | damage = 40 11 | shootCooldown = 0.5 12 | reloadTime = 4.0 13 | magazineSize = 6 14 | bullets = 60 15 | -------------------------------------------------------------------------------- /3D/cooldown_and_reload/resources/guns/gun_resource.gd: -------------------------------------------------------------------------------- 1 | extends Resource 2 | class_name GunResource 3 | 4 | @export var model: PackedScene 5 | @export var bulletSpawnOffset: Vector3 6 | @export var damage: int 7 | @export var shootCooldown: float 8 | @export var reloadTime: float 9 | @export var magazineSize: int 10 | @export var bullets: int 11 | 12 | func reload_count(): 13 | if bullets < magazineSize: return bullets 14 | else: return magazineSize 15 | -------------------------------------------------------------------------------- /3D/cooldown_and_reload/target.gd: -------------------------------------------------------------------------------- 1 | extends Area3D 2 | 3 | @export var health := 100 4 | 5 | func _ready() -> void: 6 | add_to_group("enemy") 7 | 8 | func do_damage(damage): 9 | health -= damage 10 | 11 | if health < 0: queue_free() 12 | -------------------------------------------------------------------------------- /3D/create_gun/assets/blasterA.glb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/3D/create_gun/assets/blasterA.glb -------------------------------------------------------------------------------- /3D/create_gun/assets/crosshair007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/3D/create_gun/assets/crosshair007.png -------------------------------------------------------------------------------- /3D/create_gun/gun.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends Node3D 3 | 4 | @export var gunResource: GunResource 5 | 6 | func _ready() -> void: 7 | if gunResource: 8 | add_child(gunResource.model.instantiate()) 9 | 10 | func get_damage_value(): 11 | return gunResource.damage 12 | -------------------------------------------------------------------------------- /3D/create_gun/gun.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://ivread0rtkas"] 2 | 3 | [ext_resource type="Script" path="res://create_gun/gun.gd" id="1_6wlrm"] 4 | [ext_resource type="Resource" uid="uid://t0agql8owqv6" path="res://create_gun/resources/guns/gun_1.tres" id="2_367en"] 5 | 6 | [node name="Gun" type="Node3D"] 7 | script = ExtResource("1_6wlrm") 8 | gunResource = ExtResource("2_367en") 9 | -------------------------------------------------------------------------------- /3D/create_gun/resources/guns/gun_1.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="GunResource" load_steps=3 format=3 uid="uid://t0agql8owqv6"] 2 | 3 | [ext_resource type="PackedScene" uid="uid://ca17lxmi82kt" path="res://assets/blaster_packages/blasterA.glb" id="1_3heg3"] 4 | [ext_resource type="Script" path="res://create_gun/resources/guns/gun_resource.gd" id="1_lqgli"] 5 | 6 | [resource] 7 | script = ExtResource("1_lqgli") 8 | model = ExtResource("1_3heg3") 9 | damage = 40 10 | -------------------------------------------------------------------------------- /3D/create_gun/resources/guns/gun_resource.gd: -------------------------------------------------------------------------------- 1 | extends Resource 2 | class_name GunResource 3 | 4 | @export var model: PackedScene 5 | @export var damage: int 6 | -------------------------------------------------------------------------------- /3D/create_gun/target.gd: -------------------------------------------------------------------------------- 1 | extends Area3D 2 | 3 | @export var health := 100 4 | 5 | func _ready() -> void: 6 | add_to_group("enemy") 7 | 8 | func do_damage(damage): 9 | health -= damage 10 | 11 | if health < 0: queue_free() 12 | -------------------------------------------------------------------------------- /3D/damage_indicator/damage_indicator.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://soly4tbrwp7m"] 2 | 3 | [ext_resource type="Script" path="res://damage_indicator/damage_indicator.gd" id="1_vguvn"] 4 | 5 | [node name="damageIndicator" type="Node3D"] 6 | script = ExtResource("1_vguvn") 7 | -------------------------------------------------------------------------------- /3D/damage_indicator/indicator_label.gd: -------------------------------------------------------------------------------- 1 | extends Node3D 2 | 3 | func set_value(value: int): 4 | $SubViewport/Label.text = str(value) 5 | $SubViewport/Label.add_theme_color_override("font_color", _get_indicator_color(value)) 6 | 7 | func _get_indicator_color(value): 8 | if value > 0: return Color.GREEN 9 | elif value < 0: return Color.RED 10 | else: return Color.GRAY 11 | -------------------------------------------------------------------------------- /3D/damage_indicator/indicator_label.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://c4ypntx60j45q"] 2 | 3 | [ext_resource type="Script" path="res://damage_indicator/indicator_label.gd" id="1_x85oo"] 4 | 5 | [sub_resource type="ViewportTexture" id="ViewportTexture_364vk"] 6 | viewport_path = NodePath("SubViewport") 7 | 8 | [node name="IndicatorLabel" type="Node3D"] 9 | script = ExtResource("1_x85oo") 10 | 11 | [node name="Sprite3D" type="Sprite3D" parent="."] 12 | billboard = 1 13 | texture = SubResource("ViewportTexture_364vk") 14 | 15 | [node name="SubViewport" type="SubViewport" parent="."] 16 | transparent_bg = true 17 | size = Vector2i(150, 70) 18 | 19 | [node name="Label" type="Label" parent="SubViewport"] 20 | custom_minimum_size = Vector2(150, 70) 21 | offset_right = 150.0 22 | offset_bottom = 70.0 23 | theme_override_constants/outline_size = 15 24 | theme_override_font_sizes/font_size = 50 25 | text = "50" 26 | horizontal_alignment = 1 27 | -------------------------------------------------------------------------------- /3D/first_person_camera/first_person_player.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=4 format=3 uid="uid://eba7ygh6strt"] 2 | 3 | [ext_resource type="Script" path="res://first_person_camera/first_person_player.gd" id="1_3xueb"] 4 | 5 | [sub_resource type="CapsuleMesh" id="CapsuleMesh_vntxa"] 6 | 7 | [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_68vwf"] 8 | 9 | [node name="FirstPersonPlayer" type="CharacterBody3D"] 10 | script = ExtResource("1_3xueb") 11 | 12 | [node name="MeshInstance3D" type="MeshInstance3D" parent="."] 13 | mesh = SubResource("CapsuleMesh_vntxa") 14 | 15 | [node name="CollisionShape3D" type="CollisionShape3D" parent="."] 16 | shape = SubResource("CapsuleShape3D_68vwf") 17 | 18 | [node name="Camera3D" type="Camera3D" parent="."] 19 | transform = Transform3D(1, 0, 0, 0, 0.965926, 0.258819, 0, -0.258819, 0.965926, 0, 0.7, 0) 20 | fov = 60.0 21 | -------------------------------------------------------------------------------- /3D/get_and_cut_cheese/cheese.gd: -------------------------------------------------------------------------------- 1 | extends CharacterBody3D 2 | 3 | @onready var model: Node3D = $model 4 | 5 | const FOOD_INGREDIENT_CHEESE_CHOPPED = preload("res://assets/kitchen prototype/food_ingredient_cheese_chopped.gltf") 6 | const FOOD_INGREDIENT_CHEESE_SLICE = preload("res://assets/kitchen prototype/food_ingredient_cheese_slice.gltf") 7 | 8 | var cutModels = [FOOD_INGREDIENT_CHEESE_CHOPPED, FOOD_INGREDIENT_CHEESE_SLICE] 9 | 10 | var cuts = 0 11 | var maxCuts = 2 12 | 13 | func cut(): 14 | if cuts == maxCuts: return 15 | cuts += 1 16 | 17 | _change_model(cutModels[cuts -1]) 18 | 19 | func _change_model(newModel): 20 | for node in model.get_children(): 21 | node.queue_free() 22 | 23 | model.add_child(newModel.instantiate()) 24 | -------------------------------------------------------------------------------- /3D/get_and_cut_cheese/cheese.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://cvqibvcusojc5"] 2 | 3 | [ext_resource type="Script" path="res://get_and_cut_cheese/cheese.gd" id="1_vqpni"] 4 | [ext_resource type="PackedScene" uid="uid://sfldrr51cr5t" path="res://assets/kitchen prototype/food_ingredient_cheese.gltf" id="2_pgpjr"] 5 | 6 | [node name="Cheese" type="CharacterBody3D"] 7 | transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0) 8 | script = ExtResource("1_vqpni") 9 | 10 | [node name="model" type="Node3D" parent="."] 11 | 12 | [node name="food_ingredient_cheese2" parent="model" instance=ExtResource("2_pgpjr")] 13 | -------------------------------------------------------------------------------- /3D/get_and_cut_cheese/cheese_box.gd: -------------------------------------------------------------------------------- 1 | extends StaticBody3D 2 | class_name object_storage 3 | 4 | @export var object: PackedScene 5 | 6 | func get_object(): 7 | return object.instantiate() 8 | -------------------------------------------------------------------------------- /3D/group_formation/companion1.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=4 format=3 uid="uid://brx60c43602pm"] 2 | 3 | [ext_resource type="Script" path="res://group_formation/companion.gd" id="1_7gu17"] 4 | [ext_resource type="PackedScene" uid="uid://dducp31asd3a4" path="res://assets/platform/character/character_dog.gltf" id="1_gor70"] 5 | 6 | [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_020at"] 7 | 8 | [node name="Companion" type="CharacterBody3D"] 9 | script = ExtResource("1_7gu17") 10 | 11 | [node name="character_dog2" parent="." instance=ExtResource("1_gor70")] 12 | 13 | [node name="CollisionShape3D" type="CollisionShape3D" parent="."] 14 | transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0) 15 | shape = SubResource("CapsuleShape3D_020at") 16 | 17 | [node name="NavigationAgent3D" type="NavigationAgent3D" parent="."] 18 | -------------------------------------------------------------------------------- /3D/group_formation/companion2.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=4 format=3 uid="uid://b5jysk3386ey8"] 2 | 3 | [ext_resource type="PackedScene" uid="uid://by82rjr3oyggr" path="res://assets/platform/character/character_bear.gltf" id="1_ao4j4"] 4 | [ext_resource type="Script" path="res://group_formation/companion.gd" id="1_yfgep"] 5 | 6 | [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_8we8r"] 7 | 8 | [node name="Companion" type="CharacterBody3D"] 9 | script = ExtResource("1_yfgep") 10 | companionNumber = 2 11 | 12 | [node name="character_bear2" parent="." instance=ExtResource("1_ao4j4")] 13 | 14 | [node name="CollisionShape3D" type="CollisionShape3D" parent="."] 15 | transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0) 16 | shape = SubResource("CapsuleShape3D_8we8r") 17 | 18 | [node name="NavigationAgent3D" type="NavigationAgent3D" parent="."] 19 | -------------------------------------------------------------------------------- /3D/group_formation/group_formation.gd: -------------------------------------------------------------------------------- 1 | extends Node3D 2 | 3 | @onready var formationNodes = [%Position1, %Position2] 4 | 5 | enum Formation_Types {LINE, ROW, TRIANGLE} 6 | 7 | const formationPosition = { 8 | Formation_Types.LINE: [Vector3(0,0,-4), Vector3(0,0,-6)], 9 | Formation_Types.ROW: [Vector3(-4,0,0), Vector3(4,0,0)], 10 | Formation_Types.TRIANGLE: [Vector3(-2,0,-4), Vector3(2,0,-4)] 11 | } 12 | 13 | func _ready() -> void: 14 | add_to_group("GroupFormation") 15 | 16 | func change_formation(formation: Formation_Types): 17 | for i in formationNodes.size(): 18 | formationNodes[i].position = formationPosition[formation][i] 19 | 20 | func get_formation_position(companionNumber: int): 21 | return formationNodes[companionNumber - 1].global_position 22 | -------------------------------------------------------------------------------- /3D/group_formation/group_formation.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://dfxb5innprmtp"] 2 | 3 | [ext_resource type="Script" path="res://group_formation/group_formation.gd" id="1_qvmos"] 4 | 5 | [node name="GroupFormation" type="Node3D"] 6 | script = ExtResource("1_qvmos") 7 | 8 | [node name="Position1" type="Marker3D" parent="."] 9 | unique_name_in_owner = true 10 | transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -2) 11 | 12 | [node name="Position2" type="Marker3D" parent="."] 13 | unique_name_in_owner = true 14 | transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -4) 15 | -------------------------------------------------------------------------------- /3D/gun_effects/assets/blasterA.glb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/3D/gun_effects/assets/blasterA.glb -------------------------------------------------------------------------------- /3D/gun_effects/assets/crosshair007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/3D/gun_effects/assets/crosshair007.png -------------------------------------------------------------------------------- /3D/gun_effects/effects/bulletHole.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=4 format=3 uid="uid://uxt2pckwso32"] 2 | 3 | [ext_resource type="Script" path="res://gun_effects/effects/bullet_hole.gd" id="1_uwhgx"] 4 | 5 | [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_jyjst"] 6 | albedo_color = Color(0, 0, 0, 1) 7 | 8 | [sub_resource type="CylinderMesh" id="CylinderMesh_0wkpp"] 9 | material = SubResource("StandardMaterial3D_jyjst") 10 | top_radius = 0.05 11 | bottom_radius = 0.05 12 | height = 0.001 13 | 14 | [node name="BulletHole" type="Node3D"] 15 | script = ExtResource("1_uwhgx") 16 | 17 | [node name="MeshInstance3D" type="MeshInstance3D" parent="."] 18 | transform = Transform3D(1.91069e-15, 4.37114e-08, 1, 1, -4.37114e-08, 0, 4.37114e-08, 1, -4.37114e-08, 0, 0, 0) 19 | mesh = SubResource("CylinderMesh_0wkpp") 20 | -------------------------------------------------------------------------------- /3D/gun_effects/effects/bullet_hole.gd: -------------------------------------------------------------------------------- 1 | extends Node3D 2 | 3 | @export var despawnTime := 3.0 4 | 5 | func _ready() -> void: 6 | get_tree().create_timer(despawnTime).timeout.connect(queue_free) 7 | -------------------------------------------------------------------------------- /3D/gun_effects/effects/bullet_trail.gd: -------------------------------------------------------------------------------- 1 | extends Node3D 2 | 3 | @export var speed:= 40.0 4 | @export var spawnTime := 1.0 5 | 6 | @onready var ray_cast_3d: RayCast3D = $RayCast3D 7 | 8 | var direction:Vector3 9 | 10 | func _ready() -> void: 11 | get_tree().create_timer(spawnTime).timeout.connect(queue_free) 12 | 13 | func _process(delta: float) -> void: 14 | if ray_cast_3d.is_colliding(): queue_free() 15 | 16 | position += direction * speed * delta 17 | scale *= 0.96 18 | 19 | func set_direction(newDirection): 20 | direction = newDirection 21 | -------------------------------------------------------------------------------- /3D/gun_effects/gun.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends Node3D 3 | 4 | @export var gunResource: GunResource 5 | 6 | @onready var marker_3d: Marker3D = $Marker3D 7 | 8 | func _ready() -> void: 9 | if gunResource: 10 | add_child(gunResource.model.instantiate()) 11 | marker_3d.position = gunResource.bulletSpawnOffset 12 | 13 | func get_damage_value(): 14 | return gunResource.damage 15 | 16 | func get_bullet_spawn_point(): 17 | return marker_3d.global_position 18 | -------------------------------------------------------------------------------- /3D/gun_effects/gun.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://ivread0rtkas"] 2 | 3 | [ext_resource type="Script" path="res://gun_effects/gun.gd" id="1_6wlrm"] 4 | [ext_resource type="Resource" uid="uid://ddebq8fpyktj6" path="res://gun_effects/resources/guns/gun_1.tres" id="2_367en"] 5 | 6 | [node name="Gun" type="Node3D"] 7 | script = ExtResource("1_6wlrm") 8 | gunResource = ExtResource("2_367en") 9 | 10 | [node name="Marker3D" type="Marker3D" parent="."] 11 | transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.153104, 0.171201, 0.3514) 12 | -------------------------------------------------------------------------------- /3D/gun_effects/resources/guns/gun_1.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="GunResource" load_steps=3 format=3 uid="uid://ddebq8fpyktj6"] 2 | 3 | [ext_resource type="PackedScene" uid="uid://ca17lxmi82kt" path="res://assets/blaster_packages/blasterA.glb" id="1_tx3d2"] 4 | [ext_resource type="Script" path="res://gun_effects/resources/guns/gun_resource.gd" id="2_b4nv7"] 5 | 6 | [resource] 7 | script = ExtResource("2_b4nv7") 8 | model = ExtResource("1_tx3d2") 9 | bulletSpawnOffset = Vector3(-0.153104, 0.171201, 0.3514) 10 | damage = 40 11 | -------------------------------------------------------------------------------- /3D/gun_effects/resources/guns/gun_resource.gd: -------------------------------------------------------------------------------- 1 | extends Resource 2 | class_name GunResource 3 | 4 | @export var model: PackedScene 5 | @export var bulletSpawnOffset: Vector3 6 | @export var damage: int 7 | -------------------------------------------------------------------------------- /3D/gun_effects/target.gd: -------------------------------------------------------------------------------- 1 | extends Area3D 2 | 3 | @export var health := 100 4 | 5 | func _ready() -> void: 6 | add_to_group("enemy") 7 | 8 | func do_damage(damage): 9 | health -= damage 10 | 11 | if health < 0: queue_free() 12 | -------------------------------------------------------------------------------- /3D/interact_with_ui_3D/door_lock.gd.uid: -------------------------------------------------------------------------------- 1 | uid://b5h4oslrwns2w 2 | -------------------------------------------------------------------------------- /3D/interact_with_ui_3D/first_person_player.gd.uid: -------------------------------------------------------------------------------- 1 | uid://dx2pla6edsoeb 2 | -------------------------------------------------------------------------------- /3D/interact_with_ui_3D/ui.gd: -------------------------------------------------------------------------------- 1 | extends Control 2 | 3 | signal code_entered(code: int) 4 | 5 | @onready var line_edit: LineEdit = %LineEdit 6 | @onready var grid_container: GridContainer = %GridContainer 7 | 8 | var enteredCode = "" 9 | 10 | func _ready() -> void: 11 | for button in grid_container.get_children(): 12 | button.pressed.connect(_on_button_pressed.bind(button.name)) 13 | 14 | func _on_button_pressed(name): 15 | if name.is_valid_int(): 16 | enteredCode += name 17 | line_edit.text = enteredCode 18 | elif name == "Enter": 19 | _send_code() 20 | elif name == "Reset": 21 | enteredCode = "" 22 | line_edit.text = "" 23 | 24 | func _send_code(): 25 | code_entered.emit(enteredCode.to_int()) 26 | enteredCode = "" 27 | line_edit.text = "" 28 | -------------------------------------------------------------------------------- /3D/interact_with_ui_3D/ui.gd.uid: -------------------------------------------------------------------------------- 1 | uid://cdi5mgpv6hpig 2 | -------------------------------------------------------------------------------- /3D/move_on_grid/grid_character.gd: -------------------------------------------------------------------------------- 1 | extends CharacterBody3D 2 | 3 | @export var grid: Node3D 4 | @export var canMove = true 5 | 6 | func _input(event: InputEvent) -> void: 7 | if not canMove or not event is InputEventKey or not event.is_pressed(): return 8 | 9 | var gridCellSize = grid.get_cell_space() 10 | var targetPosition = global_position 11 | 12 | if Input.is_action_just_pressed("ui_left"): 13 | targetPosition += Vector3.LEFT * gridCellSize 14 | elif Input.is_action_just_pressed("ui_right"): 15 | targetPosition += Vector3.RIGHT * gridCellSize 16 | elif Input.is_action_just_pressed("ui_up"): 17 | targetPosition += Vector3.FORWARD * gridCellSize 18 | elif Input.is_action_just_pressed("ui_down"): 19 | targetPosition += Vector3.BACK * gridCellSize 20 | 21 | if grid.is_on_grid(targetPosition): 22 | global_position = targetPosition 23 | -------------------------------------------------------------------------------- /3D/move_on_grid/grid_character.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://b5bmxy7nuk7qp"] 2 | 3 | [ext_resource type="Script" path="res://move_on_grid/grid_character.gd" id="1_alt72"] 4 | [ext_resource type="PackedScene" uid="uid://by82rjr3oyggr" path="res://assets/platform/character/character_bear.gltf" id="2_0d6qw"] 5 | 6 | [node name="GridCharacter" type="CharacterBody3D"] 7 | script = ExtResource("1_alt72") 8 | 9 | [node name="character_bear" parent="." instance=ExtResource("2_0d6qw")] 10 | transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 0, -0.898568, 0) 11 | -------------------------------------------------------------------------------- /3D/moving_platform/platform_character.gd: -------------------------------------------------------------------------------- 1 | extends CharacterBody3D 2 | 3 | @export var speed := 5.0 4 | @export var jumpPower := 4.5 5 | @export var turnSpeed := 1.5 6 | 7 | func _physics_process(delta: float) -> void: 8 | # Add the gravity. 9 | if not is_on_floor(): 10 | velocity += get_gravity() * delta 11 | 12 | # Handle jump. 13 | if Input.is_action_just_pressed("ui_accept") and is_on_floor(): 14 | velocity.y = jumpPower 15 | 16 | # Handle turn 17 | var input_x = Input.get_axis("ui_right", "ui_left") 18 | rotate_y(input_x * deg_to_rad(turnSpeed)) 19 | 20 | # Handle movement 21 | var input_y = Input.get_axis("ui_up", "ui_down") 22 | var direction = transform.basis.z * input_y 23 | 24 | if direction: 25 | velocity.x = direction.x * speed 26 | velocity.z = direction.z * speed 27 | else: 28 | velocity.x = move_toward(velocity.x, 0, speed) 29 | velocity.z = move_toward(velocity.z, 0, speed) 30 | 31 | move_and_slide() 32 | -------------------------------------------------------------------------------- /3D/pick_up_and_throw/ball.gd: -------------------------------------------------------------------------------- 1 | extends RigidBody3D 2 | 3 | @onready var label_3d: Label3D = $Label3D 4 | 5 | var selected = false 6 | 7 | func _ready() -> void: 8 | add_to_group("object") 9 | 10 | label_3d.hide() 11 | label_3d.top_level = true 12 | 13 | func set_selection(boolean: bool): 14 | selected = boolean 15 | 16 | func _process(delta: float) -> void: 17 | label_3d.global_position = global_position + Vector3(0,0.75,0) 18 | -------------------------------------------------------------------------------- /3D/pick_up_and_throw/ball.gd.uid: -------------------------------------------------------------------------------- 1 | uid://dx4y238dxc42j 2 | -------------------------------------------------------------------------------- /3D/pick_up_and_throw/main_char.gd.uid: -------------------------------------------------------------------------------- 1 | uid://c5gg0nb1wu4ps 2 | -------------------------------------------------------------------------------- /3D/racer_track_rounds/checkPoint.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=4 format=3 uid="uid://msk06opfn0kh"] 2 | 3 | [ext_resource type="PackedScene" uid="uid://cum2a7c32163j" path="res://assets/car_race/Finish.fbx" id="1_hmvs2"] 4 | [ext_resource type="Script" path="res://3D_racer_track_rounds/check_point.gd" id="1_t0u1y"] 5 | 6 | [sub_resource type="BoxShape3D" id="BoxShape3D_svjxo"] 7 | size = Vector3(2, 1.7, 0.4) 8 | 9 | [node name="CheckPoint" type="Area3D"] 10 | script = ExtResource("1_t0u1y") 11 | 12 | [node name="Finish" parent="." instance=ExtResource("1_hmvs2")] 13 | 14 | [node name="CollisionShape3D" type="CollisionShape3D" parent="."] 15 | transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1, 0.85, -1) 16 | shape = SubResource("BoxShape3D_svjxo") 17 | 18 | [connection signal="body_entered" from="." to="." method="_on_body_entered"] 19 | -------------------------------------------------------------------------------- /3D/racer_track_rounds/check_point.gd: -------------------------------------------------------------------------------- 1 | extends Area3D 2 | 3 | @export var hasPassed = false 4 | 5 | func _ready() -> void: 6 | add_to_group("checkPoints") 7 | 8 | func _on_body_entered(body: Node3D) -> void: 9 | var isPlayer = get_tree().get_first_node_in_group("player") 10 | 11 | if isPlayer: hasPassed = true 12 | -------------------------------------------------------------------------------- /3D/racer_track_rounds/startPoint.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=4 format=3 uid="uid://c3j82an517bx"] 2 | 3 | [ext_resource type="PackedScene" uid="uid://bllm3fxbjgi2b" path="res://assets/car_race/start line.glb" id="1_3amwb"] 4 | [ext_resource type="Script" path="res://3D_racer_track_rounds/start_point.gd" id="1_e05dl"] 5 | 6 | [sub_resource type="BoxShape3D" id="BoxShape3D_yajhs"] 7 | size = Vector3(0.7, 1, 1.7) 8 | 9 | [node name="StartPoint" type="Area3D"] 10 | script = ExtResource("1_e05dl") 11 | 12 | [node name="start line" parent="." instance=ExtResource("1_3amwb")] 13 | 14 | [node name="CollisionShape3D" type="CollisionShape3D" parent="."] 15 | transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0) 16 | shape = SubResource("BoxShape3D_yajhs") 17 | 18 | [connection signal="body_entered" from="." to="." method="_on_body_entered"] 19 | -------------------------------------------------------------------------------- /3D/racer_track_rounds/start_point.gd: -------------------------------------------------------------------------------- 1 | extends Area3D 2 | 3 | signal next_round() 4 | 5 | func _ready() -> void: 6 | add_to_group("startPoint") 7 | 8 | func _on_body_entered(body: Node3D) -> void: 9 | var isPlayer = get_tree().get_first_node_in_group("player") 10 | 11 | if isPlayer: _check_round_done() 12 | 13 | func _check_round_done(): 14 | var checkPoints = get_tree().get_nodes_in_group("checkPoints") 15 | var roundDone = true 16 | 17 | for checkPoint in checkPoints: 18 | if not checkPoint.hasPassed: roundDone = false 19 | 20 | if roundDone: _next_round() 21 | 22 | func _next_round(): 23 | var checkPoints = get_tree().get_nodes_in_group("checkPoints") 24 | 25 | for checkPoint in checkPoints: 26 | checkPoint.hasPassed = false 27 | 28 | next_round.emit() 29 | -------------------------------------------------------------------------------- /3D/racer_track_rounds/ui.gd: -------------------------------------------------------------------------------- 1 | extends CanvasLayer 2 | 3 | var laps := 0 4 | 5 | func _ready() -> void: 6 | var startPoint = get_tree().get_first_node_in_group("startPoint") 7 | startPoint.next_round.connect(_add_round) 8 | 9 | func _add_round(): 10 | laps += 1 11 | %roundCountLabel.text = str(laps) 12 | -------------------------------------------------------------------------------- /3D/random_dungeon/random_dungeon.gd.uid: -------------------------------------------------------------------------------- 1 | uid://bqq0f10vp3d0h 2 | -------------------------------------------------------------------------------- /3D/random_dungeon/random_room.gd.uid: -------------------------------------------------------------------------------- 1 | uid://byfcuewxxs1v6 2 | -------------------------------------------------------------------------------- /3D/random_room/dungeon_tile_maps/floor_tile_set.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://bllbk51dig0dp"] 2 | 3 | [ext_resource type="PackedScene" uid="uid://lyp53lqaylks" path="res://dungeon_assets/floor_tile_large.gltf.glb" id="1_p1y8k"] 4 | 5 | [node name="FloorTileSet" type="Node3D"] 6 | 7 | [node name="floor_tile_large_gltf" parent="." instance=ExtResource("1_p1y8k")] 8 | -------------------------------------------------------------------------------- /3D/random_room/random_room.gd.uid: -------------------------------------------------------------------------------- 1 | uid://4ictwtx13ai5 2 | -------------------------------------------------------------------------------- /3D/rigidBody3D/ball.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://b5iwnw04xujo1"] 2 | 3 | [ext_resource type="PackedScene" uid="uid://b4k2kxrf1wcqr" path="res://assets/soccer/soccer_ball.fbx" id="1_6a88s"] 4 | 5 | [sub_resource type="SphereShape3D" id="SphereShape3D_tb82g"] 6 | radius = 0.10538 7 | 8 | [node name="StaticBody3D2" type="RigidBody3D"] 9 | transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.86245, 0) 10 | linear_damp = 1.0 11 | 12 | [node name="soccer_ball" parent="." instance=ExtResource("1_6a88s")] 13 | transform = Transform3D(0.1, 0, 0, 0, 0.1, 0, 0, 0, 0.1, 0, 0, 0) 14 | 15 | [node name="CollisionShape3D" type="CollisionShape3D" parent="."] 16 | shape = SubResource("SphereShape3D_tb82g") 17 | 18 | [editable path="soccer_ball"] 19 | -------------------------------------------------------------------------------- /3D/rigidBody3D/player.gd: -------------------------------------------------------------------------------- 1 | extends RigidBody3D 2 | 3 | @export var movementSpeed := 0.5 4 | @export var maxSpeed = 5 5 | @export var turnSpeed := 1.5 6 | 7 | func _physics_process(delta: float) -> void: 8 | var massMultiplicator = mass * 100 9 | 10 | var speedForce = Input.get_axis("ui_up", "ui_down") * movementSpeed * massMultiplicator 11 | var turnDegree = Input.get_axis("ui_right", "ui_left") * deg_to_rad(turnSpeed) 12 | 13 | rotate_y(turnDegree) 14 | 15 | var force = global_transform.basis.z * speedForce 16 | apply_force(force) 17 | 18 | 19 | func _integrate_forces(state: PhysicsDirectBodyState3D): 20 | _set_max_speed(state) 21 | 22 | func _set_max_speed(state: PhysicsDirectBodyState3D): 23 | if state.linear_velocity.length() > maxSpeed: 24 | state.linear_velocity = state.linear_velocity.normalized() * maxSpeed 25 | -------------------------------------------------------------------------------- /3D/roll_dice/Dice.gd: -------------------------------------------------------------------------------- 1 | extends RigidBody3D 2 | 3 | @export var maxRandomForce = 50 4 | 5 | @onready var faces = $Faces 6 | 7 | var isMoving = false 8 | 9 | func _physics_process(delta): 10 | isMoving = linear_velocity.length() > 0.01 11 | 12 | func get_number(): 13 | var lowest_y 14 | var number 15 | 16 | for node in faces.get_children(): 17 | var y_value = node.global_position.y 18 | 19 | if not lowest_y || y_value < lowest_y: 20 | lowest_y = y_value 21 | number = node.name 22 | 23 | return int(str(number)) 24 | 25 | func roll_dice(): 26 | if isMoving: return 27 | 28 | var rng = RandomNumberGenerator.new() 29 | var randomDirection = [-1, 1] 30 | var force = Vector3.ZERO 31 | 32 | force.x = rng.randi_range(10, maxRandomForce) * randomDirection.pick_random() 33 | force.z = rng.randi_range(10, maxRandomForce) * randomDirection.pick_random() 34 | 35 | apply_torque(force) 36 | -------------------------------------------------------------------------------- /3D/roll_dice/dice.glb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/3D/roll_dice/dice.glb -------------------------------------------------------------------------------- /3D/select_and_switch_targets/enemy.gd: -------------------------------------------------------------------------------- 1 | extends CharacterBody3D 2 | 3 | @onready var selection_indicator: MeshInstance3D = %selectionIndicator 4 | 5 | func _ready() -> void: 6 | add_to_group("enemy") 7 | 8 | set_selection(false) 9 | 10 | func set_selection(boolean: bool): 11 | selection_indicator.visible = boolean 12 | -------------------------------------------------------------------------------- /3D/select_and_switch_targets/enemy.gd.uid: -------------------------------------------------------------------------------- 1 | uid://bbattg22ngqu7 2 | -------------------------------------------------------------------------------- /3D/select_and_switch_targets/main_char.gd.uid: -------------------------------------------------------------------------------- 1 | uid://cypxkcjjgyj48 2 | -------------------------------------------------------------------------------- /3D/select_nearest_object/ball.gd: -------------------------------------------------------------------------------- 1 | extends RigidBody3D 2 | 3 | @onready var label_3d: Label3D = $Label3D 4 | 5 | var selected = false 6 | 7 | func _ready() -> void: 8 | add_to_group("object") 9 | 10 | label_3d.hide() 11 | label_3d.top_level = true 12 | 13 | func set_selection(boolean: bool): 14 | selected = boolean 15 | label_3d.visible = boolean 16 | 17 | func _process(delta: float) -> void: 18 | label_3d.global_position = global_position + Vector3(0,0.75,0) 19 | -------------------------------------------------------------------------------- /3D/select_nearest_object/ball.gd.uid: -------------------------------------------------------------------------------- 1 | uid://b56m72dax1r7k 2 | -------------------------------------------------------------------------------- /3D/select_nearest_object/main_char.gd.uid: -------------------------------------------------------------------------------- 1 | uid://bdawdgyrax6e4 2 | -------------------------------------------------------------------------------- /3D/shoot_fireball/Fireball.gd: -------------------------------------------------------------------------------- 1 | extends Area3D 2 | 3 | @export var speed = 10 4 | @export var damage = 500 5 | 6 | func _process(delta): 7 | var dir = get_tree().get_first_node_in_group("player").global_transform.basis.z.normalized() 8 | global_position += dir * speed * delta 9 | 10 | 11 | func _on_body_entered(body): 12 | if body.is_in_group("enemies"): 13 | body.take_damage(damage) 14 | queue_free() 15 | -------------------------------------------------------------------------------- /3D/simple_car_game_full_video/car.gd.uid: -------------------------------------------------------------------------------- 1 | uid://bwchidp7j5n0k 2 | -------------------------------------------------------------------------------- /3D/simple_car_game_full_video/car_ki.gd.uid: -------------------------------------------------------------------------------- 1 | uid://bi73qqann218g 2 | -------------------------------------------------------------------------------- /3D/simple_state_machine/follow.gd: -------------------------------------------------------------------------------- 1 | extends Node 2 | 3 | @export var speed := 4.0 4 | 5 | @onready var body: CharacterBody3D = get_parent().get_parent() 6 | 7 | func do(): 8 | var nextPathPosition = body.navigation_agent_3d.get_next_path_position() 9 | 10 | var direction = body.global_position.direction_to(nextPathPosition) 11 | var calculateVelcotiy = direction * speed 12 | calculateVelcotiy.y = 0 13 | 14 | body.velocity = calculateVelcotiy 15 | 16 | body.look_at(body.global_position + calculateVelcotiy) 17 | 18 | body.navigation_agent_3d.set_target_position(body.target.global_position) 19 | -------------------------------------------------------------------------------- /3D/simple_state_machine/idle.gd: -------------------------------------------------------------------------------- 1 | extends Node 2 | 3 | @onready var body: CharacterBody3D = get_parent().get_parent() 4 | 5 | const SPEED = 1.0 6 | 7 | var directions = [Vector3.RIGHT, Vector3.BACK, Vector3.LEFT, Vector3.FORWARD] 8 | 9 | func do(): 10 | if Engine.get_physics_frames() % 45 == 0: 11 | body.velocity = directions.pick_random() * SPEED 12 | 13 | body.look_at(body.global_position + body.velocity) 14 | -------------------------------------------------------------------------------- /3D/simple_state_machine/push.gd: -------------------------------------------------------------------------------- 1 | extends Node 2 | 3 | @onready var body: CharacterBody3D = get_parent().get_parent() 4 | 5 | func do(): 6 | var direction = body.target.global_position.direction_to(body.global_position) 7 | direction.y = 0 8 | body.target.global_position += direction * -5 9 | 10 | body.currentState = body.States.FOLLOW 11 | -------------------------------------------------------------------------------- /3D/store_items_cupboard/kitchen_counter.gd: -------------------------------------------------------------------------------- 1 | extends StaticBody3D 2 | class_name store_object 3 | 4 | @onready var objects: Node3D = $Objects 5 | @onready var object_places: Node3D = $ObjectPlaces 6 | 7 | var itemsPlaced = [] 8 | 9 | func _ready() -> void: 10 | for i in object_places.get_child_count(): 11 | itemsPlaced.append(null) 12 | 13 | func add_object(object): 14 | if not itemsPlaced.has(null): return false 15 | 16 | object.reparent(objects) 17 | 18 | for i in len(itemsPlaced): 19 | if itemsPlaced[i]: continue 20 | 21 | object.global_position = object_places.get_children()[i].global_position 22 | itemsPlaced[i] = object 23 | break 24 | 25 | object.rotation_degrees = Vector3(90,0,0) 26 | return true 27 | 28 | func _on_objects_child_exiting_tree(node: Node) -> void: 29 | var index = itemsPlaced.find(node) 30 | itemsPlaced[index] = null 31 | -------------------------------------------------------------------------------- /3D/switch guns/assets/blasterA.glb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/3D/switch guns/assets/blasterA.glb -------------------------------------------------------------------------------- /3D/switch guns/assets/crosshair007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/3D/switch guns/assets/crosshair007.png -------------------------------------------------------------------------------- /3D/switch guns/effects/bulletHole.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=4 format=3 uid="uid://uxt2pckwso32"] 2 | 3 | [ext_resource type="Script" path="res://switch guns/effects/bullet_hole.gd" id="1_uwhgx"] 4 | 5 | [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_jyjst"] 6 | albedo_color = Color(0, 0, 0, 1) 7 | 8 | [sub_resource type="CylinderMesh" id="CylinderMesh_0wkpp"] 9 | material = SubResource("StandardMaterial3D_jyjst") 10 | top_radius = 0.05 11 | bottom_radius = 0.05 12 | height = 0.001 13 | 14 | [node name="BulletHole" type="Node3D"] 15 | script = ExtResource("1_uwhgx") 16 | 17 | [node name="MeshInstance3D" type="MeshInstance3D" parent="."] 18 | transform = Transform3D(1.91069e-15, 4.37114e-08, 1, 1, -4.37114e-08, 0, 4.37114e-08, 1, -4.37114e-08, 0, 0, 0) 19 | mesh = SubResource("CylinderMesh_0wkpp") 20 | -------------------------------------------------------------------------------- /3D/switch guns/effects/bullet_hole.gd: -------------------------------------------------------------------------------- 1 | extends Node3D 2 | 3 | @export var despawnTime := 3.0 4 | 5 | func _ready() -> void: 6 | get_tree().create_timer(despawnTime).timeout.connect(queue_free) 7 | -------------------------------------------------------------------------------- /3D/switch guns/effects/bullet_trail.gd: -------------------------------------------------------------------------------- 1 | extends Node3D 2 | 3 | @export var speed:= 40.0 4 | @export var spawnTime := 1.0 5 | 6 | @onready var ray_cast_3d: RayCast3D = $RayCast3D 7 | 8 | var direction:Vector3 9 | 10 | func _ready() -> void: 11 | get_tree().create_timer(spawnTime).timeout.connect(queue_free) 12 | 13 | func _process(delta: float) -> void: 14 | if ray_cast_3d.is_colliding(): queue_free() 15 | 16 | position += direction * speed * delta 17 | scale *= 0.96 18 | 19 | func set_direction(newDirection): 20 | direction = newDirection 21 | -------------------------------------------------------------------------------- /3D/switch guns/gun.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://ivread0rtkas"] 2 | 3 | [ext_resource type="Script" path="res://switch guns/gun.gd" id="1_6wlrm"] 4 | [ext_resource type="Resource" uid="uid://ddebq8fpyktj6" path="res://switch guns/resources/guns/gun_1.tres" id="2_367en"] 5 | 6 | [node name="Gun" type="Node3D"] 7 | script = ExtResource("1_6wlrm") 8 | gunResource = ExtResource("2_367en") 9 | 10 | [node name="Marker3D" type="Marker3D" parent="."] 11 | transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.162194, 0.0908785, 0.47537) 12 | 13 | [node name="shootCooldownTimer" type="Timer" parent="."] 14 | wait_time = 0.5 15 | one_shot = true 16 | 17 | [node name="reloadTimer" type="Timer" parent="."] 18 | wait_time = 4.0 19 | one_shot = true 20 | -------------------------------------------------------------------------------- /3D/switch guns/resources/guns/gun_1.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="GunResource" load_steps=3 format=3 uid="uid://ddebq8fpyktj6"] 2 | 3 | [ext_resource type="PackedScene" uid="uid://ca17lxmi82kt" path="res://assets/blaster_packages/blasterA.glb" id="1_tx3d2"] 4 | [ext_resource type="Script" path="res://switch guns/resources/guns/gun_resource.gd" id="2_b4nv7"] 5 | 6 | [resource] 7 | script = ExtResource("2_b4nv7") 8 | model = ExtResource("1_tx3d2") 9 | bulletSpawnOffset = Vector3(-0.153104, 0.171201, 0.3514) 10 | damage = 40 11 | shootCooldown = 0.5 12 | reloadTime = 4.0 13 | magazineSize = 6 14 | bullets = 60 15 | -------------------------------------------------------------------------------- /3D/switch guns/resources/guns/gun_2.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="GunResource" load_steps=3 format=3 uid="uid://b2fgo7mh1gaw4"] 2 | 3 | [ext_resource type="PackedScene" uid="uid://b7iqvbdemkcmi" path="res://assets/blaster_packages/blasterF.glb" id="1_4ea7u"] 4 | [ext_resource type="Script" path="res://switch guns/resources/guns/gun_resource.gd" id="2_txlov"] 5 | 6 | [resource] 7 | script = ExtResource("2_txlov") 8 | model = ExtResource("1_4ea7u") 9 | bulletSpawnOffset = Vector3(-0.162194, 0.0908785, 0.47537) 10 | damage = 100 11 | shootCooldown = 0.5 12 | reloadTime = 6.0 13 | magazineSize = 1 14 | bullets = 10 15 | -------------------------------------------------------------------------------- /3D/switch guns/resources/guns/gun_resource.gd: -------------------------------------------------------------------------------- 1 | extends Resource 2 | class_name GunResource 3 | 4 | @export var model: PackedScene 5 | @export var bulletSpawnOffset: Vector3 6 | @export var damage: int 7 | @export var shootCooldown: float 8 | @export var reloadTime: float 9 | @export var magazineSize: int 10 | @export var bullets: int 11 | 12 | func reload_count(): 13 | if bullets < magazineSize: return bullets 14 | else: return magazineSize 15 | -------------------------------------------------------------------------------- /3D/switch guns/target.gd: -------------------------------------------------------------------------------- 1 | extends Area3D 2 | 3 | @export var health := 100 4 | 5 | func _ready() -> void: 6 | add_to_group("enemy") 7 | 8 | func do_damage(damage): 9 | health -= damage 10 | 11 | if health <= 0: queue_free() 12 | -------------------------------------------------------------------------------- /3D/top_down_shooter/bullet.gd: -------------------------------------------------------------------------------- 1 | extends Area3D 2 | 3 | var speed = 15 4 | var direction: Vector3 5 | 6 | func _ready() -> void: 7 | await get_tree().create_timer(2).timeout 8 | 9 | queue_free() 10 | 11 | func _physics_process(delta: float) -> void: 12 | if direction: 13 | global_position += direction * speed * delta 14 | -------------------------------------------------------------------------------- /3D/top_down_shooter/bullet.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=4 format=3 uid="uid://c8p4t0gc2jy4d"] 2 | 3 | [ext_resource type="Script" path="res://top_down_shooter/bullet.gd" id="1_qts5w"] 4 | 5 | [sub_resource type="SphereMesh" id="SphereMesh_acv8e"] 6 | 7 | [sub_resource type="SphereShape3D" id="SphereShape3D_hahsg"] 8 | 9 | [node name="Bullet" type="Area3D"] 10 | transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0) 11 | script = ExtResource("1_qts5w") 12 | 13 | [node name="MeshInstance3D" type="MeshInstance3D" parent="."] 14 | mesh = SubResource("SphereMesh_acv8e") 15 | 16 | [node name="CollisionShape3D" type="CollisionShape3D" parent="."] 17 | shape = SubResource("SphereShape3D_hahsg") 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Godot tutorial collection of my YouTube videos:
2 | https://www.youtube.com/channel/UC4Wg0lSIcQoFW_ZoCQWhpdA 3 | -------------------------------------------------------------------------------- /UI/Map_way_points/assets/IconButton_Small_Red_Circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/UI/Map_way_points/assets/IconButton_Small_Red_Circle.png -------------------------------------------------------------------------------- /UI/Map_way_points/assets/Map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/UI/Map_way_points/assets/Map.png -------------------------------------------------------------------------------- /UI/Map_way_points/assets/Map.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://fnjgpme4bmdw" 6 | path="res://.godot/imported/Map.png-229fd011ba3e4131678ee06e2474285e.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://Map_way_points/assets/Map.png" 14 | dest_files=["res://.godot/imported/Map.png-229fd011ba3e4131678ee06e2474285e.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /UI/Map_way_points/assets/wide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/UI/Map_way_points/assets/wide.png -------------------------------------------------------------------------------- /UI/Map_way_points/assets/wide.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://s78xqmhn8mti" 6 | path="res://.godot/imported/wide.png-bef5b39d2766749a937bf72e5d5e2d61.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://Map_way_points/assets/wide.png" 14 | dest_files=["res://.godot/imported/wide.png-bef5b39d2766749a937bf72e5d5e2d61.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /UI/Map_way_points/info_window.gd: -------------------------------------------------------------------------------- 1 | extends TextureRect 2 | 3 | @export var title: String: 4 | set(newTitle): 5 | title = newTitle 6 | titleLabel.text = newTitle 7 | 8 | @onready var titleLabel: Label = %title 9 | 10 | func _ready() -> void: 11 | hide() 12 | _set_signals() 13 | 14 | func _set_signals() -> void: 15 | for waypoint in get_tree().get_nodes_in_group("map_way_points"): 16 | waypoint.pressed.connect(_set_window) 17 | 18 | func _set_window(newTitle): 19 | title = newTitle 20 | show() 21 | 22 | func _input(event: InputEvent) -> void: 23 | if event is InputEventMouseButton and event.button_index == 1 and event.is_pressed(): 24 | var mousePosition = get_global_mouse_position() 25 | var mouseOnWindow = get_global_rect().has_point(mousePosition) 26 | 27 | if not mouseOnWindow: hide() 28 | -------------------------------------------------------------------------------- /UI/Map_way_points/way_point.gd: -------------------------------------------------------------------------------- 1 | extends Control 2 | 3 | signal pressed(title) 4 | 5 | @export var title: String 6 | 7 | func _ready() -> void: 8 | add_to_group("map_way_points") 9 | tooltip_text = "test" 10 | 11 | func _make_custom_tooltip(_for_text) -> Object: 12 | var theme = Theme.new() 13 | theme.set_stylebox("panel", "TooltipPanel", StyleBoxEmpty.new()) 14 | set_theme(theme) 15 | 16 | #var newLabel = preload("res://customLabel.tscn").instantiate() 17 | var newLabel = Label.new() 18 | newLabel.text = title 19 | newLabel.add_theme_color_override("font_color", Color(0,0,0)) 20 | 21 | return newLabel 22 | 23 | func _on_button_pressed() -> void: 24 | pressed.emit(title) 25 | -------------------------------------------------------------------------------- /UI/Talent_Tree/resource/talent1.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="TalentResource" load_steps=5 format=3 uid="uid://betibw7krqhn2"] 2 | 3 | [ext_resource type="Script" path="res://Talent_Tree/resource/talent_resource.gd" id="1_l3nvk"] 4 | [ext_resource type="Texture2D" uid="uid://fwgpsd80m1rk" path="res://assets/ui/icons/Icon_Focus.png" id="2_0jaii"] 5 | [ext_resource type="Resource" uid="uid://mf7ehea3kfpr" path="res://Talent_Tree/resource/talent2.tres" id="2_se35r"] 6 | [ext_resource type="Resource" uid="uid://bu87vpypxlrf1" path="res://Talent_Tree/resource/talent3.tres" id="3_mss0x"] 7 | 8 | [resource] 9 | script = ExtResource("1_l3nvk") 10 | talentIcon = ExtResource("2_0jaii") 11 | is_unlocked = false 12 | unlockTalents = Array[ExtResource("1_l3nvk")]([ExtResource("2_se35r"), ExtResource("3_mss0x")]) 13 | -------------------------------------------------------------------------------- /UI/Talent_Tree/resource/talent2.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="TalentResource" load_steps=4 format=3 uid="uid://mf7ehea3kfpr"] 2 | 3 | [ext_resource type="Script" path="res://Talent_Tree/resource/talent_resource.gd" id="1_tliyu"] 4 | [ext_resource type="Resource" uid="uid://cncraqpue4h4a" path="res://Talent_Tree/resource/talent4.tres" id="2_1cfl2"] 5 | [ext_resource type="Texture2D" uid="uid://c8mo0isrieqkl" path="res://assets/ui/icons/Icon_Heart_Full.png" id="2_keq2l"] 6 | 7 | [resource] 8 | script = ExtResource("1_tliyu") 9 | talentIcon = ExtResource("2_keq2l") 10 | is_unlocked = false 11 | unlockTalents = Array[ExtResource("1_tliyu")]([ExtResource("2_1cfl2")]) 12 | -------------------------------------------------------------------------------- /UI/Talent_Tree/resource/talent3.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="TalentResource" load_steps=3 format=3 uid="uid://bu87vpypxlrf1"] 2 | 3 | [ext_resource type="Script" path="res://Talent_Tree/resource/talent_resource.gd" id="1_83hsy"] 4 | [ext_resource type="Texture2D" uid="uid://bwvc853plyfdi" path="res://assets/ui/icons/Icon_Small_Diamond.png" id="2_xibxg"] 5 | 6 | [resource] 7 | script = ExtResource("1_83hsy") 8 | talentIcon = ExtResource("2_xibxg") 9 | is_unlocked = false 10 | unlockTalents = Array[ExtResource("1_83hsy")]([]) 11 | -------------------------------------------------------------------------------- /UI/Talent_Tree/resource/talent4.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="TalentResource" load_steps=3 format=3 uid="uid://cncraqpue4h4a"] 2 | 3 | [ext_resource type="Script" path="res://Talent_Tree/resource/talent_resource.gd" id="1_pol6v"] 4 | [ext_resource type="Texture2D" uid="uid://c4pxktf7mbo7h" path="res://assets/ui/icons/Icon_Skull.png" id="2_ayxwa"] 5 | 6 | [resource] 7 | script = ExtResource("1_pol6v") 8 | talentIcon = ExtResource("2_ayxwa") 9 | is_unlocked = false 10 | unlockTalents = Array[ExtResource("1_pol6v")]([]) 11 | -------------------------------------------------------------------------------- /UI/Talent_Tree/resource/talent_resource.gd: -------------------------------------------------------------------------------- 1 | extends Resource 2 | class_name TalentResource 3 | 4 | @export var talentIcon: CompressedTexture2D 5 | @export var is_unlocked := false 6 | @export var unlockTalents : Array[TalentResource] 7 | -------------------------------------------------------------------------------- /UI/Talent_Tree/talent_icon_style.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="StyleBoxFlat" format=3 uid="uid://c5gd3bqltg4oa"] 2 | 3 | [resource] 4 | bg_color = Color(0.729412, 0.729412, 0.729412, 1) 5 | border_width_left = 2 6 | border_width_top = 2 7 | border_width_right = 2 8 | border_width_bottom = 2 9 | border_color = Color(0, 0, 0, 1) 10 | corner_radius_top_left = 10 11 | corner_radius_top_right = 10 12 | corner_radius_bottom_right = 10 13 | corner_radius_bottom_left = 10 14 | -------------------------------------------------------------------------------- /UI/Talent_Tree/talent_tree.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends Control 3 | 4 | func _process(delta): 5 | queue_redraw() 6 | 7 | func _draw(): 8 | for talentNode in get_tree().get_nodes_in_group("talents"): 9 | for resource in talentNode.talentResource.unlockTalents: 10 | var targetNode = _get_node_with_resource(resource) 11 | 12 | if targetNode == null: continue 13 | 14 | var sourcePosition = (talentNode.global_position) + (talentNode.get_center()) 15 | var targetPosition = (targetNode.global_position) + (targetNode.get_center()) 16 | var color = Color.BLACK if talentNode.talentResource.is_unlocked else Color.GRAY 17 | 18 | draw_line(sourcePosition, targetPosition, color, 7.0) 19 | 20 | func _get_node_with_resource(resource): 21 | for talentNode in get_tree().get_nodes_in_group("talents"): 22 | if talentNode.talentResource == resource: 23 | return talentNode 24 | -------------------------------------------------------------------------------- /UI/battle_result_screen/battle_result_screen.gd.uid: -------------------------------------------------------------------------------- 1 | uid://cnksmylf7m10i 2 | -------------------------------------------------------------------------------- /UI/battle_result_screen/character_resource.gd: -------------------------------------------------------------------------------- 1 | extends Resource 2 | class_name CharacterResource 3 | 4 | @export var name: String 5 | @export var level := 1 6 | @export var currentExp := 0 7 | @export var talentPoints := 0 8 | 9 | func get_exp(value): 10 | currentExp += value 11 | 12 | func level_up(): 13 | talentPoints += 1 14 | level += 1 15 | 16 | func get_exp_for_next_level(): 17 | return level * 35 18 | 19 | func get_exp_for_current_level(): 20 | return level * 35 - 35 21 | -------------------------------------------------------------------------------- /UI/battle_result_screen/character_resource.gd.uid: -------------------------------------------------------------------------------- 1 | uid://dt0hugasxu06e 2 | -------------------------------------------------------------------------------- /UI/battle_result_screen/character_result_container.gd.uid: -------------------------------------------------------------------------------- 1 | uid://bioqfp0af2gmr 2 | -------------------------------------------------------------------------------- /UI/battle_result_screen/player1.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="CharacterResource" load_steps=2 format=3 uid="uid://bfr2lq8f24wsv"] 2 | 3 | [ext_resource type="Script" uid="uid://dt0hugasxu06e" path="res://battle_result_screen/character_resource.gd" id="1_v13fd"] 4 | 5 | [resource] 6 | script = ExtResource("1_v13fd") 7 | name = "Player1" 8 | level = 1 9 | currentExp = 0 10 | talentPoints = 0 11 | metadata/_custom_type_script = "uid://dt0hugasxu06e" 12 | -------------------------------------------------------------------------------- /UI/battle_result_screen/player2.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="CharacterResource" load_steps=2 format=3 uid="uid://oduhyj6uub2u"] 2 | 3 | [ext_resource type="Script" uid="uid://dt0hugasxu06e" path="res://battle_result_screen/character_resource.gd" id="1_l5sme"] 4 | 5 | [resource] 6 | script = ExtResource("1_l5sme") 7 | name = "Player2" 8 | level = 1 9 | currentExp = 0 10 | talentPoints = 0 11 | metadata/_custom_type_script = "uid://dt0hugasxu06e" 12 | -------------------------------------------------------------------------------- /UI/calendar/assets/left-arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/UI/calendar/assets/left-arrow.png -------------------------------------------------------------------------------- /UI/calendar/date_label.gd: -------------------------------------------------------------------------------- 1 | extends MarginContainer 2 | 3 | @export var date: Dictionary 4 | 5 | @onready var panel_container: PanelContainer = %PanelContainer 6 | @onready var label: Label = %Label 7 | 8 | func _ready() -> void: 9 | label.text = str(date.day) 10 | 11 | _set_unselected() 12 | 13 | func _set_unselected(): 14 | var currentDate = Time.get_datetime_dict_from_system() 15 | var isCurrentDate = date.day == currentDate.day and date.month == currentDate.month and date.year == currentDate.year 16 | 17 | if not isCurrentDate: panel_container.add_theme_stylebox_override("panel", StyleBoxEmpty.new()) 18 | 19 | func _on_button_pressed() -> void: 20 | # do what ever you want 21 | print(date) 22 | -------------------------------------------------------------------------------- /UI/carusel_menu/assets/archer single.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/UI/carusel_menu/assets/archer single.png -------------------------------------------------------------------------------- /UI/carusel_menu/assets/pawn single.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/UI/carusel_menu/assets/pawn single.png -------------------------------------------------------------------------------- /UI/carusel_menu/assets/warrior.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/UI/carusel_menu/assets/warrior.png -------------------------------------------------------------------------------- /UI/character_selection/assets/archer single.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/UI/character_selection/assets/archer single.png -------------------------------------------------------------------------------- /UI/character_selection/assets/pawn single.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/UI/character_selection/assets/pawn single.png -------------------------------------------------------------------------------- /UI/character_selection/assets/warrior.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/UI/character_selection/assets/warrior.png -------------------------------------------------------------------------------- /UI/character_selection/characterSlot.gd: -------------------------------------------------------------------------------- 1 | extends Panel 2 | 3 | @export var characterPath: String 4 | @export var characterTexture: CompressedTexture2D 5 | 6 | func _ready(): 7 | $TextureRect.texture = characterTexture 8 | 9 | func set_selected(boolean): 10 | var stylebox = get_theme_stylebox("panel").duplicate() 11 | 12 | if boolean: 13 | stylebox.border_color = Color(1,1,1) 14 | else: 15 | stylebox.border_color = Color(0,0,0) 16 | 17 | add_theme_stylebox_override("panel", stylebox) 18 | -------------------------------------------------------------------------------- /UI/character_selection/global_data.gd: -------------------------------------------------------------------------------- 1 | extends Node 2 | 3 | var playerCharPath: String 4 | -------------------------------------------------------------------------------- /UI/create_map_path/circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/UI/create_map_path/circle.png -------------------------------------------------------------------------------- /UI/create_map_path/circle.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://uvc2eqf4u11i" 6 | path="res://.godot/imported/circle.png-fc1672b5e792adaa49f58df55d148bf6.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://way_connection/circle.png" 14 | dest_files=["res://.godot/imported/circle.png-fc1672b5e792adaa49f58df55d148bf6.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /UI/create_map_path/way_connection.gd: -------------------------------------------------------------------------------- 1 | extends Line2D 2 | 3 | @export var hide:= true 4 | 5 | var connectionPoints: Array 6 | 7 | func _ready() -> void: 8 | connectionPoints = points 9 | 10 | if hide: clear_points() 11 | 12 | show_animation() 13 | 14 | func show_animation() -> void: 15 | hide = true 16 | 17 | for point in connectionPoints: 18 | add_point(point) 19 | await get_tree().create_timer(0.2).timeout 20 | -------------------------------------------------------------------------------- /UI/dynamic_inspector/dynamic_inspector.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends Node3D 3 | 4 | @export var option: Option_Types: 5 | set(value): 6 | option = value 7 | notify_property_list_changed() 8 | @export var option1Speed := 1 9 | @export var option2List := ["How", "you", "like", "it ?"] 10 | @export var option3Bool := false 11 | 12 | enum Option_Types {OPTION1, OPTION2, OPTION3} 13 | 14 | func _validate_property(property: Dictionary) -> void: 15 | var hideList = [] 16 | 17 | match option: 18 | Option_Types.OPTION1: 19 | hideList.append("option2List") 20 | hideList.append("option3Bool") 21 | Option_Types.OPTION2: 22 | hideList.append("option1Speed") 23 | hideList.append("option3Bool") 24 | Option_Types.OPTION3: 25 | hideList.append("option1Speed") 26 | hideList.append("option2List") 27 | 28 | if property.name in hideList: 29 | property.usage = PROPERTY_USAGE_NO_EDITOR 30 | -------------------------------------------------------------------------------- /UI/dynamic_inspector/dynamic_inspector.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://ddjtke3xneuu6"] 2 | 3 | [ext_resource type="Script" path="res://dynamic_inspector/dynamic_inspector.gd" id="1_v67ty"] 4 | 5 | [node name="Test" type="Node3D"] 6 | script = ExtResource("1_v67ty") 7 | option = 2 8 | -------------------------------------------------------------------------------- /UI/hotbar_with_cooldown/assets/Inventory_Bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/UI/hotbar_with_cooldown/assets/Inventory_Bar.png -------------------------------------------------------------------------------- /UI/hotbar_with_cooldown/hotbar.gd: -------------------------------------------------------------------------------- 1 | extends Control 2 | 3 | @export var items : Array[Resource] 4 | 5 | @onready var hotbar_item_container: HBoxContainer = %hotbar_item_container 6 | 7 | const HOTBAR_ITEM = preload("res://hotbar_item.tscn") 8 | 9 | func _ready() -> void: 10 | _fill_hotbar() 11 | 12 | func _fill_hotbar(): 13 | for item in items: 14 | var newHotbarIconNode = HOTBAR_ITEM.instantiate() 15 | newHotbarIconNode.icon = item.icon 16 | newHotbarIconNode.cooldownTime = item.cooldown 17 | hotbar_item_container.add_child(newHotbarIconNode) 18 | -------------------------------------------------------------------------------- /UI/hotbar_with_cooldown/item_resource/health_potion.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="ItemResource" load_steps=3 format=3 uid="uid://c4lk0ry7j8a7"] 2 | 3 | [ext_resource type="Script" path="res://hotbar_with_cooldown/item_resource/item_resource.gd" id="1_1mgta"] 4 | [ext_resource type="Texture2D" uid="uid://bsi3j01ue30qh" path="res://assets/ui/icons/potion/Red Potion 3.png" id="1_nv1wp"] 5 | 6 | [resource] 7 | script = ExtResource("1_1mgta") 8 | icon = ExtResource("1_nv1wp") 9 | cooldown = 4.0 10 | -------------------------------------------------------------------------------- /UI/hotbar_with_cooldown/item_resource/item_resource.gd: -------------------------------------------------------------------------------- 1 | extends Resource 2 | class_name ItemResource 3 | 4 | @export var icon: CompressedTexture2D 5 | @export var cooldown: float 6 | -------------------------------------------------------------------------------- /UI/hotbar_with_cooldown/item_resource/mana_potion.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="ItemResource" load_steps=3 format=3 uid="uid://bhauhgki6kakl"] 2 | 3 | [ext_resource type="Texture2D" uid="uid://l8u7ao6vfvoi" path="res://assets/ui/icons/potion/Blue Potion 3.png" id="1_6kweu"] 4 | [ext_resource type="Script" path="res://hotbar_with_cooldown/item_resource/item_resource.gd" id="2_cqwnd"] 5 | 6 | [resource] 7 | script = ExtResource("2_cqwnd") 8 | icon = ExtResource("1_6kweu") 9 | cooldown = 14.0 10 | -------------------------------------------------------------------------------- /UI/hotbar_with_cooldown/item_resource/mix_potion.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="ItemResource" load_steps=3 format=3 uid="uid://cugbehux4is4v"] 2 | 3 | [ext_resource type="Texture2D" uid="uid://mvjdo6ixhmjw" path="res://assets/ui/icons/potion/Green Potion 3.png" id="1_wxq4j"] 4 | [ext_resource type="Script" path="res://hotbar_with_cooldown/item_resource/item_resource.gd" id="2_0rpp2"] 5 | 6 | [resource] 7 | script = ExtResource("2_0rpp2") 8 | icon = ExtResource("1_wxq4j") 9 | cooldown = 25.0 10 | -------------------------------------------------------------------------------- /UI/map_fast_travel/assets/Fox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/UI/map_fast_travel/assets/Fox.png -------------------------------------------------------------------------------- /UI/map_fast_travel/assets/Fox.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://cnerctaqr575k" 6 | path="res://.godot/imported/Fox.png-84fa51a917db8963b682d0aeb55a4afc.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://Map_Fast_Travel/assets/Fox.png" 14 | dest_files=["res://.godot/imported/Fox.png-84fa51a917db8963b682d0aeb55a4afc.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /UI/map_fast_travel/assets/Fox_Map_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/UI/map_fast_travel/assets/Fox_Map_1.png -------------------------------------------------------------------------------- /UI/map_fast_travel/assets/IconButton_Small_Red_Circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/UI/map_fast_travel/assets/IconButton_Small_Red_Circle.png -------------------------------------------------------------------------------- /UI/map_fast_travel/assets/Map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/UI/map_fast_travel/assets/Map.png -------------------------------------------------------------------------------- /UI/map_fast_travel/assets/Map.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://fnjgpme4bmdw" 6 | path="res://.godot/imported/Map.png-7aa8675ab45c24fcd550ff19e57f6270.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://Map_Fast_Travel/assets/Map.png" 14 | dest_files=["res://.godot/imported/Map.png-7aa8675ab45c24fcd550ff19e57f6270.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /UI/map_fast_travel/assets/wide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/UI/map_fast_travel/assets/wide.png -------------------------------------------------------------------------------- /UI/map_fast_travel/assets/wide.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://s78xqmhn8mti" 6 | path="res://.godot/imported/wide.png-711298455af055056cf7a254cca86cb8.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://Map_Fast_Travel/assets/wide.png" 14 | dest_files=["res://.godot/imported/wide.png-711298455af055056cf7a254cca86cb8.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /UI/map_fast_travel/scene.gd: -------------------------------------------------------------------------------- 1 | extends Node2D 2 | 3 | @export var onFastTravel = false 4 | @export var spawnPoint: Node2D 5 | @export var fastTravelSpawnPoint : Node2D 6 | 7 | const FOX_PLAYER_MAP = preload("res://fox_player_Map.tscn") 8 | 9 | func _ready() -> void: 10 | var player = FOX_PLAYER_MAP.instantiate() 11 | add_child(player) 12 | 13 | if onFastTravel: player.global_position = fastTravelSpawnPoint.global_position 14 | else: player.global_position = spawnPoint.global_position 15 | -------------------------------------------------------------------------------- /UI/map_fast_travel/way_point.gd: -------------------------------------------------------------------------------- 1 | extends Control 2 | 3 | signal pressed(title, sceneNumber) 4 | 5 | @export var title: String 6 | @export var sceneNumber: int 7 | 8 | func _ready() -> void: 9 | add_to_group("map_way_points") 10 | tooltip_text = "test" 11 | 12 | func _make_custom_tooltip(_for_text) -> Object: 13 | var theme = Theme.new() 14 | theme.set_stylebox("panel", "TooltipPanel", StyleBoxEmpty.new()) 15 | set_theme(theme) 16 | 17 | #var newLabel = preload("res://customLabel.tscn").instantiate() 18 | var newLabel = Label.new() 19 | newLabel.text = title 20 | newLabel.add_theme_color_override("font_color", Color(0,0,0)) 21 | 22 | return newLabel 23 | 24 | func _on_button_pressed() -> void: 25 | pressed.emit(title, sceneNumber) 26 | -------------------------------------------------------------------------------- /UI/monolog/frog_character.gd: -------------------------------------------------------------------------------- 1 | extends CharacterBody2D 2 | 3 | const SPEED = 200.0 4 | const JUMP_VELOCITY = -300.0 5 | 6 | func _ready() -> void: 7 | add_to_group("player") 8 | 9 | func _physics_process(delta: float) -> void: 10 | # Add the gravity. 11 | if not is_on_floor(): 12 | velocity += get_gravity() * delta 13 | 14 | # Handle jump. 15 | if Input.is_action_just_pressed("ui_accept") and is_on_floor(): 16 | velocity.y = JUMP_VELOCITY 17 | 18 | # Get the input direction and handle the movement/deceleration. 19 | # As good practice, you should replace UI actions with custom gameplay actions. 20 | var direction := Input.get_axis("ui_left", "ui_right") 21 | if direction: 22 | velocity.x = direction * SPEED 23 | else: 24 | velocity.x = move_toward(velocity.x, 0, SPEED) 25 | 26 | move_and_slide() 27 | -------------------------------------------------------------------------------- /UI/monolog/frog_npc.gd: -------------------------------------------------------------------------------- 1 | extends CharacterBody2D 2 | 3 | @onready var dialog: Node = %Dialog 4 | @onready var dialog_indicator: TextureRect = %DialogIndicator 5 | 6 | func _ready() -> void: 7 | dialog_indicator.hide() 8 | 9 | func _on_talk_range_body_entered(body: Node2D) -> void: 10 | if body == get_tree().get_first_node_in_group("player"): 11 | dialog_indicator.show() 12 | dialog.inTalkRange = true 13 | 14 | 15 | func _on_talk_range_body_exited(body: Node2D) -> void: 16 | if body == get_tree().get_first_node_in_group("player"): 17 | dialog_indicator.hide() 18 | dialog.inTalkRange = false 19 | -------------------------------------------------------------------------------- /UI/navigation_bar/navigation_bar.gd: -------------------------------------------------------------------------------- 1 | extends Control 2 | 3 | @export var initalPage := 1 4 | 5 | @onready var pages: MarginContainer = %Pages 6 | @onready var buttons: HBoxContainer = %Buttons 7 | 8 | func _ready(): 9 | _set_page(initalPage) 10 | 11 | for button in buttons.get_children(): 12 | var buttonIndex = button.get_index() 13 | button.pressed.connect(_set_page.bind(buttonIndex)) 14 | 15 | func _set_page(pageNumber): 16 | for i in pages.get_child_count(): 17 | pages.get_children()[i].visible = i == pageNumber 18 | -------------------------------------------------------------------------------- /UI/navigation_bar/skill_tree_main_page.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene format=3 uid="uid://do0a3s15lltjj"] 2 | 3 | [node name="SkillTreeMainPage" type="Control"] 4 | layout_mode = 3 5 | anchors_preset = 15 6 | anchor_right = 1.0 7 | anchor_bottom = 1.0 8 | grow_horizontal = 2 9 | grow_vertical = 2 10 | size_flags_horizontal = 4 11 | size_flags_vertical = 4 12 | 13 | [node name="Label" type="Label" parent="."] 14 | layout_mode = 1 15 | anchors_preset = 8 16 | anchor_left = 0.5 17 | anchor_top = 0.5 18 | anchor_right = 0.5 19 | anchor_bottom = 0.5 20 | offset_left = -109.0 21 | offset_top = -34.5 22 | offset_right = 109.0 23 | offset_bottom = 34.5 24 | grow_horizontal = 2 25 | grow_vertical = 2 26 | theme_override_colors/font_outline_color = Color(0, 0, 0, 1) 27 | theme_override_constants/outline_size = 10 28 | theme_override_font_sizes/font_size = 100 29 | text = "Skill Tree" 30 | -------------------------------------------------------------------------------- /UI/navigation_bar/statistic_main_page.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene format=3 uid="uid://binpilr34p13s"] 2 | 3 | [node name="StatisticMainPage" type="Control"] 4 | layout_mode = 3 5 | anchors_preset = 15 6 | anchor_right = 1.0 7 | anchor_bottom = 1.0 8 | grow_horizontal = 2 9 | grow_vertical = 2 10 | size_flags_horizontal = 4 11 | size_flags_vertical = 4 12 | 13 | [node name="Label" type="Label" parent="."] 14 | layout_mode = 1 15 | anchors_preset = 8 16 | anchor_left = 0.5 17 | anchor_top = 0.5 18 | anchor_right = 0.5 19 | anchor_bottom = 0.5 20 | offset_left = -106.0 21 | offset_top = -34.5 22 | offset_right = 106.0 23 | offset_bottom = 34.5 24 | grow_horizontal = 2 25 | grow_vertical = 2 26 | theme_override_colors/font_outline_color = Color(0, 0, 0, 1) 27 | theme_override_constants/outline_size = 10 28 | theme_override_font_sizes/font_size = 100 29 | text = "Statistic" 30 | -------------------------------------------------------------------------------- /UI/navigation_bar/workout_main_page.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene format=3 uid="uid://dpdr3ylarm35f"] 2 | 3 | [node name="WorkoutMainPage" type="Control"] 4 | layout_mode = 3 5 | anchors_preset = 15 6 | anchor_right = 1.0 7 | anchor_bottom = 1.0 8 | grow_horizontal = 2 9 | grow_vertical = 2 10 | size_flags_horizontal = 4 11 | size_flags_vertical = 4 12 | 13 | [node name="Label" type="Label" parent="."] 14 | layout_mode = 1 15 | anchors_preset = 8 16 | anchor_left = 0.5 17 | anchor_top = 0.5 18 | anchor_right = 0.5 19 | anchor_bottom = 0.5 20 | offset_left = -106.0 21 | offset_top = -34.5 22 | offset_right = 106.0 23 | offset_bottom = 34.5 24 | grow_horizontal = 2 25 | grow_vertical = 2 26 | theme_override_colors/font_outline_color = Color(0, 0, 0, 1) 27 | theme_override_constants/outline_size = 10 28 | theme_override_font_sizes/font_size = 100 29 | text = "Workout" 30 | -------------------------------------------------------------------------------- /UI/save_and_load_resources/DevDrache.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="CharacterResource" load_steps=2 format=3 uid="uid://docmv5hfpce1f"] 2 | 3 | [ext_resource type="Script" path="res://save_and_load_resources/character_resource.gd" id="1_2hw3u"] 4 | 5 | [resource] 6 | script = ExtResource("1_2hw3u") 7 | character_name = "DevDrache" 8 | level = 1 9 | current_exp = 0 10 | strength = 10 11 | -------------------------------------------------------------------------------- /UI/save_and_load_resources/SaveAndLoad.gd: -------------------------------------------------------------------------------- 1 | extends Node 2 | class_name SaveAndLoad 3 | 4 | const BASE_PATH = "res://" 5 | const SAVE_PATH = BASE_PATH + "save_files/" 6 | 7 | func save_resource(path, resource, name): 8 | _create_dir() 9 | 10 | var fileName = resource.resource_path.get_file() 11 | 12 | ResourceSaver.save(resource, path + name + ".tres") 13 | 14 | func _create_dir(): 15 | var dir = DirAccess.open(BASE_PATH) 16 | dir.make_dir("save_files") 17 | 18 | func load_resources(save_path, search_file_name): 19 | for fileName in DirAccess.get_files_at(save_path): 20 | if fileName == search_file_name+".tres": 21 | var resource = ResourceLoader.load(save_path + fileName) 22 | return resource 23 | -------------------------------------------------------------------------------- /UI/save_and_load_resources/character_resource.gd: -------------------------------------------------------------------------------- 1 | extends Resource 2 | class_name CharacterResource 3 | 4 | @export var character_name: String 5 | @export var level: int = 1 6 | @export var current_exp: int = 0 7 | @export var strength: int = 10 8 | 9 | func load_stats(): 10 | var saveAndLoad = SaveAndLoad.new() 11 | 12 | var saveFile = saveAndLoad.load_resources(saveAndLoad.SAVE_PATH, get_resource_name()) 13 | 14 | if not saveFile: return 15 | 16 | level = saveFile.level 17 | current_exp = saveFile.current_exp 18 | strength = saveFile.strength 19 | 20 | func get_resource_name() -> String: 21 | return resource_path.get_file() 22 | -------------------------------------------------------------------------------- /UI/series_turn_based_combat/command_menu/Attack.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://ddssghhbn1p42"] 2 | 3 | [ext_resource type="Script" path="res://turt_based_combat_series/targeting_and_attack/skillResource.gd" id="1_u2b1t"] 4 | 5 | [resource] 6 | script = ExtResource("1_u2b1t") 7 | name = "Attack" 8 | targetType = 0 9 | -------------------------------------------------------------------------------- /UI/series_turn_based_combat/command_menu/command_button.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://d1nk26pkpy84a"] 2 | 3 | [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_xpeql"] 4 | bg_color = Color(0.4125, 0.297, 0.99, 0.588235) 5 | 6 | [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_l8qir"] 7 | bg_color = Color(0.4125, 0.297, 0.99, 0.196078) 8 | 9 | [node name="AttackButton" type="Button"] 10 | custom_minimum_size = Vector2(200, 0) 11 | theme_override_font_sizes/font_size = 25 12 | theme_override_styles/focus = SubResource("StyleBoxFlat_xpeql") 13 | theme_override_styles/normal = SubResource("StyleBoxFlat_l8qir") 14 | text = "Attack" 15 | -------------------------------------------------------------------------------- /UI/series_turn_based_combat/command_menu/heal.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://ckiri2twnlk8f"] 2 | 3 | [ext_resource type="Script" path="res://turt_based_combat_series/targeting_and_attack/skillResource.gd" id="1_cpjyn"] 4 | 5 | [resource] 6 | script = ExtResource("1_cpjyn") 7 | name = "Heal" 8 | targetType = 1 9 | -------------------------------------------------------------------------------- /UI/series_turn_based_combat/command_menu/skillResource.gd: -------------------------------------------------------------------------------- 1 | extends Resource 2 | class_name SkillResource 3 | 4 | @export var name: String 5 | -------------------------------------------------------------------------------- /UI/series_turn_based_combat/command_menu/slash.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://3i0ealkwjmqb"] 2 | 3 | [ext_resource type="Script" path="res://turt_based_combat_series/targeting_and_attack/skillResource.gd" id="1_0l2vu"] 4 | 5 | [resource] 6 | script = ExtResource("1_0l2vu") 7 | name = "Slash" 8 | targetType = 0 9 | -------------------------------------------------------------------------------- /UI/series_turn_based_combat/command_menu/test_scene.gd: -------------------------------------------------------------------------------- 1 | extends Node2D 2 | 3 | func _on_command_menu_command_selected(command: Resource) -> void: 4 | $CanvasLayer/CommandLabel.text = "use " + command.name 5 | -------------------------------------------------------------------------------- /UI/series_turn_based_combat/status_bar/focus_player_stats.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="StyleBoxFlat" format=3 uid="uid://b7uvcrl8w8hm4"] 2 | 3 | [resource] 4 | bg_color = Color(0.460206, 0.228876, 0.973769, 0.666667) 5 | -------------------------------------------------------------------------------- /UI/series_turn_based_combat/status_bar/resource/character_resource.gd: -------------------------------------------------------------------------------- 1 | extends Resource 2 | class_name CharacterResource 3 | 4 | @export var name := "Name" 5 | 6 | @export var maxHealth := 100 7 | @export var currentHealth := 100 8 | @export var maxMana := 50 9 | @export var currentMana := 50 10 | @export var speed := 50 11 | @export var overDriveValue := 0 12 | 13 | func take_damage(damage): 14 | currentHealth -= damage 15 | 16 | if currentHealth < 0: currentHealth = 0 17 | -------------------------------------------------------------------------------- /UI/series_turn_based_combat/status_bar/resource/enemy1.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://bn6t6oq4gr8vp"] 2 | 3 | [ext_resource type="Script" path="res://turn_based_combat_series/status_bar/resource/character_resource.gd" id="1_wmkf3"] 4 | 5 | [resource] 6 | script = ExtResource("1_wmkf3") 7 | name = "Name" 8 | maxHealth = 100 9 | currentHealth = 100 10 | maxMana = 50 11 | currentMana = 50 12 | speed = 50 13 | overDriveValue = 0 14 | -------------------------------------------------------------------------------- /UI/series_turn_based_combat/status_bar/resource/enemy2.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://obxvdcooy1xa"] 2 | 3 | [ext_resource type="Script" path="res://turn_based_combat_series/status_bar/resource/character_resource.gd" id="1_i5x71"] 4 | 5 | [resource] 6 | script = ExtResource("1_i5x71") 7 | name = "Name" 8 | maxHealth = 100 9 | currentHealth = 100 10 | maxMana = 50 11 | currentMana = 50 12 | speed = 50 13 | overDriveValue = 0 14 | -------------------------------------------------------------------------------- /UI/series_turn_based_combat/status_bar/resource/enemy3.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://s05qdcgtarmm"] 2 | 3 | [ext_resource type="Script" path="res://turn_based_combat_series/status_bar/resource/character_resource.gd" id="1_hdn0e"] 4 | 5 | [resource] 6 | script = ExtResource("1_hdn0e") 7 | name = "Name" 8 | maxHealth = 100 9 | currentHealth = 100 10 | maxMana = 50 11 | currentMana = 50 12 | speed = 50 13 | overDriveValue = 0 14 | -------------------------------------------------------------------------------- /UI/series_turn_based_combat/status_bar/resource/player1.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="CharacterResource" load_steps=2 format=3 uid="uid://du8iibnunpatu"] 2 | 3 | [ext_resource type="Script" path="res://turn_based_combat_series/status_bar/resource/character_resource.gd" id="1_2hhew"] 4 | 5 | [resource] 6 | script = ExtResource("1_2hhew") 7 | name = "Name" 8 | maxHealth = 100 9 | currentHealth = 100 10 | maxMana = 50 11 | currentMana = 50 12 | speed = 50 13 | overDriveValue = 0 14 | -------------------------------------------------------------------------------- /UI/series_turn_based_combat/status_bar/resource/player2.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="CharacterResource" load_steps=2 format=3 uid="uid://dlmcrg8a4etwl"] 2 | 3 | [ext_resource type="Script" path="res://turn_based_combat_series/status_bar/resource/character_resource.gd" id="1_g8yma"] 4 | 5 | [resource] 6 | script = ExtResource("1_g8yma") 7 | name = "Name" 8 | maxHealth = 100 9 | currentHealth = 100 10 | maxMana = 50 11 | currentMana = 50 12 | speed = 50 13 | overDriveValue = 0 14 | -------------------------------------------------------------------------------- /UI/series_turn_based_combat/targeting_enemies/Attack.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="SkillResource" load_steps=2 format=3 uid="uid://c57bpy17mn2gi"] 2 | 3 | [ext_resource type="Script" path="res://turn_based_combat_series/targeting_and_attack/skillResource.gd" id="1_3hsvd"] 4 | 5 | [resource] 6 | script = ExtResource("1_3hsvd") 7 | name = "Attack" 8 | targetTpe = 0 9 | -------------------------------------------------------------------------------- /UI/series_turn_based_combat/targeting_enemies/character.gd: -------------------------------------------------------------------------------- 1 | extends StaticBody2D 2 | 3 | @onready var turn_based_agent: TurnBasedAgent = $TurnBasedAgent 4 | 5 | func _ready() -> void: 6 | turn_based_agent.target_selected.connect(_on_target_selected) 7 | 8 | func _on_target_selected(target: TurnBasedAgent, command: Resource): 9 | # here you put every interaction between the character and his targets 10 | # like: 11 | # animation 12 | # damage/heal/buffs 13 | # interaction with Hp Bars 14 | # and more 15 | 16 | _animation_example(target) 17 | 18 | func _animation_example(target): 19 | var startPosition = global_position 20 | var targetPosition = target.get_global_position() 21 | 22 | var tween = get_tree().create_tween() 23 | tween.tween_property(self, "global_position", targetPosition, 0.5) 24 | tween.tween_property(self, "global_position", startPosition, 0.5) 25 | 26 | await tween.finished 27 | 28 | turn_based_agent.command_done() 29 | -------------------------------------------------------------------------------- /UI/series_turn_based_combat/targeting_enemies/heal.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="SkillResource" load_steps=2 format=3 uid="uid://y0eokcelipqm"] 2 | 3 | [ext_resource type="Script" path="res://turn_based_combat_series/targeting_and_attack/skillResource.gd" id="1_dse0t"] 4 | 5 | [resource] 6 | script = ExtResource("1_dse0t") 7 | name = "Heal" 8 | targetTpe = 1 9 | -------------------------------------------------------------------------------- /UI/series_turn_based_combat/targeting_enemies/skillResource.gd: -------------------------------------------------------------------------------- 1 | extends Resource 2 | class_name SkillResource 3 | 4 | @export var name: String 5 | @export var targetType: Target_Type 6 | 7 | enum Target_Type{ENEMIES, PLAYERS} 8 | -------------------------------------------------------------------------------- /UI/series_turn_based_combat/targeting_enemies/slash.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="SkillResource" load_steps=2 format=3 uid="uid://b68hd1we65p73"] 2 | 3 | [ext_resource type="Script" path="res://turn_based_combat_series/targeting_and_attack/skillResource.gd" id="1_acklm"] 4 | 5 | [resource] 6 | script = ExtResource("1_acklm") 7 | name = "Slash" 8 | -------------------------------------------------------------------------------- /UI/series_turn_based_combat/turn_and_rounds/Attack.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="SkillResource" load_steps=2 format=3 uid="uid://w0rvxis3o1vk"] 2 | 3 | [ext_resource type="Script" path="res://skillResource.gd" id="1_gt40a"] 4 | 5 | [resource] 6 | script = ExtResource("1_gt40a") 7 | name = "Attack" 8 | targetType = 0 9 | -------------------------------------------------------------------------------- /UI/series_turn_based_combat/turn_and_rounds/command_button.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://cvnn15di553nl"] 2 | 3 | [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_xpeql"] 4 | bg_color = Color(0.4125, 0.297, 0.99, 0.588235) 5 | 6 | [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_l8qir"] 7 | bg_color = Color(0.4125, 0.297, 0.99, 0.196078) 8 | 9 | [node name="AttackButton" type="Button"] 10 | custom_minimum_size = Vector2(200, 0) 11 | theme_override_font_sizes/font_size = 25 12 | theme_override_styles/focus = SubResource("StyleBoxFlat_xpeql") 13 | theme_override_styles/normal = SubResource("StyleBoxFlat_l8qir") 14 | text = "Attack" 15 | -------------------------------------------------------------------------------- /UI/series_turn_based_combat/turn_and_rounds/heal.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="SkillResource" load_steps=2 format=3 uid="uid://cq8638rwf8wtf"] 2 | 3 | [ext_resource type="Script" path="res://skillResource.gd" id="1_ywkhk"] 4 | 5 | [resource] 6 | script = ExtResource("1_ywkhk") 7 | name = "Heal" 8 | targetType = 1 9 | -------------------------------------------------------------------------------- /UI/series_turn_based_combat/turn_and_rounds/skillResource.gd: -------------------------------------------------------------------------------- 1 | extends Resource 2 | class_name SkillResource 3 | 4 | @export var name: String 5 | @export var targetType: Target_Type 6 | 7 | enum Target_Type{ENEMIES, PLAYERS} 8 | -------------------------------------------------------------------------------- /UI/series_turn_based_combat/turn_and_rounds/slash.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="SkillResource" load_steps=2 format=3 uid="uid://b15nbqr4qq0rb"] 2 | 3 | [ext_resource type="Script" path="res://skillResource.gd" id="1_yhvr1"] 4 | 5 | [resource] 6 | script = ExtResource("1_yhvr1") 7 | name = "Slash" 8 | targetType = 0 9 | -------------------------------------------------------------------------------- /UI/series_turn_based_combat/turn_and_rounds/turn_based_controller.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://ckulsr13drfi2"] 2 | 3 | [ext_resource type="Script" path="res://turn_based_controller.gd" id="1_5a0b6"] 4 | 5 | [node name="TurnBasedController" type="Node"] 6 | script = ExtResource("1_5a0b6") 7 | -------------------------------------------------------------------------------- /UI/series_turn_based_combat/turn_order_bar/turn_based_controller.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://c8ig0t8gqi4l5"] 2 | 3 | [ext_resource type="Script" path="res://turn_based_combat_series/turn_and_rounds/turn_based_controller.gd" id="1_l512l"] 4 | 5 | [node name="TurnBasedController" type="Node"] 6 | script = ExtResource("1_l512l") 7 | -------------------------------------------------------------------------------- /UI/talent_tree_part2_connect_talent_stats/resource/character_resource.gd: -------------------------------------------------------------------------------- 1 | extends Resource 2 | class_name CharacterResource 3 | 4 | @export var level:= 1 5 | @export var health := 100 6 | @export var attack := 30 7 | 8 | @export var talents: Array[TalentResource] 9 | 10 | func get_character_stats(): 11 | for talent:TalentResource in talents: 12 | match talent.stat: 13 | talent.Stats.HEALTH: health += talent.statValue 14 | talent.Stats.ATTACK: attack += talent.statValue 15 | 16 | return { 17 | "level": level, 18 | "health": health, 19 | "attack": attack 20 | } 21 | -------------------------------------------------------------------------------- /UI/talent_tree_part2_connect_talent_stats/resource/player.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="CharacterResource" load_steps=5 format=3 uid="uid://d2e2uvank832h"] 2 | 3 | [ext_resource type="Script" path="res://Connect_talent_tree/resource/talent_resource.gd" id="1_1y7ea"] 4 | [ext_resource type="Script" path="res://Connect_talent_tree/resource/character_resource.gd" id="1_47rdb"] 5 | [ext_resource type="Resource" uid="uid://hycixnpcec74" path="res://Connect_talent_tree/resource/talent1.tres" id="2_v5xlh"] 6 | [ext_resource type="Resource" uid="uid://d0gdb6yayfbmu" path="res://Connect_talent_tree/resource/talent2.tres" id="3_07cal"] 7 | 8 | [resource] 9 | script = ExtResource("1_47rdb") 10 | level = 1 11 | health = 100 12 | attack = 30 13 | talents = Array[ExtResource("1_1y7ea")]([ExtResource("2_v5xlh"), ExtResource("3_07cal")]) 14 | -------------------------------------------------------------------------------- /UI/talent_tree_part2_connect_talent_stats/resource/talent1.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="TalentResource" load_steps=3 format=3 uid="uid://hycixnpcec74"] 2 | 3 | [ext_resource type="Texture2D" uid="uid://fwgpsd80m1rk" path="res://assets/ui/icons/Icon_Focus.png" id="2_cgson"] 4 | [ext_resource type="Script" path="res://Connect_talent_tree/resource/talent_resource.gd" id="3_05mw2"] 5 | 6 | [resource] 7 | script = ExtResource("3_05mw2") 8 | talentIcon = ExtResource("2_cgson") 9 | is_unlocked = true 10 | unlockTalents = Array[ExtResource("3_05mw2")]([]) 11 | stat = 1 12 | statValue = 10 13 | -------------------------------------------------------------------------------- /UI/talent_tree_part2_connect_talent_stats/resource/talent2.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="TalentResource" load_steps=4 format=3 uid="uid://d0gdb6yayfbmu"] 2 | 3 | [ext_resource type="Script" path="res://Connect_talent_tree/resource/talent_resource.gd" id="1_xsatv"] 4 | [ext_resource type="Texture2D" uid="uid://c8mo0isrieqkl" path="res://assets/ui/icons/Icon_Heart_Full.png" id="2_7fm58"] 5 | [ext_resource type="Resource" uid="uid://hycixnpcec74" path="res://Connect_talent_tree/resource/talent1.tres" id="3_lv3gs"] 6 | 7 | [resource] 8 | script = ExtResource("1_xsatv") 9 | talentIcon = ExtResource("2_7fm58") 10 | is_unlocked = false 11 | unlockTalents = Array[ExtResource("1_xsatv")]([ExtResource("3_lv3gs")]) 12 | stat = 0 13 | statValue = 50 14 | -------------------------------------------------------------------------------- /UI/talent_tree_part2_connect_talent_stats/resource/talent3.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="TalentResource" load_steps=4 format=3 uid="uid://bvuwsq6qkypwr"] 2 | 3 | [ext_resource type="Script" path="res://Connect_talent_tree/resource/talent_resource.gd" id="1_ysrw0"] 4 | [ext_resource type="Texture2D" uid="uid://bwvc853plyfdi" path="res://assets/ui/icons/Icon_Small_Diamond.png" id="2_6dak6"] 5 | [ext_resource type="Resource" uid="uid://hycixnpcec74" path="res://Connect_talent_tree/resource/talent1.tres" id="3_t2701"] 6 | 7 | [resource] 8 | script = ExtResource("1_ysrw0") 9 | talentIcon = ExtResource("2_6dak6") 10 | is_unlocked = false 11 | unlockTalents = Array[ExtResource("1_ysrw0")]([ExtResource("3_t2701")]) 12 | -------------------------------------------------------------------------------- /UI/talent_tree_part2_connect_talent_stats/resource/talent4.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="TalentResource" load_steps=4 format=3 uid="uid://cpqok4owf0jpj"] 2 | 3 | [ext_resource type="Script" path="res://Connect_talent_tree/resource/talent_resource.gd" id="1_x58au"] 4 | [ext_resource type="Texture2D" uid="uid://c4pxktf7mbo7h" path="res://assets/ui/icons/Icon_Skull.png" id="2_fu1yr"] 5 | [ext_resource type="Resource" uid="uid://d0gdb6yayfbmu" path="res://Connect_talent_tree/resource/talent2.tres" id="3_jmgf3"] 6 | 7 | [resource] 8 | script = ExtResource("1_x58au") 9 | talentIcon = ExtResource("2_fu1yr") 10 | is_unlocked = false 11 | unlockTalents = Array[ExtResource("1_x58au")]([ExtResource("3_jmgf3")]) 12 | -------------------------------------------------------------------------------- /UI/talent_tree_part2_connect_talent_stats/resource/talent5.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="TalentResource" load_steps=4 format=3 uid="uid://qw6e0mfldceu"] 2 | 3 | [ext_resource type="Script" path="res://Connect_talent_tree/resource/talent_resource.gd" id="1_jkpxn"] 4 | [ext_resource type="Texture2D" uid="uid://rr5610bouoc1" path="res://assets/ui/icons/Icon_Small_Coin.png" id="2_cay0u"] 5 | [ext_resource type="Resource" uid="uid://bvuwsq6qkypwr" path="res://Connect_talent_tree/resource/talent3.tres" id="3_kqgis"] 6 | 7 | [resource] 8 | script = ExtResource("1_jkpxn") 9 | talentIcon = ExtResource("2_cay0u") 10 | is_unlocked = false 11 | unlockTalents = Array[ExtResource("1_jkpxn")]([ExtResource("3_kqgis")]) 12 | -------------------------------------------------------------------------------- /UI/talent_tree_part2_connect_talent_stats/resource/talent6.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="TalentResource" load_steps=3 format=3 uid="uid://beigoyvgvy4n1"] 2 | 3 | [ext_resource type="Script" path="res://Connect_talent_tree/resource/talent_resource.gd" id="1_pgipw"] 4 | [ext_resource type="Texture2D" uid="uid://rr5610bouoc1" path="res://assets/ui/icons/Icon_Small_Coin.png" id="2_hhij5"] 5 | 6 | [resource] 7 | script = ExtResource("1_pgipw") 8 | talentIcon = ExtResource("2_hhij5") 9 | is_unlocked = false 10 | unlockTalents = Array[ExtResource("1_pgipw")]([]) 11 | -------------------------------------------------------------------------------- /UI/talent_tree_part2_connect_talent_stats/resource/talent7.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="TalentResource" load_steps=4 format=3 uid="uid://dyvqlmlp0fwp0"] 2 | 3 | [ext_resource type="Script" path="res://Connect_talent_tree/resource/talent_resource.gd" id="1_5tom1"] 4 | [ext_resource type="Texture2D" uid="uid://dl1vkf5g5v1wg" path="res://assets/ui/icons/sword.png" id="2_xjime"] 5 | [ext_resource type="Resource" uid="uid://d0gdb6yayfbmu" path="res://Connect_talent_tree/resource/talent2.tres" id="3_37al5"] 6 | 7 | [resource] 8 | script = ExtResource("1_5tom1") 9 | talentIcon = ExtResource("2_xjime") 10 | is_unlocked = false 11 | unlockTalents = Array[ExtResource("1_5tom1")]([ExtResource("3_37al5")]) 12 | -------------------------------------------------------------------------------- /UI/talent_tree_part2_connect_talent_stats/resource/talent_resource.gd: -------------------------------------------------------------------------------- 1 | extends Resource 2 | class_name TalentResource 3 | 4 | @export var talentIcon: CompressedTexture2D 5 | @export var is_unlocked := false 6 | @export var unlockTalents : Array[TalentResource] 7 | 8 | @export var stat: Stats 9 | @export var statValue: int 10 | 11 | enum Stats{HEALTH, ATTACK} 12 | -------------------------------------------------------------------------------- /UI/talent_tree_part2_connect_talent_stats/talent_icon_style.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="StyleBoxFlat" format=3 uid="uid://clrkf01wyy1aj"] 2 | 3 | [resource] 4 | bg_color = Color(0.729412, 0.729412, 0.729412, 1) 5 | border_width_left = 2 6 | border_width_top = 2 7 | border_width_right = 2 8 | border_width_bottom = 2 9 | border_color = Color(0, 0, 0, 1) 10 | corner_radius_top_left = 10 11 | corner_radius_top_right = 10 12 | corner_radius_bottom_right = 10 13 | corner_radius_bottom_left = 10 14 | -------------------------------------------------------------------------------- /UI/turn_based_system_full_video/character.gd.uid: -------------------------------------------------------------------------------- 1 | uid://doadu20mnqkxk 2 | -------------------------------------------------------------------------------- /UI/turn_based_system_full_video/command_menu/command_button.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://hpbpp15rf0ab"] 2 | 3 | [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_xpeql"] 4 | bg_color = Color(0.4125, 0.297, 0.99, 0.588235) 5 | 6 | [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_l8qir"] 7 | bg_color = Color(0.4125, 0.297, 0.99, 0.196078) 8 | 9 | [node name="AttackButton" type="Button"] 10 | custom_minimum_size = Vector2(200, 0) 11 | theme_override_font_sizes/font_size = 25 12 | theme_override_styles/focus = SubResource("StyleBoxFlat_xpeql") 13 | theme_override_styles/normal = SubResource("StyleBoxFlat_l8qir") 14 | text = "Attack" 15 | -------------------------------------------------------------------------------- /UI/turn_based_system_full_video/command_menu/command_menu.gd.uid: -------------------------------------------------------------------------------- 1 | uid://cj35x0sfv04js 2 | -------------------------------------------------------------------------------- /UI/turn_based_system_full_video/player_status_display/focus_player_stats.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="StyleBoxFlat" format=3 uid="uid://bbb0bpcgq7krv"] 2 | 3 | [resource] 4 | bg_color = Color(0.460206, 0.228876, 0.973769, 0.666667) 5 | -------------------------------------------------------------------------------- /UI/turn_based_system_full_video/player_status_display/player_stats_container.gd.uid: -------------------------------------------------------------------------------- 1 | uid://bwu3xpsoicqq3 2 | -------------------------------------------------------------------------------- /UI/turn_based_system_full_video/player_status_display/player_status_display.gd.uid: -------------------------------------------------------------------------------- 1 | uid://c3wfuw4rjvr8u 2 | -------------------------------------------------------------------------------- /UI/turn_based_system_full_video/resource/character/character_resource.gd: -------------------------------------------------------------------------------- 1 | extends Resource 2 | class_name CharacterResource 3 | 4 | @export var name := "Name" 5 | 6 | @export var maxHealth := 100 7 | @export var currentHealth := 100 8 | @export var maxMana := 50 9 | @export var currentMana := 50 10 | @export var speed := 50 11 | @export var overDriveValue := 0 12 | 13 | func take_damage(damage): 14 | currentHealth -= damage 15 | 16 | if currentHealth < 0: currentHealth = 0 17 | -------------------------------------------------------------------------------- /UI/turn_based_system_full_video/resource/character/character_resource.gd.uid: -------------------------------------------------------------------------------- 1 | uid://cn877cah5ppnk 2 | -------------------------------------------------------------------------------- /UI/turn_based_system_full_video/resource/character/enemy1.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="CharacterResource" load_steps=2 format=3 uid="uid://pbcqmsvpur7x"] 2 | 3 | [ext_resource type="Script" uid="uid://ch266lr5j64yq" path="res://tutorial_collection/turn_based_combat_series/status_bar/resource/character_resource.gd" id="1_4jwjj"] 4 | 5 | [resource] 6 | script = ExtResource("1_4jwjj") 7 | name = "Name" 8 | maxHealth = 100 9 | currentHealth = 100 10 | maxMana = 50 11 | currentMana = 50 12 | speed = 50 13 | overDriveValue = 0 14 | -------------------------------------------------------------------------------- /UI/turn_based_system_full_video/resource/character/enemy2.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="CharacterResource" load_steps=2 format=3 uid="uid://tyhx7kib8yay"] 2 | 3 | [ext_resource type="Script" uid="uid://ch266lr5j64yq" path="res://tutorial_collection/turn_based_combat_series/status_bar/resource/character_resource.gd" id="1_dmi01"] 4 | 5 | [resource] 6 | script = ExtResource("1_dmi01") 7 | name = "Name" 8 | maxHealth = 100 9 | currentHealth = 100 10 | maxMana = 50 11 | currentMana = 50 12 | speed = 50 13 | overDriveValue = 0 14 | -------------------------------------------------------------------------------- /UI/turn_based_system_full_video/resource/character/enemy3.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="CharacterResource" load_steps=2 format=3 uid="uid://dr8cb3yy2bfbm"] 2 | 3 | [ext_resource type="Script" uid="uid://ch266lr5j64yq" path="res://tutorial_collection/turn_based_combat_series/status_bar/resource/character_resource.gd" id="1_nigam"] 4 | 5 | [resource] 6 | script = ExtResource("1_nigam") 7 | name = "Name" 8 | maxHealth = 100 9 | currentHealth = 100 10 | maxMana = 50 11 | currentMana = 50 12 | speed = 50 13 | overDriveValue = 0 14 | -------------------------------------------------------------------------------- /UI/turn_based_system_full_video/resource/character/player1.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="CharacterResource" load_steps=2 format=3 uid="uid://bib4xpoh67ls6"] 2 | 3 | [ext_resource type="Script" uid="uid://ch266lr5j64yq" path="res://tutorial_collection/turn_based_combat_series/status_bar/resource/character_resource.gd" id="1_bv504"] 4 | 5 | [resource] 6 | script = ExtResource("1_bv504") 7 | name = "Name" 8 | maxHealth = 70 9 | currentHealth = 30 10 | maxMana = 50 11 | currentMana = 20 12 | speed = 50 13 | overDriveValue = 50 14 | -------------------------------------------------------------------------------- /UI/turn_based_system_full_video/resource/character/player2.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="CharacterResource" load_steps=2 format=3 uid="uid://c8jvumddtuxcx"] 2 | 3 | [ext_resource type="Script" uid="uid://ch266lr5j64yq" path="res://tutorial_collection/turn_based_combat_series/status_bar/resource/character_resource.gd" id="1_oqi1a"] 4 | 5 | [resource] 6 | script = ExtResource("1_oqi1a") 7 | name = "Name" 8 | maxHealth = 120 9 | currentHealth = 80 10 | maxMana = 40 11 | currentMana = 40 12 | speed = 50 13 | overDriveValue = 20 14 | -------------------------------------------------------------------------------- /UI/turn_based_system_full_video/resource/skills/Attack.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="SkillResource" load_steps=2 format=3 uid="uid://cmjvkomirwig2"] 2 | 3 | [ext_resource type="Script" uid="uid://ckkyv0irnwbwb" path="res://tutorial_collection/turn_based_combat_series/turn_and_rounds/skillResource.gd" id="1_wlaq6"] 4 | 5 | [resource] 6 | script = ExtResource("1_wlaq6") 7 | name = "Attack" 8 | targetType = 0 9 | -------------------------------------------------------------------------------- /UI/turn_based_system_full_video/resource/skills/heal.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="SkillResource" load_steps=2 format=3 uid="uid://qd5tvux5rrsa"] 2 | 3 | [ext_resource type="Script" uid="uid://ckkyv0irnwbwb" path="res://tutorial_collection/turn_based_combat_series/turn_and_rounds/skillResource.gd" id="1_makrg"] 4 | 5 | [resource] 6 | script = ExtResource("1_makrg") 7 | name = "Heal" 8 | targetType = 1 9 | -------------------------------------------------------------------------------- /UI/turn_based_system_full_video/resource/skills/skillResource.gd: -------------------------------------------------------------------------------- 1 | extends Resource 2 | class_name SkillResource 3 | 4 | @export var name: String 5 | @export var targetType: Target_Type 6 | 7 | enum Target_Type{ENEMIES, PLAYERS} 8 | -------------------------------------------------------------------------------- /UI/turn_based_system_full_video/resource/skills/skillResource.gd.uid: -------------------------------------------------------------------------------- 1 | uid://diod4vvpjkylv 2 | -------------------------------------------------------------------------------- /UI/turn_based_system_full_video/resource/skills/slash.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="SkillResource" load_steps=2 format=3 uid="uid://dic28mqs5h8qh"] 2 | 3 | [ext_resource type="Script" uid="uid://ckkyv0irnwbwb" path="res://tutorial_collection/turn_based_combat_series/turn_and_rounds/skillResource.gd" id="1_yr7wd"] 4 | 5 | [resource] 6 | script = ExtResource("1_yr7wd") 7 | name = "Slash" 8 | targetType = 0 9 | -------------------------------------------------------------------------------- /UI/turn_based_system_full_video/turn_based_agent.gd.uid: -------------------------------------------------------------------------------- 1 | uid://b1vsjo3lhk8ku 2 | -------------------------------------------------------------------------------- /UI/turn_based_system_full_video/turn_based_controller.gd.uid: -------------------------------------------------------------------------------- 1 | uid://p8jn22hiki4p 2 | -------------------------------------------------------------------------------- /UI/turn_based_system_full_video/turn_based_controller.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://d2xe786ia1v62"] 2 | 3 | [ext_resource type="Script" uid="uid://bkooatldqtncl" path="res://tutorial_collection/turn_based_combat_series/turn_and_rounds/turn_based_controller.gd" id="1_ui68u"] 4 | 5 | [node name="TurnBasedController" type="Node"] 6 | script = ExtResource("1_ui68u") 7 | -------------------------------------------------------------------------------- /UI/turn_based_system_full_video/turn_order_bar/turn_order_bar.gd.uid: -------------------------------------------------------------------------------- 1 | uid://41p70n0pflpe 2 | -------------------------------------------------------------------------------- /effects/car_sound/car horn.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/effects/car_sound/car horn.mp3 -------------------------------------------------------------------------------- /effects/car_sound/car idle.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/effects/car_sound/car idle.mp3 -------------------------------------------------------------------------------- /effects/car_sound/car start.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/effects/car_sound/car start.mp3 -------------------------------------------------------------------------------- /effects/firefly_effect/Flare_small.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/effects/firefly_effect/Flare_small.PNG -------------------------------------------------------------------------------- /effects/firefly_effect/firefly_effect.gd: -------------------------------------------------------------------------------- 1 | extends GPUParticles2D 2 | 3 | func _ready() -> void: 4 | lifetime = 0.1 5 | 6 | await get_tree().create_timer(0.1).timeout 7 | 8 | lifetime = 50 9 | -------------------------------------------------------------------------------- /effects/firefly_effect/firefly_effect.gd.uid: -------------------------------------------------------------------------------- 1 | uid://b5ijm4cltljdb 2 | -------------------------------------------------------------------------------- /effects/simple_shake_camera/camera_2d.gd: -------------------------------------------------------------------------------- 1 | extends Camera2D 2 | 3 | var rng = RandomNumberGenerator.new() 4 | var duration = 0 5 | var force 6 | 7 | func _ready() -> void: 8 | add_to_group("camera") 9 | 10 | func _process(delta: float) -> void: 11 | if duration > 0: 12 | var forceX = rng.randf_range(-1,1) * force 13 | var forceY = rng.randf_range(-1,1) * force 14 | 15 | offset = Vector2(forceX, forceY) 16 | 17 | duration -= delta 18 | 19 | func shake_camera(shakeForce, shakeDuration): 20 | duration = shakeDuration 21 | force = shakeForce 22 | -------------------------------------------------------------------------------- /shader/2D_interactive_grass/assets/grass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/derdrache/tutorial_library/bb7f8ec98a11e82d48817463c0e44849a5268bef/shader/2D_interactive_grass/assets/grass.png -------------------------------------------------------------------------------- /shader/2D_interactive_grass/interactive_grass.gd: -------------------------------------------------------------------------------- 1 | extends Area2D 2 | 3 | @onready var sprite_2d: Sprite2D = $Sprite2D 4 | 5 | @export var skewValue := 15 6 | @export var bendGrassnimationSpeed = 0.3 7 | @export var grassReturnAnimationSpeed = 5.0 8 | 9 | func _on_body_entered(body: Node2D) -> void: 10 | if body == get_tree().get_first_node_in_group("player"): 11 | var direction = global_position.direction_to(body.global_position) 12 | var skew : int = -direction.x * skewValue 13 | 14 | var tween = create_tween() 15 | tween.tween_property( 16 | sprite_2d.material, 17 | "shader_parameter/skew", 18 | skew, 19 | bendGrassnimationSpeed 20 | ).set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_CUBIC) 21 | 22 | tween.tween_property( 23 | sprite_2d.material, 24 | "shader_parameter/skew", 25 | 0.0, 26 | grassReturnAnimationSpeed 27 | ).set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_ELASTIC) 28 | -------------------------------------------------------------------------------- /shader/2D_interactive_grass/interactive_grass.gdshader: -------------------------------------------------------------------------------- 1 | shader_type canvas_item; 2 | 3 | uniform float skew = 0; 4 | 5 | void vertex() { 6 | VERTEX.x += (1.0-UV.y) * skew; 7 | } -------------------------------------------------------------------------------- /shader/3D_simple_water_shader/water.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://t0k0k2v3ru7d"] 2 | 3 | [ext_resource type="Material" uid="uid://byot4ja320vrv" path="res://simple_water_shader/water.tres" id="2_ogomo"] 4 | 5 | [sub_resource type="PlaneMesh" id="PlaneMesh_8w3hm"] 6 | material = ExtResource("2_ogomo") 7 | size = Vector2(20, 20) 8 | 9 | [node name="Water" type="Node3D"] 10 | 11 | [node name="MeshInstance3D" type="MeshInstance3D" parent="."] 12 | transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.1, 0) 13 | mesh = SubResource("PlaneMesh_8w3hm") 14 | -------------------------------------------------------------------------------- /templates/2D_top_down_basic.gd: -------------------------------------------------------------------------------- 1 | extends CharacterBody2D 2 | 3 | @onready var animated_sprite_2d: AnimatedSprite2D = $AnimatedSprite2D 4 | 5 | const SPEED = 75.0 6 | 7 | func _ready() -> void: 8 | add_to_group("player") 9 | 10 | func _physics_process(delta: float) -> void: 11 | var direction := Vector2.ZERO 12 | direction.x = Input.get_axis("ui_left", "ui_right") 13 | direction.y = Input.get_axis("ui_up", "ui_down") 14 | 15 | if direction: 16 | velocity = direction * SPEED 17 | else: 18 | velocity = Vector2.ZERO 19 | 20 | _set_animation() 21 | 22 | move_and_slide() 23 | 24 | func _set_animation(): 25 | if velocity.x > 0: 26 | animated_sprite_2d.flip_h = false 27 | elif velocity.x < 0: 28 | animated_sprite_2d.flip_h = true 29 | 30 | if velocity: 31 | animated_sprite_2d.play("walk") 32 | else: 33 | animated_sprite_2d.play("idle") 34 | --------------------------------------------------------------------------------