[3.0] Simplify list of branches in the README (#1255)

This commit is contained in:
Aaron Franke
2025-10-02 15:47:37 -07:00
parent 3e4f49cef7
commit ab9be2e79d
89 changed files with 624 additions and 1156 deletions

View File

@@ -1,6 +1,16 @@
# 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
[*.cs]
csharp_space_after_cast = false
indent_size = 4
[*.csproj]
insert_final_newline = false
indent_size = 2

19
.github/workflows/static_checks.yml vendored Normal file
View 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
View File

@@ -18,4 +18,5 @@ mono_crash.*.json
# System/tool-specific ignores
.directory
.DS_Store
*~

View File

@@ -1,4 +1,3 @@
extends Node2D
# Member variables

View File

@@ -36,7 +36,6 @@ code = "shader_type canvas_item;
uniform float amount : hint_range(0,5);
void fragment() {
COLOR.rgb = textureLod(SCREEN_TEXTURE,SCREEN_UV,amount).rgb;
}"
@@ -108,7 +107,6 @@ void fragment() {
v=sqrt(v);
//v*=v;
COLOR.rgb= base.rgb*v;
}"
[sub_resource type="ShaderMaterial" id=10]
@@ -123,7 +121,6 @@ _sections_unfolded = [ "shader", "shader_param" ]
code = "shader_type canvas_item;
void fragment() {
vec3 c = textureLod(SCREEN_TEXTURE,SCREEN_UV,0.0).rgb;
c=vec3(1.0)-c;
COLOR.rgb=c;
@@ -141,7 +138,6 @@ _sections_unfolded = [ "shader" ]
code = "shader_type canvas_item;
void fragment() {
vec3 c = textureLod(SCREEN_TEXTURE,SCREEN_UV,0.0).rgb;
c=mod(c+vec3(0.5),vec3(1.0));
COLOR.rgb=c;
@@ -179,7 +175,6 @@ uniform float contrast=1.5;
uniform float saturation=1.8;
void fragment() {
vec3 c = textureLod(SCREEN_TEXTURE,SCREEN_UV,0.0).rgb;
c.rgb = mix(vec3(0.0),c.rgb,brightness);
@@ -207,7 +202,6 @@ uniform float frequency=60;
uniform float depth = 0.005;
void fragment() {
vec2 uv = SCREEN_UV;
uv.x += sin(uv.y*frequency+TIME)*depth;
uv.x = clamp(uv.x,0,1);
@@ -239,7 +233,6 @@ uniform float stretch = 0.5;
uniform float flashing=0.01;
float make_grain(float time,vec2 uv) {
vec2 ofs = vec2(sin(41.0*time*sin(time*123.0)),sin(27.0*time*sin(time*312.0)));
return texture(grain,(uv+mod(ofs,vec2(1,1)))*stretch).r;
}

View File

@@ -1,570 +0,0 @@
[gd_scene load_steps=31 format=2]
[ext_resource path="res://screen_shaders.gd" type="Script" id=1]
[ext_resource path="res://art/burano.jpg" type="Texture" id=2]
[ext_resource path="res://art/platformer.jpg" type="Texture" id=3]
[ext_resource path="res://art/mountains.jpg" type="Texture" id=4]
[ext_resource path="res://art/forest.jpg" type="Texture" id=5]
[ext_resource path="res://art/vignette.png" type="Texture" id=6]
[ext_resource path="res://art/white.png" type="Texture" id=7]
[ext_resource path="res://art/filmgrain.png" type="Texture" id=8]
[sub_resource type="Shader" id=1]
code = "shader_type canvas_item;
uniform sampler2D vignette;
void fragment() {
vec3 vignette_color = texture(vignette,UV).rgb;
//screen texture stores gaussian blurred copies on mipmaps
COLOR.rgb = textureLod(SCREEN_TEXTURE,SCREEN_UV,(1.0-vignette_color.r)*4.0).rgb;
COLOR.rgb*= texture(vignette,UV).rgb;
}"
[sub_resource type="ShaderMaterial" id=2]
shader/shader = SubResource( 1 )
shader_param/vignette = ExtResource( 6 )
_sections_unfolded = [ "shader", "shader_param" ]
[sub_resource type="Shader" id=3]
code = "shader_type canvas_item;
uniform float amount : hint_range(0,5);
void fragment() {
COLOR.rgb = textureLod(SCREEN_TEXTURE,SCREEN_UV,amount).rgb;
}"
[sub_resource type="ShaderMaterial" id=4]
shader/shader = SubResource( 3 )
shader_param/amount = 4.0
_sections_unfolded = [ "shader", "shader_param" ]
[sub_resource type="Shader" id=5]
code = "shader_type canvas_item;
uniform float size_x=0.008;
uniform float size_y=0.008;
void fragment() {
vec2 uv = SCREEN_UV;
uv-=mod(uv,vec2(size_x,size_y));
COLOR.rgb= textureLod(SCREEN_TEXTURE,uv,0.0).rgb;
}
"
[sub_resource type="ShaderMaterial" id=6]
shader/shader = SubResource( 5 )
shader_param/size_x = null
shader_param/size_y = null
_sections_unfolded = [ "shader" ]
[sub_resource type="Shader" id=7]
code = "shader_type canvas_item;
uniform float rotation=3.0;
void fragment() {
vec2 uv = SCREEN_UV;
vec2 rel = uv-vec2(0.5,0.5);
float angle = length(rel)*rotation;
mat2 rot = mat2(vec2(cos(angle),-sin(angle)),vec2(sin(angle),cos(angle)));
rel = rot * rel;
uv = clamp(rel + vec2(0.5,0.5),vec2(0,0),vec2(1,1));
COLOR.rgb= textureLod(SCREEN_TEXTURE,uv,0.0).rgb;
}
"
[sub_resource type="ShaderMaterial" id=8]
shader/shader = SubResource( 7 )
shader_param/rotation = null
_sections_unfolded = [ "shader" ]
[sub_resource type="Shader" id=9]
code = "shader_type canvas_item;
uniform vec4 base : hint_color;
void fragment() {
vec3 c = textureLod(SCREEN_TEXTURE,SCREEN_UV,0.0).rgb;
//float v = max(c.r,max(c.g,c.b));
float v = dot(c,vec3(0.33333,0.33333,0.33333));
v=sqrt(v);
//v*=v;
COLOR.rgb= base.rgb*v;
}"
[sub_resource type="ShaderMaterial" id=10]
shader/shader = SubResource( 9 )
shader_param/base = Color( 0.54451, 0.408353, 0.403137, 1 )
_sections_unfolded = [ "shader", "shader_param" ]
[sub_resource type="Shader" id=11]
code = "shader_type canvas_item;
void fragment() {
vec3 c = textureLod(SCREEN_TEXTURE,SCREEN_UV,0.0).rgb;
c=vec3(1.0)-c;
COLOR.rgb=c;
}
"
[sub_resource type="ShaderMaterial" id=12]
shader/shader = SubResource( 11 )
_sections_unfolded = [ "shader" ]
[sub_resource type="Shader" id=13]
code = "shader_type canvas_item;
void fragment() {
vec3 c = textureLod(SCREEN_TEXTURE,SCREEN_UV,0.0).rgb;
c=mod(c+vec3(0.5),vec3(1.0));
COLOR.rgb=c;
}
"
[sub_resource type="ShaderMaterial" id=14]
shader/shader = SubResource( 13 )
_sections_unfolded = [ "shader" ]
[sub_resource type="Shader" id=15]
code = "shader_type canvas_item;
void fragment() {
vec3 c = textureLod(SCREEN_TEXTURE,SCREEN_UV,0.0).rgb;
COLOR.rgb=normalize(c);
}
"
[sub_resource type="ShaderMaterial" id=16]
shader/shader = SubResource( 15 )
_sections_unfolded = [ "shader" ]
[sub_resource type="Shader" id=17]
code = "shader_type canvas_item;
uniform float brightness=0.8;
uniform float contrast=1.5;
uniform float saturation=1.8;
void fragment() {
vec3 c = textureLod(SCREEN_TEXTURE,SCREEN_UV,0.0).rgb;
c.rgb = mix(vec3(0.0),c.rgb,brightness);
c.rgb = mix(vec3(0.5),c.rgb,contrast);
c.rgb = mix(vec3(dot(vec3(1.0),c.rgb)*0.33333),c.rgb,saturation);
COLOR.rgb=c;
}
"
[sub_resource type="ShaderMaterial" id=18]
shader/shader = SubResource( 17 )
shader_param/brightness = null
shader_param/contrast = null
shader_param/saturation = null
_sections_unfolded = [ "shader" ]
[sub_resource type="Shader" id=19]
code = "shader_type canvas_item;
uniform float frequency=60;
uniform float depth = 0.005;
void fragment() {
vec2 uv = SCREEN_UV;
uv.x += sin(uv.y*frequency+TIME)*depth;
uv.x = clamp(uv.x,0,1);
vec3 c = textureLod(SCREEN_TEXTURE,uv,0.0).rgb;
COLOR.rgb=c;
}
"
[sub_resource type="ShaderMaterial" id=20]
shader/shader = SubResource( 19 )
shader_param/frequency = null
shader_param/depth = null
_sections_unfolded = [ "shader" ]
[sub_resource type="Shader" id=21]
code = "shader_type canvas_item;
uniform vec4 base : hint_color;
uniform sampler2D grain;
uniform float grain_strength=0.3;
uniform sampler2D vignette;
uniform float fps=12;
uniform float stretch = 0.5;
uniform float flashing=0.01;
float make_grain(float time,vec2 uv) {
vec2 ofs = vec2(sin(41.0*time*sin(time*123.0)),sin(27.0*time*sin(time*312.0)));
return texture(grain,(uv+mod(ofs,vec2(1,1)))*stretch).r;
}
void fragment() {
vec3 c = textureLod(SCREEN_TEXTURE,SCREEN_UV,0.0).rgb;
//float v = max(c.r,max(c.g,c.b));
float v = dot(c,vec3(0.33333,0.33333,0.33333));
v=sqrt(v);
//v*=v;
float f = 1.0/fps;
float g = make_grain(TIME-mod(TIME,f),UV);
g=max(g,make_grain(TIME-mod(TIME,f)+f,UV)*0.5);
g=max(g,make_grain(TIME-mod(TIME,f)+f*2.0,UV)*0.25);
COLOR.rgb= base.rgb*v-vec3(g)*grain_strength;
COLOR.rgb*=texture(vignette,UV).r;
float ft = TIME * 0.002;
COLOR.rgb+=vec3(sin(75.0*ft*sin(ft*123.0)))*flashing;
}
"
[sub_resource type="ShaderMaterial" id=22]
shader/shader = SubResource( 21 )
shader_param/base = Color( 0.450274, 0.361255, 0.335059, 1 )
shader_param/grain_strength = 0.3
shader_param/fps = 12
shader_param/stretch = 0.5
shader_param/flashing = 0.01
shader_param/grain = ExtResource( 8 )
shader_param/vignette = ExtResource( 6 )
_sections_unfolded = [ "shader", "shader_param" ]
[node name="Control" type="Control"]
anchor_right = 1
anchor_bottom = 1
rect_clip_content = false
mouse_filter = 0
size_flags_horizontal = 2
size_flags_vertical = 2
script = ExtResource( 1 )
_sections_unfolded = [ "Pause" ]
[node name="pictures" type="Control" parent="."]
anchor_right = 1
anchor_bottom = 1
rect_clip_content = false
mouse_filter = 0
size_flags_horizontal = 2
size_flags_vertical = 2
[node name="burano" type="TextureRect" parent="pictures"]
margin_right = 40.0
margin_bottom = 40.0
rect_clip_content = false
mouse_filter = 1
size_flags_horizontal = 2
size_flags_vertical = 2
texture = ExtResource( 2 )
stretch_mode = 0
[node name="roby" type="TextureRect" parent="pictures"]
visible = false
margin_right = 40.0
margin_bottom = 40.0
rect_clip_content = false
mouse_filter = 1
size_flags_horizontal = 2
size_flags_vertical = 2
texture = ExtResource( 3 )
stretch_mode = 0
[node name="mountains" type="TextureRect" parent="pictures"]
visible = false
margin_right = 40.0
margin_bottom = 40.0
rect_clip_content = false
mouse_filter = 1
size_flags_horizontal = 2
size_flags_vertical = 2
texture = ExtResource( 4 )
stretch_mode = 0
[node name="forest" type="TextureRect" parent="pictures"]
visible = false
margin_right = 40.0
margin_bottom = 40.0
rect_clip_content = false
mouse_filter = 1
size_flags_horizontal = 2
size_flags_vertical = 2
texture = ExtResource( 5 )
stretch_mode = 0
[node name="effects" type="Control" parent="."]
anchor_right = 1
anchor_bottom = 1
margin_right = -20.0
rect_clip_content = false
mouse_filter = 0
size_flags_horizontal = 2
size_flags_vertical = 2
[node name="disabled" type="Control" parent="effects"]
visible = false
margin_right = 40.0
margin_bottom = 40.0
rect_clip_content = false
mouse_filter = 0
size_flags_horizontal = 2
size_flags_vertical = 2
[node name="vignette" type="TextureRect" parent="effects"]
visible = false
material = SubResource( 2 )
anchor_right = 1
anchor_bottom = 1
rect_clip_content = false
mouse_filter = 1
size_flags_horizontal = 2
size_flags_vertical = 2
texture = ExtResource( 7 )
expand = true
stretch_mode = 0
_sections_unfolded = [ "Material" ]
[node name="blur" type="TextureRect" parent="effects"]
visible = false
material = SubResource( 4 )
anchor_right = 1
anchor_bottom = 1
rect_clip_content = false
mouse_filter = 1
size_flags_horizontal = 2
size_flags_vertical = 2
texture = ExtResource( 7 )
expand = true
stretch_mode = 0
_sections_unfolded = [ "Material" ]
[node name="pixelize" type="TextureRect" parent="effects"]
visible = false
material = SubResource( 6 )
anchor_right = 1
anchor_bottom = 1
rect_clip_content = false
mouse_filter = 1
size_flags_horizontal = 2
size_flags_vertical = 2
texture = ExtResource( 7 )
expand = true
stretch_mode = 0
_sections_unfolded = [ "Material" ]
[node name="whirl" type="TextureRect" parent="effects"]
visible = false
material = SubResource( 8 )
anchor_right = 1
anchor_bottom = 1
rect_clip_content = false
mouse_filter = 1
size_flags_horizontal = 2
size_flags_vertical = 2
texture = ExtResource( 7 )
expand = true
stretch_mode = 0
_sections_unfolded = [ "Material" ]
[node name="sepia" type="TextureRect" parent="effects"]
visible = false
material = SubResource( 10 )
anchor_right = 1
anchor_bottom = 1
margin_right = 14.0
margin_bottom = -2.0
rect_clip_content = false
mouse_filter = 1
size_flags_horizontal = 2
size_flags_vertical = 2
texture = ExtResource( 7 )
expand = true
stretch_mode = 0
_sections_unfolded = [ "Material", "Visibility" ]
[node name="negative" type="TextureRect" parent="effects"]
visible = false
material = SubResource( 12 )
anchor_right = 1
anchor_bottom = 1
rect_clip_content = false
mouse_filter = 1
size_flags_horizontal = 2
size_flags_vertical = 2
texture = ExtResource( 7 )
expand = true
stretch_mode = 0
_sections_unfolded = [ "Material" ]
[node name="contrasted" type="TextureRect" parent="effects"]
visible = false
material = SubResource( 14 )
anchor_right = 1
anchor_bottom = 1
rect_clip_content = false
mouse_filter = 1
size_flags_horizontal = 2
size_flags_vertical = 2
texture = ExtResource( 7 )
expand = true
stretch_mode = 0
_sections_unfolded = [ "Material" ]
[node name="normalized" type="TextureRect" parent="effects"]
visible = false
material = SubResource( 16 )
anchor_right = 1
anchor_bottom = 1
rect_clip_content = false
mouse_filter = 1
size_flags_horizontal = 2
size_flags_vertical = 2
texture = ExtResource( 7 )
expand = true
stretch_mode = 0
_sections_unfolded = [ "Material" ]
[node name="BCS" type="TextureRect" parent="effects"]
visible = false
material = SubResource( 18 )
anchor_right = 1
anchor_bottom = 1
margin_top = 3.0
margin_bottom = -3.0
rect_clip_content = false
mouse_filter = 1
size_flags_horizontal = 2
size_flags_vertical = 2
texture = ExtResource( 7 )
expand = true
stretch_mode = 0
_sections_unfolded = [ "Material" ]
[node name="mirage" type="TextureRect" parent="effects"]
visible = false
material = SubResource( 20 )
anchor_right = 1
anchor_bottom = 1
rect_clip_content = false
mouse_filter = 1
size_flags_horizontal = 2
size_flags_vertical = 2
texture = ExtResource( 7 )
expand = true
stretch_mode = 0
_sections_unfolded = [ "Material" ]
[node name="old_film" type="TextureRect" parent="effects"]
visible = false
material = SubResource( 22 )
anchor_right = 1
anchor_bottom = 1
margin_left = -3.0
margin_right = 3.0
rect_clip_content = false
mouse_filter = 1
size_flags_horizontal = 2
size_flags_vertical = 2
texture = ExtResource( 7 )
expand = true
stretch_mode = 0
_sections_unfolded = [ "Material" ]
[node name="picture" type="OptionButton" parent="."]
margin_left = 8.0
margin_top = 7.0
margin_right = 131.0
margin_bottom = 28.0
rect_clip_content = false
mouse_filter = 0
size_flags_horizontal = 2
size_flags_vertical = 2
toggle_mode = false
enabled_focus_mode = 2
shortcut = null
group = null
flat = false
align = 0
selected = -1
items = [ ]
[node name="effect" type="OptionButton" parent="."]
margin_left = 137.0
margin_top = 7.0
margin_right = 260.0
margin_bottom = 28.0
rect_clip_content = false
mouse_filter = 0
size_flags_horizontal = 2
size_flags_vertical = 2
toggle_mode = false
enabled_focus_mode = 2
shortcut = null
group = null
flat = false
align = 0
selected = -1
items = [ ]
[connection signal="item_selected" from="picture" to="." method="_on_picture_item_selected"]
[connection signal="item_selected" from="effect" to="." method="_on_effect_item_selected"]

View File

@@ -253,7 +253,6 @@ render_mode blend_mix;
uniform vec4 modulate:hint_color;
void fragment(){
COLOR = vec4(modulate.rgb, texture(TEXTURE, UV).a*modulate.a);
}"
@@ -322,7 +321,6 @@ render_mode blend_mix;
uniform float amount = 20.0;
void fragment(){
vec2 uv = UV*0.05;
float a = fract(sin(dot(UV, vec2(12.9898, 78.233)))*438.5453);
vec4 col = texture(TEXTURE, UV);

View File

@@ -55,7 +55,7 @@ func _ready():
target = Spatial.new()
add_child(target)
if Engine.editor_hint == true:
if Engine.editor_hint:
if get_tree() != null:
if get_tree().edited_scene_root != null:
target.set_owner(get_tree().edited_scene_root)
@@ -65,7 +65,7 @@ func _ready():
target = get_node("target")
# If we are in the editor, we want to make a sphere at this node
if Engine.editor_hint == true:
if Engine.editor_hint:
_make_editor_sphere_at_node(target, Color(1, 0, 1, 1))
if middle_joint_target == null:
@@ -73,7 +73,7 @@ func _ready():
middle_joint_target = Spatial.new()
add_child(middle_joint_target)
if Engine.editor_hint == true:
if Engine.editor_hint:
if get_tree() != null:
if get_tree().edited_scene_root != null:
middle_joint_target.set_owner(get_tree().edited_scene_root)
@@ -83,7 +83,7 @@ func _ready():
middle_joint_target = get_node("middle_joint_target")
# If we are in the editor, we want to make a sphere at this node
if Engine.editor_hint == true:
if Engine.editor_hint:
_make_editor_sphere_at_node(middle_joint_target, Color(1, 0.24, 1, 1))
# Make all of the bone nodes for each bone in the IK chain
@@ -135,7 +135,7 @@ func _set_update_mode(new_value):
elif update_mode == 2:
set_notify_transform(true)
else:
if debug_messages == true:
if debug_messages:
print (name, " - IK_FABRIK: Unknown update mode. NOT updating skeleton")
return
@@ -143,36 +143,36 @@ func _set_update_mode(new_value):
func _set_skeleton_path(new_value):
# Because get_node doesn't work in the first call, we just want to assign instead
if first_call == true:
if first_call:
skeleton_path = new_value
return
skeleton_path = new_value
if skeleton_path == null:
if debug_messages == true:
if debug_messages:
print (name, " - IK_FABRIK: No Nodepath selected for skeleton_path!")
return
var temp = get_node(skeleton_path)
if temp != null:
# If it has the method "get_bone_global_pose" it is likely a Skeleton
if temp.has_method("get_bone_global_pose") == true:
if temp.has_method("get_bone_global_pose"):
skeleton = temp
bone_IDs = {}
# (Delete all of the old bone nodes and) Make all of the bone nodes for each bone in the IK chain
_make_bone_nodes()
if debug_messages == true:
if debug_messages:
print (name, " - IK_FABRIK: Attached to a new skeleton")
# If not, then it's (likely) not a Skeleton node
else:
skeleton = null
if debug_messages == true:
if debug_messages:
print (name, " - IK_FABRIK: skeleton_path does not point to a skeleton!")
else:
if debug_messages == true:
if debug_messages:
print (name, " - IK_FABRIK: No Nodepath selected for skeleton_path!")
############# OTHER (NON IK SOLVER RELATED) FUNCTIONS #############
@@ -190,7 +190,7 @@ func _make_bone_nodes():
bone_nodes[bone] = new_node
add_child(bone_nodes[bone])
if Engine.editor_hint == true:
if Engine.editor_hint:
if get_tree() != null:
if get_tree().edited_scene_root != null:
bone_nodes[bone].set_owner(get_tree().edited_scene_root)
@@ -201,7 +201,7 @@ func _make_bone_nodes():
bone_nodes[bone] = get_node(bone_name)
# If we are in the editor, we want to make a sphere at this node
if Engine.editor_hint == true:
if Engine.editor_hint:
_make_editor_sphere_at_node(bone_nodes[bone], Color(0.65, 0, 1, 1))
@@ -218,16 +218,16 @@ func _set_bone_chain_lengths(new_value):
# Various upate methods
# ---------------------
func _process(delta):
if reset_iterations_on_update == true:
if reset_iterations_on_update:
chain_iterations = 0
update_skeleton()
func _physics_process(delta):
if reset_iterations_on_update == true:
if reset_iterations_on_update:
chain_iterations = 0
update_skeleton()
func _notification(what):
if what == NOTIFICATION_TRANSFORM_CHANGED:
if reset_iterations_on_update == true:
if reset_iterations_on_update:
chain_iterations = 0
update_skeleton()
@@ -237,7 +237,7 @@ func _notification(what):
func update_skeleton():
#### ERROR CHECKING conditions
if first_call == true:
if first_call:
_set_skeleton_path(skeleton_path)
first_call = false
@@ -247,16 +247,16 @@ func update_skeleton():
return
if bones_in_chain == null:
if debug_messages == true:
if debug_messages:
print (name, " - IK_FABRIK: No Bones in IK chain defined!")
return
if bones_in_chain_lengths == null:
if debug_messages == true:
if debug_messages:
print (name, " - IK_FABRIK: No Bone lengths in IK chain defined!")
return
if bones_in_chain.size() != bones_in_chain_lengths.size():
if debug_messages == true:
if debug_messages:
print (name, " - IK_FABRIK: bones_in_chain and bones_in_chain_lengths!")
return
@@ -292,7 +292,7 @@ func solve_chain():
# If we have reached our max chain iteration, and we are limiting ourselves, then return.
# Otherwise set chain_iterations to zero (so we constantly update)
if chain_iterations >= CHAIN_MAX_ITER and limit_chain_iterations == true:
if chain_iterations >= CHAIN_MAX_ITER and limit_chain_iterations:
return
else:
chain_iterations = 0
@@ -313,7 +313,7 @@ func solve_chain():
var target_pos = target.global_transform.origin + (dir * bones_in_chain_lengths[bone_nodes.size()-1])
# If we are using middle joint target (and have more than 2 bones), move our middle joint towards it!
if use_middle_joint_target == true:
if use_middle_joint_target:
if bone_nodes.size() > 2:
var middle_point_pos = middle_joint_target.global_transform
bone_nodes[bone_nodes.size()/2].global_transform.origin = middle_point_pos.origin
@@ -476,7 +476,7 @@ func get_bone_transform(bone, convert_to_world_space=true):
# If we need to convert the bone position from bone/skeleton space to world space, we
# use the Xform of the skeleton (because bone/skeleton space is relative to the position of the skeleton node).
if convert_to_world_space == true:
if convert_to_world_space:
ret.origin = skeleton.global_transform.xform(ret.origin)
return ret

View File

@@ -29,10 +29,10 @@ func _ready():
elif update_mode == 2:
set_notify_transform(true)
else:
if debug_messages == true:
if debug_messages:
print (name, " - IK_LookAt: Unknown update mode. NOT updating skeleton")
if Engine.editor_hint == true:
if Engine.editor_hint:
_setup_for_editor()
@@ -72,18 +72,18 @@ func _set_update(new_value):
# Based on the value of upate, change how we handle updating the skeleton
if update_mode == 0:
set_process(true)
if debug_messages == true:
if debug_messages:
print (name, " - IK_LookAt: updating skeleton using _process...")
elif update_mode == 1:
set_physics_process(true)
if debug_messages == true:
if debug_messages:
print (name, " - IK_LookAt: updating skeleton using _physics_process...")
elif update_mode == 2:
set_notify_transform(true)
if debug_messages == true:
if debug_messages:
print (name, " - IK_LookAt: updating skeleton using _notification...")
else:
if debug_messages == true:
if debug_messages:
print (name, " - IK_LookAt: NOT updating skeleton due to unknown update method...")
@@ -91,7 +91,7 @@ func _set_skeleton_path(new_value):
# Because get_node doesn't work in the first call, we just want to assign instead
# This is to get around a issue with NodePaths exposed to the editor
if first_call == true:
if first_call:
skeleton_path = new_value
return
@@ -99,7 +99,7 @@ func _set_skeleton_path(new_value):
skeleton_path = new_value
if skeleton_path == null:
if debug_messages == true:
if debug_messages:
print (name, " - IK_LookAt: No Nodepath selected for skeleton_path!")
return
@@ -107,17 +107,17 @@ func _set_skeleton_path(new_value):
var temp = get_node(skeleton_path)
if temp != null:
# If the node has the method "find_bone" then we can assume it is (likely) a skeleton
if temp.has_method("find_bone") == true:
if temp.has_method("find_bone"):
skeleton_to_use = temp
if debug_messages == true:
if debug_messages:
print (name, " - IK_LookAt: attached to (new) skeleton")
# If not, then it's (likely) not a skeleton
else:
skeleton_to_use = null
if debug_messages == true:
if debug_messages:
print (name, " - IK_LookAt: skeleton_path does not point to a skeleton!")
else:
if debug_messages == true:
if debug_messages:
print (name, " - IK_LookAt: No Nodepath selected for skeleton_path!")
@@ -125,7 +125,7 @@ func update_skeleton():
# NOTE: Because get_node doesn't work in _ready, we need to skip
# a call before doing anything.
if first_call == true:
if first_call:
first_call = false
if skeleton_to_use == null:
_set_skeleton_path(skeleton_path)
@@ -142,7 +142,7 @@ func update_skeleton():
# If no bone is found (-1), then return (and optionally print an error)
if bone == -1:
if debug_messages == true:
if debug_messages:
print (name, " - IK_LookAt: No bone in skeleton found with name [", bone_name, "]!")
return
@@ -162,7 +162,7 @@ func update_skeleton():
rest = rest.looking_at(target_pos, Vector3(0, 0, 1))
else:
rest = rest.looking_at(target_pos, Vector3(0, 1, 0))
if debug_messages == true:
if debug_messages:
print (name, " - IK_LookAt: Unknown look_at_axis value!")
# Get our rotation euler, and the bone's rotation euler
@@ -170,15 +170,15 @@ func update_skeleton():
var self_euler = global_transform.basis.orthonormalized().get_euler()
# If we using negative rotation, we flip our rotation euler
if use_negative_our_rot == true:
if use_negative_our_rot:
self_euler = -self_euler
# Apply our rotation euler, if wanted/required
if use_our_rotation_x == true:
if use_our_rotation_x:
rest_euler.x = self_euler.x
if use_our_rotation_y == true:
if use_our_rotation_y:
rest_euler.y = self_euler.y
if use_our_rotation_z == true:
if use_our_rotation_z:
rest_euler.z = self_euler.z
# Rotate the bone by the (potentially) changed euler angle(s)

View File

@@ -104,7 +104,7 @@ func process_input(delta):
if right_mouse_down == false:
right_mouse_down = true
if anim_done == true:
if anim_done:
if current_anim != "Aiming":
anim_player.play("Aiming")
current_anim = "Aiming"

View File

@@ -1,4 +1,3 @@
extends KinematicBody
# Member variables

View File

@@ -1,4 +1,3 @@
extends Camera
# Member variables

View File

@@ -1,4 +1,3 @@
extends Navigation
# Member variables

View File

@@ -1,4 +1,3 @@
extends RigidBody
# Member variables

View File

@@ -1,4 +1,3 @@
extends Area
# Member variables

View File

@@ -1,4 +1,3 @@
extends RigidBody
# Member variables

View File

@@ -1,4 +1,3 @@
extends Camera
# Member variables

View File

@@ -1,4 +1,3 @@
extends KinematicBody
# Member variables

View File

@@ -1,4 +1,3 @@
extends Control
# Member variables

View File

@@ -1,4 +1,3 @@
extends Camera
# Member variables

View File

@@ -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

View File

@@ -10,7 +10,6 @@ config_version=4
_global_script_classes=[ ]
_global_script_class_icons={
}
[application]

55
file_format.sh Executable file
View 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

View File

@@ -1,4 +1,3 @@
extends ColorPickerButton

View File

@@ -1,4 +1,3 @@
extends Panel

View File

@@ -1,4 +1,3 @@
extends Panel
func _on_back_pressed():

View File

@@ -1,4 +1,3 @@
extends Panel
func _on_english_pressed():

View File

@@ -1,4 +1,3 @@
extends Node
signal purchase_success(item_name)

View File

@@ -1,4 +1,3 @@
extends Control
onready var alert = get_node("alert")

View File

@@ -1,4 +1,3 @@
extends Control
# Member variables

View File

@@ -24,5 +24,4 @@ public class Mob : RigidBody2D
{
QueueFree();
}
}

View File

@@ -10,7 +10,6 @@ config_version=3
_global_script_classes=[ ]
_global_script_class_icons={
}
[application]

View File

@@ -20,4 +20,3 @@ func _exit_tree():

View File

@@ -15,4 +15,3 @@ func _exit_tree():

View File

@@ -1,4 +1,3 @@
extends Node2D
# Member variables

View File

@@ -1,4 +1,3 @@
extends Control