Compare commits

...

9 Commits

Author SHA1 Message Date
Aaron Franke
ab9be2e79d [3.0] Simplify list of branches in the README (#1255) 2025-10-02 16:39:50 -07:00
Rémi Verschelde
3e4f49cef7 Update README for new branches, matches Godot upstream
(cherry picked from commit c0180d20d1)
2023-02-28 18:37:18 +01:00
Aaron Franke
a3c35ce2be [3.0] Update README for the new 3.3 branch 2021-11-05 10:15:40 -05:00
Aaron Franke
74a5c91794 Merge pull request #609 from aaronfranke/3.0-readme-license-3.2
[3.0] Update README for the new 3.2 branch
2021-04-21 03:51:11 -05:00
Aaron Franke
9ac0b6f58b [3.0] Update README for the new 3.2 branch 2021-04-04 01:16:02 -04:00
Aaron Franke
6501f329b7 Merge pull request #403 from aaronfranke/3.0-readme-license
[3.0] Update README and LICENSE
2020-02-03 17:06:45 -05:00
Aaron Franke
8cbfd92486 [3.0] Update README and LICENSE 2020-02-03 17:02:37 -05:00
Rémi Verschelde
e113915c80 Merge pull request #333 from aaronfranke/3.0-no-bl
Remove "background load" demo from the 3.0 branch
2019-06-11 12:27:29 +02:00
Aaron Franke
ef5cec6aaf Remove "background load" demo from the 3.0 branch
This was created by reduz in 3.1 dev before alpha. The simplest solution is to require using Godot 3.1 to use this demo (and therefore removing it from the 3.0 branch).
2019-06-05 23:27:21 -04:00
123 changed files with 756 additions and 2204 deletions

16
.editorconfig Normal file
View File

@@ -0,0 +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

2
.gitattributes vendored Normal file
View File

@@ -0,0 +1,2 @@
# Normalize EOL for all files that Git considers text files.
* text=auto eol=lf

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

11
.gitignore vendored
View File

@@ -1,11 +1,22 @@
# Godot 4+ specific ignores
.godot/
# Godot-specific ignores
.import/
export.cfg
export_presets.cfg
# Dummy HTML5 export presets file for continuous integration
!.github/dist/export_presets.cfg
# Imported translations (automatically generated from CSV files)
*.translation
# Mono-specific ignores
.mono/
data_*/
mono_crash.*.json
# System/tool-specific ignores
.directory
.DS_Store
*~

View File

@@ -22,4 +22,4 @@ func _on_StartButton_pressed():
emit_signal("start_game")
func _on_MessageTimer_timeout():
$MessageLabel.hide()
$MessageLabel.hide()

View File

@@ -1,94 +1,94 @@
Copyright 2011-2016 Severin Meyer <sev.ch@web.de>,
with Reserved Font Name Xolonium.
This Font Software is licensed under the SIL Open Font License,
Version 1.1. This license is copied below, and is also available
with a FAQ at <http://scripts.sil.org/OFL>
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
Copyright 2011-2016 Severin Meyer <sev.ch@web.de>,
with Reserved Font Name Xolonium.
This Font Software is licensed under the SIL Open Font License,
Version 1.1. This license is copied below, and is also available
with a FAQ at <http://scripts.sil.org/OFL>
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

View File

@@ -24,7 +24,7 @@ size_flags_vertical = 4
custom_fonts/bold_font = ExtResource( 1 )
custom_fonts/normal_font = ExtResource( 2 )
bbcode_enabled = true
bbcode_text = "This example shows how to apply the State programming pattern in GDscript, including Hierarchical States, and a pushdown automaton.
bbcode_text = "This example shows how to apply the State programming pattern in GDscript, including Hierarchical States, and a pushdown automaton.
States are common in games. You can use the pattern to:
@@ -37,7 +37,7 @@ visible_characters = -1
percent_visible = 1.0
meta_underlined = true
tab_size = 4
text = "This example shows how to apply the State programming pattern in GDscript, including Hierarchical States, and a pushdown automaton.
text = "This example shows how to apply the State programming pattern in GDscript, including Hierarchical States, and a pushdown automaton.
States are common in games. You can use the pattern to:

View File

@@ -1,5 +1,5 @@
"""
The Player is a KinematicBody2D, in other words a physics-driven object.
The Player is a KinematicBody2D, in other words a physics-driven object.
It can move, collide with the world...
It HAS a state machine, but the body and the state machine are separate.
"""

View File

@@ -1,6 +1,6 @@
"""
The stagger state end with the stagger animation from the AnimationPlayer
The animation only affects the Body Sprite"s modulate property so
The animation only affects the Body Sprite"s modulate property so
it could stack with other animations if we had two AnimationPlayer nodes
"""
extends "res://state_machine/state.gd"

View File

@@ -12,7 +12,7 @@ signal state_changed(current_state)
"""
You must set a starting node from the inspector or on
the node that inherits from this state machine interface
If you don't the game will crash (on purpose, so you won't
If you don't the game will crash (on purpose, so you won't
forget to initialize the state machine)
"""
export(NodePath) var START_STATE
@@ -58,14 +58,14 @@ func _change_state(state_name):
if not _active:
return
current_state.exit()
if state_name == "previous":
states_stack.pop_front()
else:
states_stack[0] = states_map[state_name]
current_state = states_stack[0]
emit_signal("state_changed", current_state)
if state_name != "previous":
current_state.enter()

View File

@@ -16,7 +16,7 @@ func get_cell_pawn(coordinates):
func request_move(pawn, direction):
var cell_start = world_to_map(pawn.position)
var cell_target = cell_start + direction
var cell_target_type = get_cellv(cell_target)
match cell_target_type:
EMPTY:

View File

@@ -44,7 +44,7 @@ func move_to(target_position):
# Stop the function execution until the animation finished
yield($AnimationPlayer, "animation_finished")
set_process(true)

View File

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

View File

@@ -9,7 +9,7 @@ const MOTION_SPEED = 160 # Pixels/second
func _physics_process(delta):
var motion = Vector2()
if Input.is_action_pressed("move_up"):
motion += Vector2(0, -1)
if Input.is_action_pressed("move_bottom"):
@@ -18,7 +18,7 @@ func _physics_process(delta):
motion += Vector2(-1, 0)
if Input.is_action_pressed("move_right"):
motion += Vector2(1, 0)
motion = motion.normalized() * MOTION_SPEED
move_and_slide(motion)

View File

@@ -9,7 +9,7 @@ const MOTION_SPEED = 160 # Pixels/second
func _physics_process(delta):
var motion = Vector2()
if Input.is_action_pressed("move_up"):
motion += Vector2(0, -1)
if Input.is_action_pressed("move_bottom"):
@@ -18,7 +18,7 @@ func _physics_process(delta):
motion += Vector2(-1, 0)
if Input.is_action_pressed("move_right"):
motion += Vector2(1, 0)
motion = motion.normalized() * MOTION_SPEED
move_and_slide(motion)

View File

@@ -27,13 +27,13 @@ var prev_jump_pressed = false
func _physics_process(delta):
# Create forces
var force = Vector2(0, GRAVITY)
var walk_left = Input.is_action_pressed("move_left")
var walk_right = Input.is_action_pressed("move_right")
var jump = Input.is_action_pressed("jump")
var stop = true
if walk_left:
if velocity.x <= WALK_MIN_SPEED and velocity.x > -WALK_MAX_SPEED:
force.x -= WALK_FORCE
@@ -42,34 +42,34 @@ func _physics_process(delta):
if velocity.x >= -WALK_MIN_SPEED and velocity.x < WALK_MAX_SPEED:
force.x += WALK_FORCE
stop = false
if stop:
var vsign = sign(velocity.x)
var vlen = abs(velocity.x)
vlen -= STOP_FORCE * delta
if vlen < 0:
vlen = 0
velocity.x = vlen * vsign
# Integrate forces to velocity
velocity += force * delta
velocity += force * delta
# Integrate velocity into motion and move
velocity = move_and_slide(velocity, Vector2(0, -1))
if is_on_floor():
on_air_time = 0
if jumping and velocity.y > 0:
# If falling, no longer jumping
jumping = false
if on_air_time < JUMP_MAX_AIRBORNE_TIME and jump and not prev_jump_pressed and not jumping:
# Jump must also be allowed to happen if the character left the floor a little bit ago.
# Makes controls more snappy.
velocity.y = -JUMP_SPEED
jumping = true
on_air_time += delta
prev_jump_pressed = jump

View File

@@ -9,7 +9,7 @@ const MOTION_SPEED = 160 # Pixels/second
func _physics_process(delta):
var motion = Vector2()
if Input.is_action_pressed("move_up"):
motion += Vector2(0, -1)
if Input.is_action_pressed("move_bottom"):
@@ -18,7 +18,7 @@ func _physics_process(delta):
motion += Vector2(-1, 0)
if Input.is_action_pressed("move_right"):
motion += Vector2(1, 0)
motion = motion.normalized() * MOTION_SPEED
move_and_slide(motion)

View File

@@ -183,4 +183,4 @@ func _set_path_end_position(value):
set_cell(value.x, value.y, 2)
path_end_position = value
if path_start_position != value:
_recalculate_path()
_recalculate_path()

View File

@@ -26,7 +26,7 @@ func _pre_explode():
$shape1.queue_free()
$shape2.queue_free()
$shape3.queue_free()
# Stay there
mode = MODE_STATIC
$sound_explode.play()
@@ -40,13 +40,13 @@ func _integrate_forces(s):
new_anim = "explode"
elif state == STATE_WALKING:
new_anim = "walk"
var wall_side = 0.0
for i in range(s.get_contact_count()):
var cc = s.get_contact_collider_object(i)
var dp = s.get_contact_local_normal(i)
if cc:
if cc is bullet_class and not cc.disabled:
mode = MODE_RIGID
@@ -57,12 +57,12 @@ func _integrate_forces(s):
cc.disable()
$sound_hit.play()
break
if dp.x > 0.9:
wall_side = 1.0
elif dp.x < -0.9:
wall_side = -1.0
if wall_side != 0 and wall_side != direction:
direction = -direction
$sprite.scale.x = -direction
@@ -72,11 +72,11 @@ func _integrate_forces(s):
elif direction > 0 and not rc_right.is_colliding() and rc_left.is_colliding():
direction = -direction
$sprite.scale.x = -direction
lv.x = direction * WALK_SPEED
if anim != new_anim:
anim = new_anim
$anim.play(anim)
s.set_linear_velocity(lv)

View File

@@ -11,5 +11,5 @@ func _physics_process(delta):
accum = fmod(accum, PI * 2.0)
var d = sin(accum)
var xf = Transform2D()
xf[2]= motion * d
xf[2]= motion * d
$platform.transform = xf

View File

@@ -13,12 +13,12 @@ extends RigidBody2D
# -Interaction with other physics-based objects is free
# -Only have to deal with the object linear velocity, not position
# -All collision/area framework available
#
#
# But also has the following disadvantages:
#
#
# -Objects may bounce a little bit sometimes
# -Going up ramps sends the chracter flying up, small hack is needed.
# -A ray collider is needed to avoid sliding down on ramps and
# -A ray collider is needed to avoid sliding down on ramps and
# undesiderd bumps, small steps and rare numerical precision errors.
# (another alternative may be to turn on friction when the character is not moving).
# -Friction cant be used, so floor velocity must be considered
@@ -55,38 +55,38 @@ onready var enemy = load("res://enemy.tscn")
func _integrate_forces(s):
var lv = s.get_linear_velocity()
var step = s.get_step()
var new_anim = anim
var new_siding_left = siding_left
# Get the controls
var move_left = Input.is_action_pressed("move_left")
var move_right = Input.is_action_pressed("move_right")
var jump = Input.is_action_pressed("jump")
var shoot = Input.is_action_pressed("shoot")
var spawn = Input.is_action_pressed("spawn")
if spawn:
var e = enemy.instance()
var p = position
p.y = p.y - 100
e.position = p
get_parent().add_child(e)
# Deapply prev floor velocity
lv.x -= floor_h_velocity
floor_h_velocity = 0.0
# Find the floor (a contact with upwards facing collision normal)
var found_floor = false
var floor_index = -1
for x in range(s.get_contact_count()):
var ci = s.get_contact_local_normal(x)
if ci.dot(Vector2(0, -1)) > 0.6:
found_floor = true
floor_index = x
# A good idea when implementing characters of all kinds,
# compensates for physics imprecision, as well as human reaction delay.
if shoot and not shooting:
@@ -98,24 +98,24 @@ func _integrate_forces(s):
else:
ss = 1.0
var pos = position + $bullet_shoot.position * Vector2(ss, 1.0)
bi.position = pos
get_parent().add_child(bi)
bi.linear_velocity = Vector2(800.0 * ss, -80)
$sprite/smoke.restart()
$sound_shoot.play()
add_collision_exception_with(bi) # Make bullet and this not collide
else:
shoot_time += step
if found_floor:
airborne_time = 0.0
else:
airborne_time += step # Time it spent in the air
var on_floor = airborne_time < MAX_FLOOR_AIRBORNE_TIME
# Process jump
@@ -125,10 +125,10 @@ func _integrate_forces(s):
jumping = false
elif not jump:
stopping_jump = true
if stopping_jump:
lv.y += STOP_JUMP_FORCE * step
if on_floor:
# Process logic when character is on floor
if move_left and not move_right:
@@ -143,14 +143,14 @@ func _integrate_forces(s):
if xv < 0:
xv = 0
lv.x = sign(lv.x) * xv
# Check jump
if not jumping and jump:
lv.y = -JUMP_VELOCITY
jumping = true
stopping_jump = false
$sound_jump.play()
# Check siding
if lv.x < 0 and move_left:
new_siding_left = true
@@ -182,7 +182,7 @@ func _integrate_forces(s):
if xv < 0:
xv = 0
lv.x = sign(lv.x) * xv
if lv.y < 0:
if shoot_time < MAX_SHOOT_POSE_TIME:
new_anim = "jumping_weapon"
@@ -193,28 +193,28 @@ func _integrate_forces(s):
new_anim = "falling_weapon"
else:
new_anim = "falling"
# Update siding
if new_siding_left != siding_left:
if new_siding_left:
$sprite.scale.x = -1
else:
$sprite.scale.x = 1
siding_left = new_siding_left
# Change animation
if new_anim != anim:
anim = new_anim
$anim.play(anim)
shooting = shoot
# Apply floor velocity
if found_floor:
floor_h_velocity = s.get_contact_collider_velocity_at_position(floor_index).x
lv.x += floor_h_velocity
# Finally, apply gravity and set back the linear velocity
lv += s.get_total_gravity() * step
s.set_linear_velocity(lv)

View File

@@ -13,4 +13,4 @@ func reset():
func _process(delta):
position += direction * speed * delta

View File

@@ -5,13 +5,13 @@ const MOVE_SPEED = 100
func _process(delta):
var which = get_name()
# move up and down based on input
if Input.is_action_pressed(which+"_move_up") and position.y > 0:
position.y -= MOVE_SPEED * delta
if Input.is_action_pressed(which+"_move_down") and position.y < get_viewport_rect().size.y:
position.y += MOVE_SPEED * delta
func _on_area_entered( area ):
if area.get_name() == "ball":

View File

@@ -15,7 +15,7 @@ func _ready():
continue
if not n.has_node("DialoguePlayer"):
continue
n.get_node("DialoguePlayer").connect("dialogue_finished", self,
n.get_node("DialoguePlayer").connect("dialogue_finished", self,
"_on_opponent_dialogue_finished", [n])
remove_child(combat_screen)
@@ -25,7 +25,7 @@ func _on_opponent_dialogue_finished(opponent):
var player = $Exploration/Grid/Player
var combatents = [player.combat_actor, opponent.combat_actor]
start_combat(combatents)
func start_combat(combat_actors):
remove_child($Exploration)
$AnimationPlayer.play("fade")
@@ -34,7 +34,7 @@ func start_combat(combat_actors):
combat_screen.show()
combat_screen.initialize(combat_actors)
$AnimationPlayer.play_backwards("fade")
func _on_combat_finished(winner, loser):
remove_child(combat_screen)
$AnimationPlayer.play_backwards("fade")

View File

@@ -15,7 +15,7 @@ func start_dialogue():
index_dialogue()
dialogue_text = dialogue_keys[current].text
dialogue_name = dialogue_keys[current].name
func next_dialogue():
current += 1
if current == dialogue_keys.size():
@@ -23,13 +23,13 @@ func next_dialogue():
return
dialogue_text = dialogue_keys[current].text
dialogue_name = dialogue_keys[current].name
func index_dialogue():
var dialogue = load_dialogue(dialogue_file)
dialogue_keys.clear()
for key in dialogue:
dialogue_keys.append(dialogue[key])
func load_dialogue(file_path):
var file = File.new()
if file.file_exists(file_path):

View File

@@ -21,7 +21,7 @@ func show_dialogue(player, dialogue):
$Name.text = dialogue_node.dialogue_name
$Text.text = dialogue_node.dialogue_text
func _on_Button_button_up():
dialogue_node.next_dialogue()
$Name.text = dialogue_node.dialogue_name

View File

@@ -19,7 +19,7 @@ func get_cell_pawn(cell, type = ACTOR):
func request_move(pawn, direction):
var cell_start = world_to_map(pawn.position)
var cell_target = cell_start + direction
var cell_tile_id = get_cellv(cell_target)
match cell_tile_id:
-1:
@@ -29,8 +29,8 @@ func request_move(pawn, direction):
OBJECT, ACTOR:
var target_pawn = get_cell_pawn(cell_target, cell_tile_id)
print("Cell %s contains %s" % [cell_target, target_pawn.name])
if not target_pawn.has_node("DialoguePlayer"):
return
get_node(dialogue_ui).show_dialogue(pawn, target_pawn.get_node("DialoguePlayer"))

View File

@@ -2,6 +2,6 @@ extends 'actor.gd'
func _ready():
set_process(false)
func get_input_direction():
return Vector2(0, 0)

View File

@@ -7,7 +7,7 @@ func get_input_direction():
return Vector2()
var random_x = DIRECTIONS[randi() % DIRECTIONS.size()]
var random_y = DIRECTIONS[randi() % DIRECTIONS.size()]
var random_axis = randi()%2
if random_axis > 0:
random_x = 0

View File

@@ -36,9 +36,9 @@ func move_to(target_position):
$Tween.interpolate_property($Pivot, "position", move_direction * 32, Vector2(), $AnimationPlayer.current_animation_length, Tween.TRANS_LINEAR, Tween.EASE_IN)
$Pivot/Sprite.position = position - target_position
position = target_position
yield($AnimationPlayer, "animation_finished")
set_process(true)
func bump():

View File

@@ -35,9 +35,9 @@ func move_to(target_position):
$Tween.interpolate_property($Pivot, "position", move_direction * 32, Vector2(), $AnimationPlayer.current_animation_length, Tween.TRANS_LINEAR, Tween.EASE_IN)
$Pivot/Sprite.position = position - target_position
position = target_position
yield($AnimationPlayer, "animation_finished")
set_process(true)
func bump():

View File

@@ -33,4 +33,4 @@ func clear_combat():
func finish_combat(winner, loser):
emit_signal("combat_finished", winner, loser)

View File

@@ -11,7 +11,7 @@ func set_active(value):
.set_active(value)
if not active:
return
$Timer.start()
yield($Timer, \"timeout\")
var target

View File

@@ -5,7 +5,7 @@ export (PackedScene) var info_scene
func _ready():
combatants_node = get_node(combatants_node)
func initialize():
for combatant in combatants_node.get_children():
var health = combatant.get_node("Health")

View File

@@ -10,12 +10,12 @@ func set_active(value):
active = value
set_process(value)
set_process_input(value)
if not active:
return
if $Health.armor >= $Health.base_armor + defense:
$Health.armor = $Health.base_armor
func attack(target):
target.take_damage(damage)
emit_signal("turn_finished")
@@ -27,10 +27,10 @@ func defend():
func consume(item):
item.use(self)
emit_signal("turn_finished")
func flee():
emit_signal("turn_finished")
func take_damage(damage):
$Health.take_damage(damage)
$Sprite/AnimationPlayer.play("take_damage")

View File

@@ -4,7 +4,7 @@ func set_active(value):
.set_active(value)
if not active:
return
$Timer.start()
yield($Timer, "timeout")
var target

View File

@@ -26,7 +26,7 @@ func get_next_in_queue():
queue.append(current_combatant)
self.active_combatant = queue[0]
return active_combatant
func remove(combatant):
var new_queue = []
for n in queue:

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;
}"
@@ -57,7 +56,7 @@ 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;
}
"
@@ -102,13 +101,12 @@ 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]
@@ -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,13 +175,12 @@ 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;
}
"
@@ -207,13 +202,12 @@ 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;
}
"
@@ -239,25 +233,24 @@ 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;

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

@@ -15,16 +15,16 @@ float a;
float maxa=col.a;
float mina=col.a;
a=texture(TEXTURE,UV+vec2(0,-outline_width)*ps).a;
maxa=max(a,maxa);
maxa=max(a,maxa);
mina=min(a,mina);
a=texture(TEXTURE,UV+vec2(0,outline_width)*ps).a;
maxa=max(a,maxa);
maxa=max(a,maxa);
mina=min(a,mina);
a=texture(TEXTURE,UV+vec2(-outline_width,0)*ps).a;
maxa=max(a,maxa);
maxa=max(a,maxa);
mina=min(a,mina);
a=texture(TEXTURE,UV+vec2(outline_width,0)*ps).a;
maxa=max(a,maxa);
maxa=max(a,maxa);
mina=min(a,mina);
COLOR=mix(col,outline_color,maxa-mina);
@@ -56,21 +56,21 @@ void fragment(){
float mina = col.a;
a = texture(TEXTURE, UV + vec2(0, -outline_width)*ps).a;
maxa = max(a, maxa);
maxa = max(a, maxa);
mina = min(a, mina);
a = texture(TEXTURE, UV + vec2(0, outline_width)*ps).a;
maxa = max(a, maxa);
maxa = max(a, maxa);
mina = min(a, mina);
a = texture(TEXTURE, UV + vec2(-outline_width,0)*ps).a;
maxa = max(a, maxa);
maxa = max(a, maxa);
mina = min(a, mina);
a = texture(TEXTURE, UV + vec2(outline_width, 0)*ps).a;
maxa = max(a, maxa);
maxa = max(a, maxa);
mina = min(a, mina);
COLOR = mix(col, outline_color, maxa-mina);
}"
@@ -89,7 +89,7 @@ render_mode blend_premul_alpha;
//this shader only works properly with premultiplied alpha blend mode
uniform float aura_width = 2.0;
uniform vec4 aura_color:hint_color;
uniform vec4 aura_color:hint_color;
void fragment(){
vec4 col = texture(TEXTURE, UV);
@@ -97,30 +97,30 @@ void fragment(){
float a;
float maxa = col.a;
float mina = col.a;
a = texture(TEXTURE, UV + vec2(0, -aura_width)*ps).a;
maxa = max(a, maxa);
maxa = max(a, maxa);
mina = min(a, mina);
a = texture(TEXTURE, UV + vec2(0, aura_width)*ps).a;
maxa = max(a, maxa);
maxa = max(a, maxa);
mina = min(a, mina);
a = texture(TEXTURE, UV + vec2(-aura_width, 0)*ps).a;
maxa = max(a, maxa);
maxa = max(a, maxa);
mina = min(a, mina);
a = texture(TEXTURE, UV + vec2(aura_width, 0)*ps).a;
maxa = max(a, maxa);
maxa = max(a, maxa);
mina = min(a, mina);
col.rgb *= col.a;
COLOR = col;
float auraa = (maxa-mina);
COLOR.rgb += aura_color.rgb*(auraa);
}"
[sub_resource type="ShaderMaterial" id=7]
@@ -141,13 +141,13 @@ uniform float radius = 4.0;
void fragment(){
vec4 col = texture(TEXTURE, UV);
vec2 ps = TEXTURE_PIXEL_SIZE;
col += texture(TEXTURE, UV + vec2(0, -radius)*ps);
col += texture(TEXTURE, UV + vec2(0, radius)*ps);
col += texture(TEXTURE, UV + vec2(-radius, 0)*ps);
col += texture(TEXTURE, UV + vec2(radius, 0)*ps);
col /= 5.0;
COLOR = col;
}"
@@ -168,13 +168,13 @@ uniform float fattyness = 2.0;
void fragment(){
vec2 ruv = UV - vec2(0.5,0.5);
vec2 dir = normalize(ruv);
float len = length(ruv);
float len = length(ruv);
len = pow(len*2.0, fattyness)*0.5;
ruv = len*dir;
vec4 col = texture(TEXTURE, ruv + vec2(0.5, 0.5));
COLOR = col;
}"
@@ -195,9 +195,9 @@ uniform vec4 modulate:hint_color;
void fragment(){
vec2 ps = TEXTURE_PIXEL_SIZE;
vec4 shadow = texture(TEXTURE, UV + vec2(-radius, -radius)*ps);
shadow += texture(TEXTURE, UV + vec2(-radius, 0)*ps);
shadow += texture(TEXTURE, UV + vec2(-radius, radius)*ps);
shadow += texture(TEXTURE, UV + vec2(0, -radius)*ps);
@@ -207,7 +207,7 @@ void fragment(){
shadow += texture(TEXTURE, UV + vec2(radius, radius)*ps);
shadow /= 8.0;
shadow *= modulate;
vec4 col = texture(TEXTURE, UV);
COLOR = mix(shadow, col, col.a);
}"
@@ -230,10 +230,10 @@ uniform vec4 modulate:hint_color;
void fragment(){
vec2 ps = TEXTURE_PIXEL_SIZE;
vec4 shadow = vec4(modulate.rgb, texture(TEXTURE, UV - offset*ps).a*modulate.a);
vec4 col = texture(TEXTURE, UV);
COLOR = mix(shadow, col, col.a);
}"
@@ -253,9 +253,8 @@ render_mode blend_mix;
uniform vec4 modulate:hint_color;
void fragment(){
COLOR = vec4(modulate.rgb, texture(TEXTURE, UV).a*modulate.a);
}"
[sub_resource type="ShaderMaterial" id=17]
@@ -278,7 +277,7 @@ void fragment(){
vec2 ps = TEXTURE_PIXEL_SIZE;
vec4 col = texture(TEXTURE, UV);
vec4 glow = col;
glow += texture(TEXTURE, UV + vec2(-r, -r)*ps);
glow += texture(TEXTURE, UV + vec2(-r, 0)*ps);
glow += texture(TEXTURE, UV + vec2(-r, r)*ps);
@@ -287,7 +286,7 @@ void fragment(){
glow += texture(TEXTURE, UV + vec2(r, -r)*ps);
glow += texture(TEXTURE, UV + vec2(r, 0)*ps);
glow += texture(TEXTURE, UV + vec2(r, r)*ps);
r *= 2.0;
glow += texture(TEXTURE, UV + vec2(-r, -r)*ps);
glow += texture(TEXTURE, UV + vec2(-r, 0)*ps);
@@ -297,13 +296,13 @@ void fragment(){
glow += texture(TEXTURE, UV + vec2(r, -r)*ps);
glow += texture(TEXTURE, UV + vec2(r, 0)*ps);
glow += texture(TEXTURE, UV + vec2(r, r)*ps);
glow /= 17.0;
glow *= amount;
col.rgb *= col.a;
COLOR = glow + col;
}"
[sub_resource type="ShaderMaterial" id=19]
@@ -322,13 +321,12 @@ 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);
col.a *= pow(a, amount);
COLOR = col;
}"

View File

@@ -47,48 +47,48 @@ var first_call = true
var debug_messages = false
func _ready():
if (target == null):
# NOTE: you HAVE to have a node called target as a child of this node!
# so we create one if one doesn't already exist
if has_node("target") == false:
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)
target.name = "target"
else:
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:
if has_node("middle_joint_target") == false:
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)
middle_joint_target.name = "middle_joint_target"
else:
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
_make_bone_nodes()
# Make sure we're using the right update mode
_set_update_mode(update_mode)
@@ -123,11 +123,11 @@ func _make_editor_sphere_at_node(node, color):
func _set_update_mode(new_value):
update_mode = new_value
set_process(false)
set_physics_process(false)
set_notify_transform(false)
if update_mode == 0:
set_process(true)
elif update_mode == 1:
@@ -135,44 +135,44 @@ 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
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 #############
@@ -181,33 +181,33 @@ func _set_skeleton_path(new_value):
func _make_bone_nodes():
# Remove all of the old bone nodes
# TODO: (not a huge concern, as these can be removed in the editor)
for bone in range(0, bones_in_chain.size()):
var bone_name = bones_in_chain[bone]
if has_node(bone_name) == false:
var new_node = Spatial.new()
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)
bone_nodes[bone].name = bone_name
else:
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))
func _set_bone_chain_bones(new_value):
bones_in_chain = new_value
_make_bone_nodes()
func _set_bone_chain_lengths(new_value):
@@ -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()
@@ -235,71 +235,71 @@ func _notification(what):
############# IK SOLVER RELATED FUNCTIONS #############
func update_skeleton():
#### ERROR CHECKING conditions
if first_call == true:
if first_call:
_set_skeleton_path(skeleton_path)
first_call = false
if skeleton == null:
_set_skeleton_path(skeleton_path)
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
################################
# Set all of the bone IDs in bone_IDs, if they are not already made
var i = 0
if bone_IDs.size() <= 0:
for bone_name in bones_in_chain:
bone_IDs[bone_name] = skeleton.find_bone(bone_name)
# Set the bone node to the currect bone position
bone_nodes[i].global_transform = get_bone_transform(i)
# If this is not the last bone in the bone chain, make it look at the next bone in the bone chain
if i < bone_IDs.size()-1:
bone_nodes[i].look_at(get_bone_transform(i+1).origin + skeleton.global_transform.origin, Vector3(0, 1, 0))
i += 1
# Set the total length of the bone chain, if it is not already set
if total_length == null:
total_length = 0
for bone_length in bones_in_chain_lengths:
total_length += bone_length
# Solve the bone chain
solve_chain()
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
# Update the origin with the current bone's origin
chain_origin = get_bone_transform(0)
# Get the direction of the final bone by using the next to last bone if there is more than 2 bones.
# If there are only 2 bones, we use the target's forward Z vector instead (not ideal, but it works fairly well)
#var dir = -target.global_transform.basis.z.normalized()
@@ -308,58 +308,58 @@ func solve_chain():
dir = bone_nodes[bone_nodes.size()-2].global_transform.basis.z.normalized()
else:
dir = -target.global_transform.basis.z.normalized()
# Get the target position (accounting for the final bone and it's length)
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
# Get the distance from the origin to the target
var distance = (chain_origin.origin - target_pos).length()
# If the distance is farther than our total reach, the target cannot be reached.
# Make the bone chain a straight line pointing towards the target
if distance > total_length:
for i in range (0, bones_in_chain.size()):
# Create a direct line to target and make this bone travel down that line
var r = (target_pos - bone_nodes[i].global_transform.origin).length()
var l = bones_in_chain_lengths[i] / r
# Find new join position
var new_pos = (1-l) * bone_nodes[i].global_transform.origin + l * target_pos
# Apply it to the bone node
bone_nodes[i].look_at(new_pos, Vector3(0, 1, 0))
bone_nodes[i].global_transform.origin = new_pos
# Apply the rotation to the first node in the bone chain, making it look at the next bone in the bone chain
bone_nodes[0].look_at(bone_nodes[1].global_transform.origin, Vector3(0, 1, 0))
# If the distance is NOT farther than our total reach, the target can be reached.
else:
# Get the difference between our end effector (the final bone in the chain) and the target
var dif = (bone_nodes[bone_nodes.size()-1].global_transform.origin - target_pos).length()
# Check to see if the distance from the end effector to the target is within our error margin (CHAIN_TOLERANCE).
# If it not, move the chain towards the target (going forwards, backwards, and then applying rotation)
while dif > CHAIN_TOLERANCE:
chain_backward()
chain_forward()
chain_apply_rotation()
# Update the difference between our end effector (the final bone in the chain) and the target
dif = (bone_nodes[bone_nodes.size()-1].global_transform.origin - target_pos).length()
# Add one to chain_iterations. If we have reached our max iterations, then break
chain_iterations = chain_iterations + 1
if chain_iterations >= CHAIN_MAX_ITER:
break
# Reset the bone node transforms to the skeleton bone transforms
#if (constrained == false): # Resetting seems to break bone constraints...
for i in range(0, bone_nodes.size()):
@@ -369,7 +369,7 @@ func solve_chain():
func chain_backward():
# Backward reaching pass
# Get the direction of the final bone by using the next to last bone if there is more than 2 bones.
# If there are only 2 bones, we use the target's forward Z vector instead (not ideal, but it works fairly well)
var dir
@@ -377,16 +377,16 @@ func chain_backward():
dir = bone_nodes[bone_nodes.size()-2].global_transform.basis.z.normalized()
else:
dir = -target.global_transform.basis.z.normalized()
# Set the position of the end effector (the final bone in the chain) to the target position
bone_nodes[bone_nodes.size()-1].global_transform.origin = target.global_transform.origin + (dir * bones_in_chain_lengths[bone_nodes.size()-1])
# For all of the other bones, move them towards the target
var i = bones_in_chain.size() - 1
while i >= 1:
i -= 1
var r = bone_nodes[i+1].global_transform.origin - bone_nodes[i].global_transform.origin
var l = bones_in_chain_lengths[i] / r.length()
# Apply the new joint position
@@ -395,90 +395,90 @@ func chain_backward():
func chain_forward():
# Forward reaching pass
# Set root at initial position
bone_nodes[0].global_transform.origin = chain_origin.origin
# Go through every bone in the bone chain
var i = 0
while i < bones_in_chain.size() - 1:
var r = (bone_nodes[i+1].global_transform.origin - bone_nodes[i].global_transform.origin)
var l = bones_in_chain_lengths[i] / r.length()
# Set the new joint position
var new_pos = (1 - l) * bone_nodes[i].global_transform.origin + l * bone_nodes[i+1].global_transform.origin
# Apply the new joint position, (potentially with constraints), to the bone node
bone_nodes[i+1].global_transform.origin = new_pos
i += 1
func chain_apply_rotation():
# Make all of the bones rotated correctly.
# For each bone in the bone chain
for i in range(0, bones_in_chain.size()):
# Get the bone's transform, NOT converted to world space
var bone_trans = get_bone_transform(i, false)
# If this is the last bone in the bone chain, rotate the bone so it faces
# the same direction as the next to last bone in the bone chain if there are more than
# two bones. If there are only two bones, rotate the end effector towards the target
if i == bones_in_chain.size()-1:
if bones_in_chain.size() > 2:
# Get the bone node for this bone, and the previous bone
var b_target = bone_nodes[i].global_transform
var b_target_two = bone_nodes[i-1].global_transform
# Convert the bone nodes positions from world space to bone/skeleton space
b_target.origin = skeleton.global_transform.xform_inv(b_target.origin)
b_target_two.origin = skeleton.global_transform.xform_inv(b_target_two.origin)
# Get the direction that the previous bone is pointing towards
var dir = (target.global_transform.origin - b_target_two.origin).normalized()
# Make this bone look in the same the direction as the last bone
bone_trans = bone_trans.looking_at(b_target.origin + dir, Vector3(0, 1, 0))
else:
var b_target = target.global_transform
b_target.origin = skeleton.global_transform.xform_inv(b_target.origin)
bone_trans = bone_trans.looking_at(b_target.origin, Vector3(0, 1, 0))
# If this is NOT the last bone in the bone chain, rotate the bone to look at the next
# bone in the bone chain.
else:
# Get the bone node for this bone, and the next bone
var b_target = bone_nodes[i].global_transform
var b_target_two = bone_nodes[i+1].global_transform
# Convert the bone nodes positions from world space to bone/skeleton space
b_target.origin = skeleton.global_transform.xform_inv(b_target.origin)
b_target_two.origin = skeleton.global_transform.xform_inv(b_target_two.origin)
# Get the direction towards the next bone
var dir = (b_target_two.origin - b_target.origin).normalized()
# Make this bone look towards the direction of the next bone
bone_trans = bone_trans.looking_at(b_target.origin + dir, Vector3(0, 1, 0))
# The the bone's (updated) transform
set_bone_transform(i, bone_trans)
func get_bone_transform(bone, convert_to_world_space=true):
# Get the global transform of the bone
var ret = skeleton.get_bone_global_pose(bone_IDs[bones_in_chain[bone]])
# 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

@@ -17,11 +17,11 @@ var first_call = true
const empty_vector = Vector3()
func _ready():
set_process(false)
set_physics_process(false)
set_notify_transform(false)
if update_mode == 0:
set_process(true)
elif update_mode == 1:
@@ -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()
@@ -63,96 +63,96 @@ func _setup_for_editor():
func _set_update(new_value):
update_mode = new_value
# Set all of our processes to false
set_process(false)
set_physics_process(false)
set_notify_transform(false)
# 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...")
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
# Assign skeleton_path to whatever value is passed
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
# Get the node at that location, if there is one
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!")
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)
# If we do not have a skeleton and/or we're not supposed to update, then return.
if skeleton_to_use == null:
return
if update_mode >= 3:
return
# Get the bone
var bone = skeleton_to_use.find_bone(bone_name)
# 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
# get the bone's rest position, and our position
var rest = skeleton_to_use.get_bone_global_pose(bone)
var our_position = global_transform.origin
# Convert our position relative to the skeleton's transform
var target_pos = skeleton_to_use.global_transform.xform_inv(global_transform.origin)
# Call helper's look_at function with the chosen up axis.
if look_at_axis == 0:
rest = rest.looking_at(target_pos, Vector3(1, 0, 0))
@@ -162,34 +162,34 @@ 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
var rest_euler = rest.basis.get_euler()
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)
rest.basis = Basis(rest_euler)
# If we have additional rotation, then rotate it by the local rotation vectors
if additional_rotation != empty_vector:
rest.basis = rest.basis.rotated(rest.basis.x, deg2rad(additional_rotation.x))
rest.basis = rest.basis.rotated(rest.basis.y, deg2rad(additional_rotation.y))
rest.basis = rest.basis.rotated(rest.basis.z, deg2rad(additional_rotation.z))
# Finally, apply the bone rotation to the skeleton
skeleton_to_use.set_bone_global_pose(bone, rest)
@@ -202,4 +202,4 @@ func _physics_process(delta):
update_skeleton()
func _notification(what):
if what == NOTIFICATION_TRANSFORM_CHANGED:
update_skeleton()
update_skeleton()

View File

@@ -3,19 +3,19 @@ extends EditorPlugin
func _enter_tree():
# Plugin Initialization here!
# ------ IK STUFF ------
add_custom_type("IK_LookAt", "Spatial", preload("ik_look_at.gd"), preload("ik_look_at.png"))
add_custom_type("IK_FABRIK", "Spatial", preload("ik_fabrik.gd"), preload("ik_fabrik.png"))
# ------ ---------- ------
func _exit_tree():
# Plugin Clean-up here!
# ------ IK STUFF ------
remove_custom_type("IK_LookAt")
remove_custom_type("IK_FABRIK")
# ------ ---------- ------

View File

@@ -56,16 +56,16 @@ var simple_bullet = preload("res://simple_bullet.tscn")
func _ready():
camera = get_node("CameraHolder/Lean_Path/PathFollow/IK_LookAt_Chest/Camera")
camera_holder = get_node("CameraHolder")
path_follow_node = get_node("CameraHolder/Lean_Path/PathFollow")
anim_player = get_node("CameraHolder/AnimationPlayer")
anim_player.connect("animation_finished", self, "animation_finished")
pistol_end = get_node("CameraHolder/Weapon/Pistol/Pistol_end")
set_physics_process(true)
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
set_process_input(true)
@@ -77,12 +77,12 @@ func _physics_process(delta):
func process_input(delta):
# Reset dir, so our previous movement does not effect us
dir = Vector3()
# Get the camera's global transform so we can use its directional vectors
var cam_xform = camera.get_global_transform()
# ----------------------------------
# Walking
if Input.is_key_pressed(KEY_UP) or Input.is_key_pressed(KEY_W):
@@ -93,33 +93,33 @@ func process_input(delta):
dir += -cam_xform.basis[0]
if Input.is_key_pressed(KEY_RIGHT) or Input.is_key_pressed(KEY_D):
dir += cam_xform.basis[0]
if Input.is_action_just_pressed("ui_cancel"):
if Input.get_mouse_mode() == Input.MOUSE_MODE_VISIBLE:
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
else:
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
if Input.is_mouse_button_pressed(2):
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"
else:
anim_player.play("Idle")
current_anim = "Idle"
anim_done = false
else:
right_mouse_down = false
if Input.is_mouse_button_pressed(1):
if left_mouse_timer <= 0:
left_mouse_timer = LEFT_MOUSE_FIRE_TIME
# Create a bullet
var new_bullet = simple_bullet.instance()
get_tree().root.add_child(new_bullet)
@@ -128,8 +128,8 @@ func process_input(delta):
if left_mouse_timer > 0:
left_mouse_timer -= delta
# ----------------------------------
# ----------------------------------
# Sprinting
if Input.is_key_pressed(KEY_SHIFT):
@@ -137,7 +137,7 @@ func process_input(delta):
else:
is_sprinting = false
# ----------------------------------
# ----------------------------------
# Jumping
if Input.is_key_pressed(KEY_SPACE):
@@ -148,8 +148,8 @@ func process_input(delta):
else:
jump_button_down = false
# ----------------------------------
# ----------------------------------
# Leaninng
if Input.is_key_pressed(KEY_Q):
@@ -165,7 +165,7 @@ func process_input(delta):
lean_value += 1 * delta
if lean_value > 0.5:
lean_value = 0.5
lean_value = clamp(lean_value, 0, 1)
path_follow_node.unit_offset = lean_value
if lean_value < 0.5:
@@ -175,27 +175,27 @@ func process_input(delta):
var lerp_value = (lean_value - 0.5) * 2
path_follow_node.rotation_degrees.z = (-20 * lerp_value)
# ----------------------------------
func process_movement(delta):
var grav = norm_grav
dir.y = 0
dir = dir.normalized()
vel.y += delta*grav
var hvel = vel
hvel.y = 0
var target = dir
if is_sprinting:
target *= MAX_SPRINT_SPEED
else:
target *= MAX_SPEED
var accel
if dir.dot(hvel) > 0:
if is_sprinting == false:
@@ -204,32 +204,32 @@ func process_movement(delta):
accel = SPRINT_ACCEL
else:
accel = DEACCEL
hvel = hvel.linear_interpolate(target, accel*delta)
vel.x = hvel.x
vel.z = hvel.z
vel = move_and_slide(vel,Vector3(0,1,0))
# Mouse based camera movement
func _input(event):
if event is InputEventMouseMotion && Input.get_mouse_mode() == Input.MOUSE_MODE_CAPTURED:
rotate_y(deg2rad(event.relative.x * MOUSE_SENSITIVITY * -1))
camera_holder.rotate_x(deg2rad(event.relative.y * MOUSE_SENSITIVITY))
# We need to clamp the camera's rotation so we cannot rotate ourselves upside down
var camera_rot = camera_holder.rotation_degrees
if camera_rot.x < -40:
camera_rot.x = -40
elif camera_rot.x > 60:
camera_rot.x = 60
camera_holder.rotation_degrees = camera_rot
else:
pass

View File

@@ -11,10 +11,10 @@ func _ready():
func _process(delta):
var mouse_to_world = project_local_ray_normal(get_viewport().get_mouse_position()) * MOVEMENT_SPEED
if flip_axis == false:
mouse_to_world.z *= -1
else:
mouse_to_world = -mouse_to_world
targets.transform.origin = mouse_to_world
targets.transform.origin = mouse_to_world

View File

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

View File

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

View File

@@ -22,7 +22,7 @@ var hdrs=[
]
func _ready():
for h in hdrs:
for h in hdrs:
get_node("ui/bg").add_item(h.name)
func _unhandled_input(ev):
@@ -36,9 +36,9 @@ func _unhandled_input(ev):
if zoom > 0:
zoom -= ZOOM_SPEED
get_node("camera/base/rotation/camera").translation.z = -zoom
if ev is InputEventMouseMotion and ev.button_mask & BUTTON_MASK_LEFT:
rot_y += ev.relative.x * ROT_SPEED
rot_y += ev.relative.x * ROT_SPEED
rot_x += ev.relative.y * ROT_SPEED
rot_y = clamp(rot_y, -180, 180)
rot_x = clamp(rot_x, 0, 150)
@@ -46,8 +46,8 @@ func _unhandled_input(ev):
t = t.rotated(Vector3(0, 0, 1), rot_x * PI / 180.0)
t = t.rotated(Vector3(0, 1, 0), -rot_y * PI / 180.0)
get_node("camera/base").transform.basis = t.basis
func _process(delta):
var xform = get_node("testers").get_child(tester_index).get_node("MeshInstance").global_transform
var p = xform.origin
@@ -55,17 +55,17 @@ func _process(delta):
var from_xform = get_node("camera").transform
var from_p = from_xform.origin
var from_r = Quat(from_xform.basis)
p = from_p.linear_interpolate(p, INTERP_SPEED * delta)
r = from_r.slerp(r, INTERP_SPEED * delta)
var m = Transform(r)
m.origin = p
get_node("camera").transform = m
get_node("ui/label").text = get_node("testers").get_child(tester_index).get_name()
func _on_prev_pressed():
if tester_index > 0:
tester_index -= 1

View File

@@ -1,4 +1,3 @@
extends Navigation
# Member variables
@@ -29,16 +28,16 @@ func _process(delta):
else:
path[path.size() - 1] = pfrom.linear_interpolate(pto, to_walk/d)
to_walk = 0
var atpos = path[path.size() - 1]
var atdir = to_watch
atdir.y = 0
var t = Transform()
t.origin = atpos
t = t.looking_at(atpos + atdir, Vector3(0, 1, 0))
get_node("robot_base").set_transform(t)
if path.size() < 2:
path = []
set_process(false)
@@ -72,12 +71,12 @@ func _input(event):
var from = get_node("cambase/Camera").project_ray_origin(event.position)
var to = from + get_node("cambase/Camera").project_ray_normal(event.position)*100
var p = get_closest_point_to_segment(from, to)
begin = get_closest_point(get_node("robot_base").get_translation())
end = p
_update_path()
if event is InputEventMouseMotion:
if event.button_mask&(BUTTON_MASK_MIDDLE+BUTTON_MASK_RIGHT):
camrot += event.relative.x * 0.005

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
@@ -22,15 +21,15 @@ func _integrate_forces(state):
lv += g * delta # Apply gravity
var up = -g.normalized()
if dying:
state.set_linear_velocity(lv)
return
for i in range(state.get_contact_count()):
var cc = state.get_contact_collider_object(i)
var dp = state.get_contact_local_normal(i)
if cc:
if cc is preload("res://bullet.gd") and not cc.disabled:
set_mode(MODE_RIGID)
@@ -43,15 +42,15 @@ func _integrate_forces(state):
cc.disabled = true
get_node("sound_hit").play()
return
var col_floor = get_node("Armature/ray_floor").is_colliding()
var col_wall = get_node("Armature/ray_wall").is_colliding()
var advance = not col_wall and col_floor
var dir = get_node("Armature").get_transform().basis[2].normalized()
var deaccel_dir = dir
if advance:
if dir.dot(lv) < max_speed:
lv += dir * accel * delta
@@ -59,17 +58,17 @@ func _integrate_forces(state):
else:
if prev_advance:
rot_dir = 1 # randf()*2.0 - 1.0
dir = Basis(up, rot_dir * rot_speed * delta).xform(dir)
get_node("Armature").set_transform(Transform().looking_at(-dir, up))
var dspeed = deaccel_dir.dot(lv)
dspeed -= deaccel * delta
if dspeed < 0:
dspeed = 0
lv = lv - deaccel_dir * deaccel_dir.dot(lv) + deaccel_dir * dspeed
state.set_linear_velocity(lv)
prev_advance = advance

View File

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

View File

@@ -1,4 +1,3 @@
extends KinematicBody
# Member variables
@@ -34,15 +33,15 @@ var shoot_blend = 0
func adjust_facing(p_facing, p_target, p_step, p_adjust_rate, current_gn):
var n = p_target # Normal
var t = n.cross(current_gn).normalized()
var x = n.dot(p_facing)
var y = t.dot(p_facing)
var ang = atan2(y,x)
if abs(ang) < 0.001: # Too small
return p_facing
var s = sign(ang)
ang = ang * s
var turn = ang * p_adjust_rate * p_step
@@ -52,12 +51,12 @@ func adjust_facing(p_facing, p_target, p_step, p_adjust_rate, current_gn):
else:
a = turn
ang = (ang - a) * s
return (n * cos(ang) + t * sin(ang)) * p_facing.length()
func _physics_process(delta):
var lv = linear_velocity
var g = Vector3(0, -9.8, 0)
@@ -65,19 +64,19 @@ func _physics_process(delta):
# if (d < 0):
# d = 0
lv += g * delta # Apply gravity
var anim = ANIM_FLOOR
var up = -g.normalized() # (up is against gravity)
var vv = up.dot(lv) # Vertical velocity
var hv = lv - up * vv # Horizontal velocity
var hdir = hv.normalized() # Horizontal direction
var hspeed = hv.length() # Horizontal speed
var dir = Vector3() # Where does the player intend to walk to
var cam_xform = get_node("target/camera").get_global_transform()
if Input.is_action_pressed("move_forward"):
dir += -cam_xform.basis[2]
if Input.is_action_pressed("move_backwards"):
@@ -86,15 +85,15 @@ func _physics_process(delta):
dir += -cam_xform.basis[0]
if Input.is_action_pressed("move_right"):
dir += cam_xform.basis[0]
var jump_attempt = Input.is_action_pressed("jump")
var shoot_attempt = Input.is_action_pressed("shoot")
var target_dir = (dir - up * dir.dot(up)).normalized()
if is_on_floor():
var sharp_turn = hspeed > 0.1 and rad2deg(acos(target_dir.dot(hdir))) > sharp_turn_threshold
if dir.length() > 0.1 and !sharp_turn:
if hspeed > 0.001:
#linear_dir = linear_h_velocity/linear_vel
@@ -105,26 +104,26 @@ func _physics_process(delta):
facing_dir = hdir
else:
hdir = target_dir
if hspeed < max_speed:
hspeed += accel * delta
else:
hspeed -= deaccel * delta
if hspeed < 0:
hspeed = 0
hv = hdir * hspeed
var mesh_xform = get_node("Armature").get_transform()
var facing_mesh = -mesh_xform.basis[0].normalized()
facing_mesh = (facing_mesh - up * facing_mesh.dot(up)).normalized()
if hspeed>0:
facing_mesh = adjust_facing(facing_mesh, target_dir, delta, 1.0/hspeed*turn_speed, up)
var m3 = Basis(-facing_mesh, up, -facing_mesh.cross(up).normalized()).scaled(CHAR_SCALE)
get_node("Armature").set_transform(Transform(m3, mesh_xform.origin))
if not jumping and jump_attempt:
vv = 7.0
jumping = true
@@ -134,7 +133,7 @@ func _physics_process(delta):
anim = ANIM_AIR_UP
else:
anim = ANIM_AIR_DOWN
var hs
if dir.length() > 0.1:
hv += target_dir * (accel * 0.2) * delta
@@ -146,22 +145,22 @@ func _physics_process(delta):
if hspeed < 0:
hspeed = 0
hv = hdir * hspeed
if jumping and vv < 0:
jumping = false
lv = hv + up*vv
if is_on_floor():
movement_dir = lv
linear_velocity = move_and_slide(lv,-g.normalized())
if shoot_blend > 0:
shoot_blend -= delta * SHOOT_SCALE
if (shoot_blend < 0):
shoot_blend = 0
if shoot_attempt and not prev_shoot:
shoot_blend = SHOOT_TIME
var bullet = preload("res://bullet.scn").instance()
@@ -170,12 +169,12 @@ func _physics_process(delta):
bullet.set_linear_velocity(get_node("Armature/bullet").get_global_transform().basis[2].normalized() * 20)
bullet.add_collision_exception_with(self) # Add it to bullet
get_node("sound_shoot").play()
prev_shoot = shoot_attempt
if is_on_floor():
get_node("AnimationTreePlayer").blend2_node_set_amount("walk", hspeed / max_speed)
get_node("AnimationTreePlayer").transition_node_set_current("state", anim)
get_node("AnimationTreePlayer").blend2_node_set_amount("gun", min(shoot_blend, 1.0))
# state.set_angular_velocity(Vector3())

View File

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

View File

@@ -1,4 +1,3 @@
extends Camera
# Member variables
@@ -16,27 +15,27 @@ func _physics_process(dt):
var target = get_parent().get_global_transform().origin
var pos = get_global_transform().origin
var up = Vector3(0, 1, 0)
var delta = pos - target
# Regular delta follow
# Check ranges
if (delta.length() < min_distance):
delta = delta.normalized()*min_distance
elif (delta.length() > max_distance):
delta = delta.normalized()*max_distance
# Check upper and lower height
if ( delta.y > max_height):
delta.y = max_height
if ( delta.y < min_height):
delta.y = min_height
pos = target + delta
look_at_from_position(pos, target, up)
# Turn a little up or down
var t = get_transform()
t.basis = Basis(t.basis[0], deg2rad(angle_v_adjust))*t.basis
@@ -52,6 +51,6 @@ func _ready():
break
else:
node = node.get_parent()
# This detaches the camera transform from the parent spatial node
set_as_toplevel(true)

View File

@@ -16,17 +16,17 @@ func _physics_process(delta):
steer_target = -STEER_LIMIT
else:
steer_target = 0
if Input.is_action_pressed("ui_up"):
engine_force = engine_force_value
else:
engine_force = 0
if Input.is_action_pressed("ui_down"):
brake = 1
else:
brake = 0.0
if steer_target < steer_angle:
steer_angle -= STEER_SPEED * delta
if steer_target > steer_angle:
@@ -35,5 +35,5 @@ func _physics_process(delta):
steer_angle += STEER_SPEED * delta
if steer_target < steer_angle:
steer_angle = steer_target
steering = steer_angle

View File

@@ -3,7 +3,8 @@
************************************************************************
Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur.
Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. \
Copyright (c) 2014-2021 Godot Engine contributors.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the

View File

@@ -4,19 +4,32 @@ Each folder containing a `project.godot` file is a demo project meant to
be used with [Godot Engine](https://godotengine.org), the open source
2D and 3D game engine.
## Important note
## Godot versions
- The `master` branch is compatible with the latest Godot version (currently 3.0).
- Use the appropriate branch for your Godot version, such as the
[`2.1`](https://github.com/godotengine/godot-demo-projects/tree/2.1) branch
for Godot 2.1.x.
- 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.
- [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
To import all demos at once in the project manager:
- Clone this repository or [download a ZIP archive](https://github.com/godotengine/godot-demo-projects/archive/3.0.zip).
- If you've downloaded a ZIP archive, extract it somewhere.
- Open the Godot project manager and click the **Scan** button on the right.
- Choose the path to the folder containing all demos.
- All demos should now appear in the project manager.
## Useful links
- [Main website](https://godotengine.org)
- [Source code](https://github.com/godotengine/godot)
- [Documentation](http://docs.godotengine.org)
- [Community hub](https://godotengine.org/community)
- [Main website](https://godotengine.org)
- [Source code](https://github.com/godotengine/godot)
- [Documentation](http://docs.godotengine.org)
- [Community hub](https://godotengine.org/community)
- [TPS demo](https://github.com/godotengine/tps-demo)
## License

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

@@ -99,6 +99,6 @@ func _ready():
var button = get_node("bindings").get_node(action).get_node("Button")
button.text = OS.get_scancode_string(input_event.scancode)
button.connect("pressed", self, "wait_for_input", [action])
# Do not start processing input until a button is pressed
set_process_input(false)

View File

@@ -152,4 +152,4 @@ TERMINATION
This license becomes null and void if any of the above conditions are not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.

View File

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

View File

@@ -3,9 +3,9 @@ Copyright (C) 2008 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

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,3 +1,3 @@
,en,es,ja
KEY_HELLO,Hello!,Hola!,こんにちは
KEY_PUSH,Push Me!,Aprétame!,押す
KEY_PUSH,Push Me!,Aprétame!,押す
1 en es ja
2 KEY_HELLO Hello! Hola! こんにちは
3 KEY_PUSH Push Me! Aprétame! 押す

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")
@@ -13,7 +12,7 @@ func _ready():
iap.connect("consume_success", self, "on_consume_success")
iap.connect("consume_fail", self, "on_consume_fail")
iap.connect("sku_details_complete", self, "on_sku_details_complete")
get_node("purchase").connect("pressed", self, "button_purchase")
get_node("consume").connect("pressed", self, "button_consume")
get_node("request").connect("pressed", self, "button_request")

View File

@@ -1,68 +0,0 @@
extends Control
var current_scene = null
var thread = null
onready var progress = $progress
var SIMULATED_DELAY_SEC = 1.0
func _thread_load(path):
var ril = ResourceLoader.load_interactive(path)
assert( ril )
var total = ril.get_stage_count()
# Call deferred to configure max load steps
progress.call_deferred("set_max",total)
var res = null
while (true): #iterate until we have a resource
# Update progress bar, use call deferred, which routes to main thread
progress.call_deferred("set_value",ril.get_stage())
# Simulate a delay
OS.delay_msec( SIMULATED_DELAY_SEC * 1000.0 )
# Poll (does a load step)
var err = ril.poll()
# if OK, then load another one. If EOF, it' s done. Otherwise there was an error.
if ( err == ERR_FILE_EOF):
#loading done, fetch resource
res = ril.get_resource()
break
elif (err != OK):
#Not OK, there was an error
print("There was an error loading")
break
# Send whathever we did (or not) get
call_deferred("_thread_done",res)
func _thread_done(resource):
assert( resource )
# Always wait for threads to finish, this is required on Windows
thread.wait_to_finish()
#Hide the progress bar
progress.hide()
# Instantiate new scene
var new_scene = resource.instance()
# Free current scene
get_tree().current_scene.free()
get_tree().current_scene = null
# Add new one to root
get_tree().root.add_child( new_scene )
# Set as current scene
get_tree().current_scene = new_scene
progress.visible = false
func load_scene(path):
thread = Thread.new()
thread.start( self, "_thread_load", path)
raise() #show on top
progress.visible = true

View File

@@ -1,45 +0,0 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://background_load.gd" type="Script" id=1]
[node name="bgload" type="Control" index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
script = ExtResource( 1 )
[node name="progress" type="ProgressBar" parent="." index="0"]
visible = false
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 7.0
margin_top = 8.0
margin_right = 207.0
margin_bottom = 22.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 0
min_value = 0.0
max_value = 100.0
step = 1.0
page = 0.0
value = 0.0
exp_edit = false
rounded = false
allow_greater = false
allow_lesser = false
percent_visible = true
_sections_unfolded = [ "Visibility" ]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 420 KiB

View File

@@ -1,29 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/painting_babel.jpg-bb6b7c64c260f78ce43012bcac8a1c4e.stex"
[deps]
source_file="res://painting_babel.jpg"
dest_files=[ "res://.import/painting_babel.jpg-bb6b7c64c260f78ce43012bcac8a1c4e.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 778 KiB

View File

@@ -1,29 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/painting_las_meninas.png-158bef53fe63c53626df2020827ea75b.stex"
[deps]
source_file="res://painting_las_meninas.png"
dest_files=[ "res://.import/painting_las_meninas.png-158bef53fe63c53626df2020827ea75b.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

View File

@@ -1,29 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/painting_mona_lisa.jpg-cefdc64dfa49e9ee9566b078597cd552.stex"
[deps]
source_file="res://painting_mona_lisa.jpg"
dest_files=[ "res://.import/painting_mona_lisa.jpg-cefdc64dfa49e9ee9566b078597cd552.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 KiB

View File

@@ -1,29 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/painting_old_guitarist.jpg-f04ba627b38b0def60d96cb6c0bfa12b.stex"
[deps]
source_file="res://painting_old_guitarist.jpg"
dest_files=[ "res://.import/painting_old_guitarist.jpg-f04ba627b38b0def60d96cb6c0bfa12b.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 KiB

View File

@@ -1,29 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/painting_parasol.jpg-2864da595fcb4f0e842ba9c49097a056.stex"
[deps]
source_file="res://painting_parasol.jpg"
dest_files=[ "res://.import/painting_parasol.jpg-2864da595fcb4f0e842ba9c49097a056.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 241 KiB

View File

@@ -1,29 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/painting_the_swing.jpg-1303041ac03cbc85efa4b07ce56efbc4.stex"
[deps]
source_file="res://painting_the_swing.jpg"
dest_files=[ "res://.import/painting_the_swing.jpg-1303041ac03cbc85efa4b07ce56efbc4.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View File

@@ -1,6 +0,0 @@
extends Node2D
func _on_switch_pressed():
$switch.hide()
background_load.load_scene("res://sculptures.tscn")

View File

@@ -1,229 +0,0 @@
[gd_scene load_steps=9 format=2]
[ext_resource path="res://paintings.gd" type="Script" id=1]
[ext_resource path="res://painting_parasol.jpg" type="Texture" id=2]
[ext_resource path="res://painting_babel.jpg" type="Texture" id=3]
[ext_resource path="res://painting_mona_lisa.jpg" type="Texture" id=4]
[ext_resource path="res://painting_las_meninas.png" type="Texture" id=5]
[ext_resource path="res://painting_old_guitarist.jpg" type="Texture" id=6]
[ext_resource path="res://painting_the_swing.jpg" type="Texture" id=7]
[sub_resource type="Animation" id=1]
resource_name = "move_around"
length = 4.0
loop = true
step = 0.1
tracks/0/type = "value"
tracks/0/path = NodePath("painting_mona_lisa:position")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 2 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Vector2( 117.659, 173.793 ), Vector2( 164.387, 206.955 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("painting_mona_lisa:rotation_degrees")
tracks/1/interp = 2
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 2 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ 0.0, 0.0 ]
}
tracks/2/type = "value"
tracks/2/path = NodePath("painting_parasol:position")
tracks/2/interp = 2
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0, 2 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Vector2( 451.448, 256.916 ), Vector2( 483.102, 317.21 ) ]
}
tracks/3/type = "value"
tracks/3/path = NodePath("painting_parasol:rotation_degrees")
tracks/3/interp = 2
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 0, 2 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ 0.0, 0.0 ]
}
tracks/4/type = "value"
tracks/4/path = NodePath("painting_the_swing:position")
tracks/4/interp = 2
tracks/4/loop_wrap = true
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/keys = {
"times": PoolRealArray( 0, 2 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Vector2( 715.927, 181.745 ), Vector2( 661.663, 205.863 ) ]
}
tracks/5/type = "value"
tracks/5/path = NodePath("painting_the_swing:rotation_degrees")
tracks/5/interp = 2
tracks/5/loop_wrap = true
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/keys = {
"times": PoolRealArray( 0, 2 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ 0.0, 0.0 ]
}
tracks/6/type = "value"
tracks/6/path = NodePath("painting_old_guitarist:position")
tracks/6/interp = 2
tracks/6/loop_wrap = true
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/keys = {
"times": PoolRealArray( 0, 2 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Vector2( 886.982, 185.641 ), Vector2( 901.179, 210.693 ) ]
}
tracks/7/type = "value"
tracks/7/path = NodePath("painting_old_guitarist:rotation_degrees")
tracks/7/interp = 2
tracks/7/loop_wrap = true
tracks/7/imported = false
tracks/7/enabled = true
tracks/7/keys = {
"times": PoolRealArray( 0, 2 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ 0.0, 15.0 ]
}
tracks/8/type = "value"
tracks/8/path = NodePath("painting_babel:position")
tracks/8/interp = 2
tracks/8/loop_wrap = true
tracks/8/imported = false
tracks/8/enabled = true
tracks/8/keys = {
"times": PoolRealArray( 0, 2 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Vector2( 155.796, 468.287 ), Vector2( 194.21, 444.904 ) ]
}
tracks/9/type = "value"
tracks/9/path = NodePath("painting_babel:rotation_degrees")
tracks/9/interp = 2
tracks/9/loop_wrap = true
tracks/9/imported = false
tracks/9/enabled = true
tracks/9/keys = {
"times": PoolRealArray( 0, 2 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ 0.0, 0.0 ]
}
tracks/10/type = "value"
tracks/10/path = NodePath("painting_las_meninas:position")
tracks/10/interp = 2
tracks/10/loop_wrap = true
tracks/10/imported = false
tracks/10/enabled = true
tracks/10/keys = {
"times": PoolRealArray( 0, 2 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Vector2( 861.734, 494.059 ), Vector2( 840.022, 470.677 ) ]
}
tracks/11/type = "value"
tracks/11/path = NodePath("painting_las_meninas:rotation_degrees")
tracks/11/interp = 2
tracks/11/loop_wrap = true
tracks/11/imported = false
tracks/11/enabled = true
tracks/11/keys = {
"times": PoolRealArray( 0, 2 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ 0.0, 0.0 ]
}
[node name="Node2D" type="Node2D"]
script = ExtResource( 1 )
[node name="painting_parasol" type="Sprite" parent="." index="0"]
position = Vector2( 451.448, 256.916 )
scale = Vector2( 0.557998, 0.557998 )
texture = ExtResource( 2 )
[node name="painting_babel" type="Sprite" parent="." index="1"]
position = Vector2( 155.796, 468.287 )
scale = Vector2( 0.29005, 0.29005 )
texture = ExtResource( 3 )
[node name="painting_mona_lisa" type="Sprite" parent="." index="2"]
position = Vector2( 117.659, 173.793 )
scale = Vector2( 0.696799, 0.696799 )
texture = ExtResource( 4 )
_sections_unfolded = [ "Transform" ]
[node name="painting_las_meninas" type="Sprite" parent="." index="3"]
position = Vector2( 861.734, 494.059 )
scale = Vector2( 0.348146, 0.348146 )
texture = ExtResource( 5 )
[node name="painting_old_guitarist" type="Sprite" parent="." index="4"]
position = Vector2( 886.982, 185.641 )
scale = Vector2( 0.344706, 0.328421 )
texture = ExtResource( 6 )
[node name="painting_the_swing" type="Sprite" parent="." index="5"]
position = Vector2( 715.927, 181.745 )
scale = Vector2( 0.286677, 0.286677 )
texture = ExtResource( 7 )
[node name="AnimationPlayer" type="AnimationPlayer" parent="." index="6"]
root_node = NodePath("..")
autoplay = "move_around"
playback_process_mode = 1
playback_default_blend_time = 0.0
playback_speed = 1.0
anims/move_around = SubResource( 1 )
blend_times = [ ]
[node name="switch" type="Button" parent="." index="7"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 6.0
margin_top = 7.0
margin_right = 152.0
margin_bottom = 27.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
focus_mode = 2
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
toggle_mode = false
enabled_focus_mode = 2
shortcut = null
group = null
text = "Switch to Sulptures"
flat = false
align = 1
[connection signal="pressed" from="switch" to="." method="_on_switch_pressed"]

View File

@@ -1,97 +0,0 @@
; Engine configuration file.
; It's best edited using the editor UI and not directly,
; since the parameters that go here are not all obvious.
;
; Format:
; [section] ; section goes between []
; param=value ; assign values to parameters
config_version=4
_global_script_classes=[ ]
[application]
config/name="Background Thread Loading Demo"
run/main_scene="res://paintings.tscn"
[autoload]
background_load="*res://background_load.tscn"
[input]
ui_accept={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777221,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777222,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":0,"pressure":0.0,"pressed":false,"script":null)
]
}
ui_select={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":3,"pressure":0.0,"pressed":false,"script":null)
]
}
ui_cancel={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777217,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":1,"pressure":0.0,"pressed":false,"script":null)
]
}
ui_focus_next={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777218,"unicode":0,"echo":false,"script":null)
]
}
ui_focus_prev={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":true,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777218,"unicode":0,"echo":false,"script":null)
]
}
ui_left={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null)
]
}
ui_right={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":15,"pressure":0.0,"pressed":false,"script":null)
]
}
ui_up={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null)
]
}
ui_down={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":false,"script":null)
]
}
ui_page_up={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777235,"unicode":0,"echo":false,"script":null)
]
}
ui_page_down={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777236,"unicode":0,"echo":false,"script":null)
]
}
ui_home={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777229,"unicode":0,"echo":false,"script":null)
]
}
ui_end={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777230,"unicode":0,"echo":false,"script":null)
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 167 KiB

View File

@@ -1,29 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/sculpture_david.jpg-48aeb7cb164d32e6f17209e6764b659c.stex"
[deps]
source_file="res://sculpture_david.jpg"
dest_files=[ "res://.import/sculpture_david.jpg-48aeb7cb164d32e6f17209e6764b659c.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

View File

@@ -1,29 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/sculpture_fountain.jpg-dac3819d7eb39b78d36e9f6504d09bc6.stex"
[deps]
source_file="res://sculpture_fountain.jpg"
dest_files=[ "res://.import/sculpture_fountain.jpg-dac3819d7eb39b78d36e9f6504d09bc6.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 753 KiB

View File

@@ -1,29 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/sculpture_four_parts_of_earth.jpg-6d7b17284103f155af8220c6e7c0afb3.stex"
[deps]
source_file="res://sculpture_four_parts_of_earth.jpg"
dest_files=[ "res://.import/sculpture_four_parts_of_earth.jpg-6d7b17284103f155af8220c6e7c0afb3.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

View File

@@ -1,29 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/sculpture_lincoln.jpg-2309a3ef73573c72052204394b916eef.stex"
[deps]
source_file="res://sculpture_lincoln.jpg"
dest_files=[ "res://.import/sculpture_lincoln.jpg-2309a3ef73573c72052204394b916eef.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 894 KiB

View File

@@ -1,29 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/sculpture_thinker.jpg-d13623267c5f848cecaa2bb8bb609f24.stex"
[deps]
source_file="res://sculpture_thinker.jpg"
dest_files=[ "res://.import/sculpture_thinker.jpg-d13623267c5f848cecaa2bb8bb609f24.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 KiB

View File

@@ -1,29 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/sculpture_venus.png-ce0240c8ebb6a0aae05e92456d21d8f3.stex"
[deps]
source_file="res://sculpture_venus.png"
dest_files=[ "res://.import/sculpture_venus.png-ce0240c8ebb6a0aae05e92456d21d8f3.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Some files were not shown because too many files have changed in this diff Show More