mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2025-12-16 13:30:07 +01:00
[2.1] Simplify list of branches in the README (#1255)
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
# Top-most EditorConfig file.
|
||||
root = true
|
||||
|
||||
# Unix-style newlines with a newline ending every file.
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
|
||||
19
.github/workflows/static_checks.yml
vendored
Normal file
19
.github/workflows/static_checks.yml
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
name: Static Checks
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
format:
|
||||
name: File formatting (file_format.sh)
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -qq dos2unix recode
|
||||
|
||||
- name: File formatting checks (file_format.sh)
|
||||
run: |
|
||||
bash ./file_format.sh
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -18,4 +18,5 @@ mono_crash.*.json
|
||||
|
||||
# System/tool-specific ignores
|
||||
.directory
|
||||
.DS_Store
|
||||
*~
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Area2D
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends RigidBody2D
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Node2D
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends TileMap
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends KinematicBody2D
|
||||
|
||||
# This is a simple collision demo showing how
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Node2D
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends KinematicBody2D
|
||||
|
||||
# This is a simple collision demo showing how
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends KinematicBody2D
|
||||
|
||||
# This is a simple collision demo showing how
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends KinematicBody2D
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Node2D
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends KinematicBody2D
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Node2D
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends KinematicBody2D
|
||||
|
||||
# This is a simple collision demo showing how
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends KinematicBody2D
|
||||
|
||||
# This is a simple collision demo showing how
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Sprite
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Sprite
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Navigation2D
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends RigidBody2D
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Area2D
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends RigidBody2D
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Node2D
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends RigidBody2D
|
||||
|
||||
# Character Demo, written by Juan Linietsky.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends RigidBody2D
|
||||
|
||||
func _on_bullet_body_enter( body ):
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Area2D
|
||||
|
||||
var taken=false
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends KinematicBody2D
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Node2D
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends KinematicBody2D
|
||||
|
||||
const GRAVITY_VEC = Vector2(0,900)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Node2D
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Control
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Node2D
|
||||
|
||||
# This demo is an example of controling a high number of 2D objects with logic and collision without using scene nodes.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Node2D
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -38,4 +38,3 @@ func _on_visibility_enter_screen():
|
||||
get_node("anim").seek(randf()*2.0)
|
||||
# as mentioned in _ready, show the node after seeking to the random start point in the animation
|
||||
show()
|
||||
|
||||
@@ -102,4 +102,3 @@ func set_projectile_container(container):
|
||||
# other objects (enemy projectiles) use this to tell the player ship that it was hit
|
||||
func take_damage():
|
||||
_hit_something()
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends RigidBody2D
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Area2D
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends RigidBody2D
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Node2D
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends RigidBody2D
|
||||
|
||||
# Character Demo, written by Juan Linietsky.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Control
|
||||
|
||||
# Simple Tetris-like demo, (c) 2012 Juan Linietsky
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Control
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends BackBufferCopy
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends KinematicBody
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Camera
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends RigidBody
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Navigation
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends RigidBody
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Area
|
||||
|
||||
# Member variables
|
||||
@@ -14,4 +13,3 @@ func _on_coin_body_enter(body):
|
||||
func _on_anim_finished():
|
||||
if get_node("anim").get_current_animation() == "take":
|
||||
queue_free()
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends RigidBody
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Camera
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends RigidBody
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Control
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Camera
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends VehicleBody
|
||||
|
||||
# Member variables
|
||||
|
||||
21
README.md
21
README.md
@@ -8,23 +8,10 @@ be used with [Godot Engine](https://godotengine.org), the open source
|
||||
|
||||
- The [`master`](https://github.com/godotengine/godot-demo-projects) branch is compatible with Godot's `master` development branch (next 4.x release).
|
||||
- The [`3.x`](https://github.com/godotengine/godot-demo-projects/tree/3.x) branch is compatible with Godot's `3.x` development branch (next 3.x release).
|
||||
- The other branches are compatible with the matching stable versions of Godot:
|
||||
- [`4.0`](https://github.com/godotengine/godot-demo-projects/tree/4.0)
|
||||
branch for Godot 4.0.x.
|
||||
- [`3.5`](https://github.com/godotengine/godot-demo-projects/tree/3.5)
|
||||
branch for Godot 3.5.x.
|
||||
- [`3.4`](https://github.com/godotengine/godot-demo-projects/tree/3.4)
|
||||
branch for Godot 3.4.x.
|
||||
- [`3.3`](https://github.com/godotengine/godot-demo-projects/tree/3.3)
|
||||
branch for Godot 3.3.x.
|
||||
- [`3.2`](https://github.com/godotengine/godot-demo-projects/tree/3.2)
|
||||
branch for Godot 3.2.x.
|
||||
- [`3.1`](https://github.com/godotengine/godot-demo-projects/tree/3.1)
|
||||
branch for Godot 3.1.x.
|
||||
- [`3.0`](https://github.com/godotengine/godot-demo-projects/tree/3.0)
|
||||
branch for Godot 3.0.x.
|
||||
- [***`2.1`***](https://github.com/godotengine/godot-demo-projects/tree/2.1)
|
||||
branch for Godot 2.1.x.
|
||||
- The other branches are compatible with the matching stable versions of Godot.
|
||||
- [Click here](https://github.com/godotengine/godot-demo-projects/branches) to see all branches.
|
||||
- For example, the [`2.1`](https://github.com/godotengine/godot-demo-projects/tree/2.1)
|
||||
branch is for demos compatible with Godot 2.1.x.
|
||||
|
||||
## Importing all demos
|
||||
|
||||
|
||||
55
file_format.sh
Executable file
55
file_format.sh
Executable file
@@ -0,0 +1,55 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This script ensures proper POSIX text file formatting and a few other things.
|
||||
|
||||
set -uo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
# Loops through all text files tracked by Git.
|
||||
git grep -zIl '' |
|
||||
while IFS= read -rd '' f; do
|
||||
# Exclude some types of files.
|
||||
if [[ "$f" == *"csproj" ]]; then
|
||||
continue
|
||||
elif [[ "$f" == *"hdr" ]]; then
|
||||
continue
|
||||
fi
|
||||
# Ensure that files are UTF-8 formatted.
|
||||
recode UTF-8 "$f" 2> /dev/null
|
||||
# Ensure that files have LF line endings and do not contain a BOM.
|
||||
dos2unix "$f" 2> /dev/null
|
||||
# Remove trailing space characters and ensures that files end
|
||||
# with newline characters. -l option handles newlines conveniently.
|
||||
perl -i -ple 's/\s*$//g' "$f"
|
||||
# Remove the character sequence "== true" if it has a leading space.
|
||||
perl -i -pe 's/\x20== true//g' "$f"
|
||||
# We don't want to change lines around braces in godot/tscn files.
|
||||
if [[ "$f" == *"godot" ]]; then
|
||||
continue
|
||||
elif [[ "$f" == *"tscn" ]]; then
|
||||
continue
|
||||
fi
|
||||
# Disallow empty lines after the opening brace.
|
||||
sed -z -i 's/\x7B\x0A\x0A/\x7B\x0A/g' "$f"
|
||||
# Disallow some empty lines before the closing brace.
|
||||
sed -z -i 's/\x0A\x0A\x7D/\x0A\x7D/g' "$f"
|
||||
done
|
||||
|
||||
git diff > patch.patch
|
||||
FILESIZE="$(stat -c%s patch.patch)"
|
||||
MAXSIZE=5
|
||||
|
||||
# If no patch has been generated all is OK, clean up, and exit.
|
||||
if (( FILESIZE < MAXSIZE )); then
|
||||
printf "Files in this commit comply with the formatting rules.\n"
|
||||
rm -f patch.patch
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# A patch has been created, notify the user, clean up, and exit.
|
||||
printf "\n*** The following differences were found between the code "
|
||||
printf "and the formatting rules:\n\n"
|
||||
cat patch.patch
|
||||
printf "\n*** Aborting, please fix your commit(s) with 'git commit --amend' or 'git rebase -i <hash>'\n"
|
||||
rm -f patch.patch
|
||||
exit 1
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends ColorPickerButton
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Panel
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Panel
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Panel
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Node
|
||||
|
||||
signal purchase_success(item_name)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Control
|
||||
|
||||
onready var alert = get_node("alert")
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Spatial
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends VBoxContainer
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Panel
|
||||
|
||||
# Member variables here, example:
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Panel
|
||||
|
||||
# Member variables here, example:
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Node2D
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Panel
|
||||
|
||||
# Really simple UDP chat client, not intended as a comprehensive chat implementation.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Spatial
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -10,14 +10,9 @@ func _enter_tree():
|
||||
|
||||
add_control_to_dock( DOCK_SLOT_LEFT_UL, dock )
|
||||
|
||||
func _exit_tree():
|
||||
|
||||
func _exit_tree():
|
||||
# Remove from docks (must be called so layout is updated and saved)
|
||||
remove_control_from_docks(dock)
|
||||
# Remove the node
|
||||
dock.free()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
tool
|
||||
|
||||
extends EditorImportPlugin
|
||||
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ extends EditorPlugin
|
||||
|
||||
var import_plugin
|
||||
|
||||
func _enter_tree():
|
||||
|
||||
func _enter_tree():
|
||||
import_plugin = preload("res://addons/custom_import_plugin/import_plugin.gd").new()
|
||||
|
||||
# pass the GUI base control, so the dialog has a parent node
|
||||
@@ -12,11 +12,6 @@ func _enter_tree():
|
||||
|
||||
add_import_plugin( import_plugin)
|
||||
|
||||
|
||||
func _exit_tree():
|
||||
|
||||
remove_import_plugin( import_plugin )
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -15,4 +15,3 @@ func _exit_tree():
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Node2D
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Spatial
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Spatial
|
||||
|
||||
# Member variables
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
extends Control
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user