Compare commits

...

66 Commits

Author SHA1 Message Date
Aaron Franke
5bd2bbfda9 Merge pull request #553 from aaronfranke/iap-readme
Fix README files, especially in Android IAP demos
2020-11-28 22:19:31 -05:00
Aaron Franke
fc54dd9c23 Fix README files, especially in Android IAP demos 2020-11-28 22:05:39 -05:00
Aaron Franke
d38d18006b Merge pull request #551 from Calinou/networking-add-port-forward-help
Add instructions for port forwarding in the high-level multiplayer demos
2020-11-16 04:10:53 -05:00
Hugo Locurcio
6fd3e4d525 Add instructions for port forwarding in the high-level multiplayer demos
The instructions will only show when the player is hosting a server.
This also includes a button to get your public IP address.

This partially addresses #535.
2020-11-13 16:17:14 +01:00
Aaron Franke
2503599bed Merge pull request #543 from aaronfranke/mat-test-no-dae
Replace Collada .dae file with a Blend file in Material Testers demo
2020-10-30 15:40:04 -04:00
Aaron Franke
1aaa8e1fc6 Replace Collada .dae file with a Blend file
Also set material import mode to tres for test_bed.glb
2020-10-30 15:37:33 -04:00
Aaron Franke
2a98499935 Merge pull request #544 from aaronfranke/enums
Add trailing commas to enums
2020-10-30 15:35:51 -04:00
Aaron Franke
159adfd421 Add trailing commas to enums 2020-10-30 03:24:51 -04:00
Aaron Franke
4bba07257a Merge pull request #536 from aaronfranke/dtc-public
Change Dodge the Creeps to be more consistent with the docs
2020-10-21 01:50:46 -04:00
Aaron Franke
ae02236e50 Merge pull request #541 from Duroxxigar/mono-mp
Created C# networked Pong
2020-10-20 23:40:21 -04:00
Duroxxigar
3f8567f920 Created C# networked Pong 2020-10-20 23:18:57 -04:00
Aaron Franke
c7610e9334 Merge pull request #540 from jak-sdk/master
Re-write the navigation path-following code to be easier to read + add comments
2020-10-16 14:57:42 -04:00
Jak
78c7a48422 Re-write the 3d/navmesh demo to be easier to follow
The previous code had no comments and had some unintuitive steps.
I've re-written and re-structured it, and added comments. Hopefully it
will be easier to follow for newcomers to Godot.

 * Re-write main methods
 * Various bugfixes (variable conflicts, edge cases)
 * Comment improvements
 * Whitespace fixes

Co-authored-by: Aaron Franke <arnfranke@yahoo.com>
2020-10-16 19:41:28 +01:00
Aaron Franke
31d54a3540 Merge pull request #539 from jlosito/dependabot-configs
Check for updates to GitHub Actions every weekday
2020-10-15 15:40:46 -04:00
John Losito
2259303ee7 Check for updates to GitHub Actions every weekday 2020-10-13 18:21:32 -04:00
Aaron Franke
76c1d850fb Merge pull request #537 from aaronfranke/csproj-323
Update C# project files in C# demos for Godot 3.2.3
2020-10-12 19:45:10 -04:00
Aaron Franke
ebc79dec04 Update C# project files in C# demos for Godot 3.2.3 2020-10-11 03:20:03 -04:00
Aaron Franke
4af7fd5562 Change Dodge the Creeps to be more consistent with the docs 2020-10-10 16:26:23 -04:00
Aaron Franke
1a19c5c4e1 Merge pull request #533 from van800/dodge
Improve Dodge the Creeps demo
2020-10-08 12:07:50 -04:00
Ivan Shakhov
f8317d20d5 restore RootNamespace, since default one contains spaces, restore net472 after discussion with @neikeq and more testing 2020-10-08 16:29:41 +02:00
Aaron Franke
766cc97855 Merge pull request #532 from akien-mga/dodge-unused
Dodge the Creeps: Remove unused asset
2020-10-06 16:10:30 -04:00
Rémi Verschelde
136db0b25b Dodge the Creeps: Remove unused asset 2020-10-06 21:48:11 +02:00
Aaron Franke
aba0372718 Merge pull request #531 from van800/master
Update dodge_the_creeps to Godot 3.2.3 format
2020-10-06 05:58:43 -04:00
Ivan Shakhov
dd11042d95 fix Dodge the Creeps 2020-10-06 11:36:37 +02:00
Aaron Franke
4d205325ad Merge pull request #528 from aaronfranke/panel
Remove Panel nodes that don't have panels
2020-10-02 03:28:18 -04:00
Aaron Franke
0d1f16d073 Remove panel nodes that don't have panels
Replace with Control nodes
2020-10-01 23:46:50 -04:00
Aaron Franke
2c0cbbaed0 Merge pull request #525 from aaronfranke/gitignore-attr
Update gitignore for 4.x, add gitattributes, and update file format
2020-10-01 15:15:06 -04:00
Aaron Franke
918a289ee2 Format files using updated file_format.sh 2020-10-01 14:23:54 -04:00
Aaron Franke
fe9fd7d7e4 Update gitignore for 4.x and add gitattributes 2020-10-01 14:22:45 -04:00
Aaron Franke
c8149a703f Merge pull request #526 from aaronfranke/csharp-3.2.3
Update C# demos for Godot 3.2.3
2020-10-01 14:19:13 -04:00
Aaron Franke
2979f85185 Update C# demos for Godot 3.2.3 2020-10-01 02:45:18 -04:00
Aaron Franke
bc10b69d65 Merge pull request #524 from Calinou/allow-hidpi
Allow hiDPI in all demos that support multiple resolutions
2020-10-01 02:44:54 -04:00
Aaron Franke
f5960b2a7f Merge pull request #522 from Calinou/particles-add-flipbook-animation
Add a flipbook animation example to the 2D particles demo
2020-10-01 02:43:51 -04:00
Hugo Locurcio
fe6103256a Allow hiDPI in all demos that support multiple resolutions
This is required to benefit from crisp display on hiDPI monitors.
This also fixes issues related to fullscreen and input handling
when using an hiDPI display on Windows.
2020-10-01 00:56:12 +02:00
Hugo Locurcio
768346a092 Add a flipbook animation example to the 2D particles demo 2020-09-17 22:43:04 +02:00
Aaron Franke
7a84acea76 Merge pull request #521 from dbrookman/spelling-fix
Fix small spelling error
2020-09-16 11:57:48 -04:00
Daniel Brookman
c343b2f4f5 Fix small spelling error 2020-09-16 11:22:44 -04:00
Aaron Franke
9184a36ec1 Merge pull request #519 from aaronfranke/assetlib-links
Link to the asset library from the README of each demo
2020-09-11 13:51:45 -04:00
Aaron Franke
d4bf89d364 Link to the asset library from the README of each demo 2020-09-10 15:37:10 -04:00
Aaron Franke
f74f7c52b6 Merge pull request #514 from Calinou/remove-community-health-files
Remove funding information to use the @godotengine default
2020-09-01 01:30:39 -04:00
Hugo Locurcio
76df39ab2e Remove funding information to use the @godotengine default
The community health files are now available in the godotengine/.github
repository, which makes them apply to all repositories in the
organization automatically.

See https://github.com/godotengine/godot/issues/40972.
2020-08-27 15:57:32 +02:00
Aaron Franke
e4f69c3de0 Merge pull request #513 from Faless/net/free_while_emitting
Avoid freeing network peer during signal emission.
2020-08-23 16:22:51 -04:00
Fabio Alessandrelli
4fe1930aab Avoid freeing network peer during signal emission.
Always keep a reference to the last used peer even when removing it
from tree.
2020-08-23 20:12:27 +02:00
Aaron Franke
a582304ee7 Merge pull request #511 from Calinou/lights-and-shadows-normal-maps
Add a normal map test in the 2D lights and shadows demo
2020-08-19 16:13:46 -05:00
Hugo Locurcio
97e00544a9 Add a normal map test in the 2D lights and shadows demo
This was requested by lawnjelly so we can test whether normal map
orientation behaves as expected.
2020-08-18 14:22:04 +02:00
Aaron Franke
bc40a8d61d Merge pull request #510 from aaronfranke/dtc-meta
Fix minor problems with Dodge the Creeps metadata
2020-08-17 00:28:48 -05:00
Aaron Franke
4aae4f657b Fix minor problems with Dodge the Creeps metadata 2020-08-16 23:49:00 -05:00
Aaron Franke
78fe523b3c Merge pull request #508 from Calinou/3d-demos-tweak-settings
Tweak settings in various 3D demos
2020-08-16 23:44:05 -05:00
Hugo Locurcio
c6163b3d20 Tweak settings in various 3D demos
- Enable 4× MSAA in all 3D demos.
- Enable filmic tonemapping with a whitepoint of 6 in GLES3 3D demos.
- Add subtle fog to the Truck Town demo.
- Use the `2d` stretch mode and `expand` stretch aspect to support
  multiple resolutions and aspect ratios.
2020-08-17 03:25:13 +02:00
Aaron Franke
e30571c1ad Merge pull request #509 from aaronfranke/icons-images
Improve icons and optimize PNG images using oxipng
2020-08-16 19:12:52 -05:00
Aaron Franke
fcc7d5c723 Optimize PNG images using oxipng 2020-08-16 17:48:38 -05:00
Aaron Franke
50fb2071a0 Improve icon.png for projects using default icon 2020-08-15 17:25:12 -05:00
Aaron Franke
4b9a809912 Merge pull request #506 from Calinou/add-gui-theming-override-demo
Add a GUI theming override demo
2020-08-12 19:26:23 -05:00
Aaron Franke
68a2204c07 Merge pull request #507 from ricardoalcantara/mono_android_iap
Rewriting Mono Android IAP to match with GDScript
2020-08-12 19:25:21 -05:00
Ricardo Alcantara
6e98353ce3 Rewriting Mono Android IAP to match with GDScript
Version.
2020-08-12 21:08:51 -03:00
Aaron Franke
b5d4b277f4 Merge pull request #504 from ricardoalcantara/mono_android_iap
Android IAP Response Code can now return null.
2020-08-08 13:59:08 -05:00
Hugo Locurcio
6a325fb3a5 Add a GUI theming override demo
Overriding theme items is a common point of confusion. This demo
should hopefully make it easier to understand.

In the future, we could extend this demo to include things like theme
switching as it's a common need in non-game applications.
2020-08-04 13:14:53 +02:00
Aaron Franke
913de13ec9 Merge pull request #505 from pkruszynski/mobile-multitouch-view-fix
Mobile multitouch view fix
2020-08-03 21:20:30 -05:00
pkruszynski
f9c93b0d28 Fix for multitouch_view 2020-08-04 03:13:19 +01:00
Ricardo Alcantara
bc8dc740b5 Android IAP Response Code can now return null. 2020-07-28 19:26:19 -03:00
Aaron Franke
ddffbd7599 Merge pull request #498 from ricardoalcantara/mono_android_iap
Mono Android IAP Demo Project
2020-07-27 14:02:09 -04:00
Ricardo Alcantara
b718574112 Mono Android IAP Demo Project 2020-07-27 00:07:15 -03:00
Aaron Franke
ae2a97976a Merge pull request #500 from aaronfranke/ci-update
Tweak CI to more closely match the main repo
2020-07-25 00:01:18 -04:00
Aaron Franke
2c138bd75f Tweak CI to more closely match the main repo 2020-07-24 23:50:50 -04:00
Aaron Franke
b7b3a75389 Merge pull request #499 from smix8/master
3D NavMesh Demo - fix for navmesh (re)baking issue
2020-07-24 21:59:00 -04:00
smix8
28ec746545 fix for navmesh (re)baking issue
fix for navmesh (re)baking issues in demo
- changed level mesh size/scale (was way to small to be useable)
- changed navmesh agent settings (default radius to large, slope values to small)
2020-07-25 02:19:19 +02:00
671 changed files with 3493 additions and 2860 deletions

11
.editorconfig Normal file
View File

@@ -0,0 +1,11 @@
# Top-most EditorConfig file.
root = true
# Unix-style newlines with a newline ending every file.
[*.cs]
insert_final_newline = true
csharp_space_after_cast = false
indent_size = 4
[*.csproj]
indent_size = 2

4
.gitattributes vendored Normal file
View File

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

2
.github/FUNDING.yml vendored
View File

@@ -1,2 +0,0 @@
patreon: godotengine
custom: https://godotengine.org/donate

6
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

View File

@@ -1,15 +1,19 @@
name: Continuous integration
name: Static Checks
on: [push, pull_request]
jobs:
build:
format:
name: File formatting (file_format.sh)
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Lint demo projects
- name: Install dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -qq dos2unix recode
bash ./format.sh
- name: File formatting checks (file_format.sh)
run: |
bash ./file_format.sh

2
.gitignore vendored
View File

@@ -1,3 +1,5 @@
# Godot 4+ specific ignores
.godot/
# Godot-specific ignores
.import/

View File

@@ -3,6 +3,6 @@
These demos are all 2D, but otherwise do not have a common theme.
Languages: Most have GDScript, some have
[GDSL](https://docs.godotengine.org/en/latest/tutorials/shading/shading_reference/shading_language.html)
[GDSL](https://docs.godotengine.org/en/latest/tutorials/shaders/shader_reference/shading_language.html)
Renderers: 6 of them are GLES 3, but most are GLES 2

View File

@@ -1,6 +1,6 @@
extends Node
export(PackedScene) var Mob
export(PackedScene) var mob_scene
var score
func _ready():
@@ -16,6 +16,7 @@ func game_over():
func new_game():
get_tree().call_group("mobs", "queue_free")
score = 0
$Player.start($StartPosition.position)
$StartTimer.start()
@@ -25,16 +26,27 @@ func new_game():
func _on_MobTimer_timeout():
$MobPath/MobSpawnLocation.offset = randi()
var mob = Mob.instance()
# Choose a random location on Path2D.
var mob_spawn_location = get_node("MobPath/MobSpawnLocation")
mob_spawn_location.offset = randi()
# Create a Mob instance and add it to the scene.
var mob = mob_scene.instance()
add_child(mob)
var direction = $MobPath/MobSpawnLocation.rotation + TAU / 4
mob.position = $MobPath/MobSpawnLocation.position
direction += rand_range(-TAU / 8, TAU / 8)
# Set the mob's direction perpendicular to the path direction.
var direction = mob_spawn_location.rotation + PI / 2
# Set the mob's position to a random location.
mob.position = mob_spawn_location.position
# Add some randomness to the direction.
direction += rand_range(-PI / 4, PI / 4)
mob.rotation = direction
mob.linear_velocity = Vector2(rand_range(mob.min_speed, mob.max_speed), 0).rotated(direction)
# warning-ignore:return_value_discarded
$HUD.connect("start_game", mob, "_on_start_game")
# Choose the velocity.
var velocity = Vector2(rand_range(mob.min_speed, mob.max_speed), 0)
mob.linear_velocity = velocity.rotated(direction)
func _on_ScoreTimer_timeout():

View File

@@ -14,7 +14,7 @@ _data = {
[node name="Main" type="Node"]
script = ExtResource( 1 )
Mob = ExtResource( 2 )
mob_scene = ExtResource( 2 )
[node name="ColorRect" type="ColorRect" parent="."]
anchor_right = 1.0

View File

@@ -3,9 +3,10 @@ extends RigidBody2D
#warning-ignore-all:unused_class_variable
export var min_speed = 150
export var max_speed = 250
var mob_types = ["walk", "swim", "fly"]
func _ready():
$AnimatedSprite.playing = true
var mob_types = $AnimatedSprite.frames.get_animation_names()
$AnimatedSprite.animation = mob_types[randi() % mob_types.size()]

View File

@@ -10,11 +10,6 @@
[sub_resource type="SpriteFrames" id=1]
animations = [ {
"frames": [ ExtResource( 2 ), ExtResource( 3 ) ],
"loop": true,
"name": "fly",
"speed": 3.0
}, {
"frames": [ ExtResource( 4 ), ExtResource( 5 ) ],
"loop": true,
"name": "walk",
@@ -24,13 +19,20 @@ animations = [ {
"loop": true,
"name": "swim",
"speed": 4.0
}, {
"frames": [ ExtResource( 2 ), ExtResource( 3 ) ],
"loop": true,
"name": "fly",
"speed": 3.0
} ]
[sub_resource type="CapsuleShape2D" id=2]
radius = 35.2706
height = 23.3281
[node name="Mob" type="RigidBody2D"]
[node name="Mob" type="RigidBody2D" groups=[
"mobs",
]]
collision_mask = 0
gravity_scale = 0.0
script = ExtResource( 1 )
@@ -42,8 +44,6 @@ __meta__ = {
scale = Vector2( 0.75, 0.75 )
frames = SubResource( 1 )
animation = "walk"
frame = 1
playing = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
rotation = 1.5708

View File

@@ -2,8 +2,8 @@ extends Area2D
signal hit
export var speed = 400
var screen_size
export var speed = 400 # How fast the player will move (pixels/sec).
var screen_size # Size of the game window.
func _ready():
screen_size = get_viewport_rect().size
@@ -11,15 +11,22 @@ func _ready():
func _process(delta):
var velocity = Vector2()
velocity.x = Input.get_action_strength("move_right") - Input.get_action_strength("move_left")
velocity.y = Input.get_action_strength("move_down") - Input.get_action_strength("move_up")
var velocity = Vector2.ZERO # The player's movement vector.
if Input.is_action_pressed("move_right"):
velocity.x += 1
if Input.is_action_pressed("move_left"):
velocity.x -= 1
if Input.is_action_pressed("move_down"):
velocity.y += 1
if Input.is_action_pressed("move_up"):
velocity.y -= 1
if velocity.length() > 0:
velocity = velocity.normalized() * speed
$AnimatedSprite.play()
else:
$AnimatedSprite.stop()
position += velocity * delta
position.x = clamp(position.x, 0, screen_size.x)
position.y = clamp(position.y, 0, screen_size.y)
@@ -40,6 +47,7 @@ func start(pos):
func _on_Player_body_entered(_body):
hide()
hide() # Player disappears after being hit.
emit_signal("hit")
# Must be deferred as we can't change physics properties on a physics callback.
$CollisionShape2D.set_deferred("disabled", true)

View File

@@ -14,6 +14,8 @@ Renderer: GLES 3 (particles are not available in GLES 2)
Note: There is a C# version available [here](https://github.com/godotengine/godot-demo-projects/tree/master/mono/dodge_the_creeps).
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/515
## Screenshots
![GIF from the documentation](https://docs.godotengine.org/en/latest/_images/dodge_preview.gif)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

0
2d/dodge_the_creeps/fonts/FONTLOG.txt Executable file → Normal file
View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -20,8 +20,8 @@ config/description="This is a simple game where your character must move
and avoid the enemies for as long as possible.
This is a finished version of the game featured in the 'Your first game'
tutorial in the documentation, but ported to C#. For more details,
consider following the tutorial in the documentation."
tutorial in the documentation. For more details, consider
following the tutorial in the documentation."
run/main_scene="res://Main.tscn"
config/icon="res://icon.png"

View File

@@ -8,6 +8,8 @@ Language: GDScript
Renderer: GLES 2
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/516
## Why use a state machine
States are common in games. You can use the pattern to:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 765 B

After

Width:  |  Height:  |  Size: 427 B

View File

@@ -22,7 +22,7 @@ func initialize(speed, velocity):
max_horizontal_speed = speed if speed > 0.0 else base_max_horizontal_speed
enter_velocity = velocity
func enter():
var input_direction = get_input_direction()
update_look_direction(input_direction)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -26,6 +26,7 @@ config/icon="res://icon.png"
window/size/width=1280
window/size/height=720
window/dpi/allow_hidpi=true
window/stretch/mode="2d"
window/stretch/aspect="expand"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -8,6 +8,8 @@ Language: GDScript
Renderer: GLES 2
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/517
## Screenshots
![Screenshot](screenshots/gdpaint.png)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 884 B

After

Width:  |  Height:  |  Size: 474 B

View File

@@ -9,10 +9,15 @@ const IMAGE_SIZE = Vector2(930, 720)
# Enums for the various modes and brush shapes that can be applied.
enum BrushModes {
PENCIL, ERASER, CIRCLE_SHAPE, RECTANGLE_SHAPE
PENCIL,
ERASER,
CIRCLE_SHAPE,
RECTANGLE_SHAPE,
}
enum BrushShapes {
RECTANGLE, CIRCLE
RECTANGLE,
CIRCLE,
}
# The top-left position of the canvas.
@@ -51,20 +56,20 @@ func _ready():
func _process(_delta):
var mouse_pos = get_viewport().get_mouse_position()
# Check if the mouse is currently inside the canvas/drawing-area.
is_mouse_in_drawing_area = false
if mouse_pos.x > TL_node.global_position.x:
if mouse_pos.y > TL_node.global_position.y:
is_mouse_in_drawing_area = true
if Input.is_mouse_button_pressed(BUTTON_LEFT):
# If we do not have a position for when the mouse was first clicked, then this must
# be the first time is_mouse_button_pressed has been called since the mouse button was
# released, so we need to store the position.
if mouse_click_start_pos == null:
mouse_click_start_pos = mouse_pos
# If the mouse is inside the canvas and the mouse is 1px away from the position of the mouse last _process call.
if check_if_mouse_is_inside_canvas():
if mouse_pos.distance_to(last_mouse_pos) >= 1:
@@ -77,11 +82,11 @@ func _process(_delta):
undo_element_list_num = brush_data_list.size()
# Add the brush object to draw_elements_array.
add_brush(mouse_pos, brush_mode)
else:
# We've finished our stroke, so we can set a new undo (if a new storke is made).
undo_set = false
# If the mouse is inside the canvas.
if check_if_mouse_is_inside_canvas():
# If we're using either the circle shape mode, or the rectangle shape mode, then
@@ -94,7 +99,7 @@ func _process(_delta):
# Since we've released the left mouse, we need to get a new mouse_click_start_pos next time
#is_mouse_button_pressed is true.
mouse_click_start_pos = null
# Store mouse_pos as last_mouse_pos now that we're done with _process.
last_mouse_pos = mouse_pos
@@ -108,7 +113,7 @@ func check_if_mouse_is_inside_canvas():
if mouse_click_start_pos.x > TL_node.global_position.x:
if mouse_click_start_pos.y > TL_node.global_position.y:
# Make sure the current mouse position is inside the canvas.
if is_mouse_in_drawing_area == true:
if is_mouse_in_drawing_area:
return true
return false
@@ -117,17 +122,17 @@ func undo_stroke():
# Only undo a stroke if we have one.
if undo_element_list_num == UNDO_NONE:
return
# If we are undoing a shape, then we can just remove the latest brush.
if undo_element_list_num == UNDO_MODE_SHAPE:
if brush_data_list.size() > 0:
brush_data_list.remove(brush_data_list.size() - 1)
# Now that we've undone a shape, we cannot undo again until another stoke is added.
undo_element_list_num = UNDO_NONE
# NOTE: if we only had shape brushes, then we could remove the above line and could let the user
# undo until we have a empty element list.
# Otherwise we're removing a either a pencil stroke or a eraser stroke.
else:
# Figure out how many elements/brushes we've added in the last stroke.
@@ -136,7 +141,7 @@ func undo_stroke():
#warning-ignore:unused_variable
for elment_num in range(0, elements_to_remove):
brush_data_list.pop_back()
# Now that we've undone a stoke, we cannot undo again until another stoke is added.
undo_element_list_num = UNDO_NONE
@@ -147,7 +152,7 @@ func undo_stroke():
func add_brush(mouse_pos, type):
# Make new brush dictionary that will hold all of the data we need for the brush.
var new_brush = {}
# Populate the dictionary with values based on the global brush variables.
# We will override these as needed if the brush is a rectange or circle.
new_brush.brush_type = type
@@ -155,13 +160,13 @@ func add_brush(mouse_pos, type):
new_brush.brush_shape = brush_shape
new_brush.brush_size = brush_size
new_brush.brush_color = brush_color
# If the new bursh is a rectangle shape, we need to calculate the top left corner of the rectangle and the
# bottom right corner of the rectangle.
if type == BrushModes.RECTANGLE_SHAPE:
var TL_pos = Vector2()
var BR_pos = Vector2()
# Figure out the left and right positions of the corners and assign them to the proper variable.
if mouse_pos.x < mouse_click_start_pos.x:
TL_pos.x = mouse_pos.x
@@ -169,7 +174,7 @@ func add_brush(mouse_pos, type):
else:
TL_pos.x = mouse_click_start_pos.x
BR_pos.x = mouse_pos.x
# Figure out the top and bottom positions of the corners and assign them to the proper variable.
if mouse_pos.y < mouse_click_start_pos.y:
TL_pos.y = mouse_pos.y
@@ -177,11 +182,11 @@ func add_brush(mouse_pos, type):
else:
TL_pos.y = mouse_click_start_pos.y
BR_pos.y = mouse_pos.y
# Assign the positions to the brush.
new_brush.brush_pos = TL_pos
new_brush.brush_shape_rect_pos_BR = BR_pos
# If the brush isa circle shape, then we need to calculate the radius of the circle.
if type == BrushModes.CIRCLE_SHAPE:
# Get the center point inbetween the mouse position and the position of the mouse when we clicked.
@@ -190,7 +195,7 @@ func add_brush(mouse_pos, type):
# the center to the top/bottom positon of the mouse.
new_brush.brush_pos = center_pos
new_brush.brush_shape_circle_radius = center_pos.distance_to(Vector2(center_pos.x, mouse_pos.y))
# Add the brush and update/draw all of the brushes.
brush_data_list.append(new_brush)
update()
@@ -214,7 +219,7 @@ func _draw():
BrushModes.ERASER:
# NOTE: this is a really cheap way of erasing that isn't really erasing!
# However, this gives similar results in a fairy simple way!
# Erasing works exactly the same was as pencil does for both the rectangle shape and the circle shape,
# but instead of using brush.brush_color, we instead use bg_color instead.
if brush.brush_shape == BrushShapes.RECTANGLE:
@@ -235,13 +240,13 @@ func _draw():
func save_picture(path):
# Wait until the frame has finished before getting the texture.
yield(VisualServer, "frame_post_draw")
# Get the viewport image.
var img = get_viewport().get_texture().get_data()
# Crop the image so we only have canvas area.
var cropped_image = img.get_rect(Rect2(TL_node.global_position, IMAGE_SIZE))
# Flip the image on the Y-axis (it's flipped upside down by default).
cropped_image.flip_y()
# Save the image with the passed in path we got from the save dialog.
cropped_image.save_png(path)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 440 B

After

Width:  |  Height:  |  Size: 273 B

View File

@@ -26,6 +26,7 @@ config/icon="res://icon.png"
window/size/width=1280
window/size/height=720
window/dpi/allow_hidpi=true
window/stretch/mode="2d"
window/stretch/aspect="keep"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

@@ -46,7 +46,7 @@ func button_pressed(button_name):
# If a brush mode button is pressed.
var tool_name = null
var shape_name = null
if button_name == "mode_pencil":
paint_control.brush_mode = paint_control.BrushModes.PENCIL
brush_settings.modulate = Color(1, 1, 1, 1)
@@ -80,7 +80,7 @@ func button_pressed(button_name):
save_dialog.popup_centered()
elif button_name == "undo_stroke":
paint_control.undo_stroke()
# Update the labels (in case the brush mode or brush shape has changed).
if tool_name != null:
label_tools.text = "Selected tool: " + tool_name

View File

@@ -9,6 +9,8 @@ Language: GDScript
Renderer: GLES 3 (HDR is not available in GLES 2)
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/110
## Screenshots
![Screenshot](screenshots/left.png)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 392 KiB

After

Width:  |  Height:  |  Size: 376 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 610 KiB

After

Width:  |  Height:  |  Size: 597 KiB

View File

@@ -28,6 +28,7 @@ run/name=""
window/size/width=1080
window/size/height=720
window/dpi/allow_hidpi=true
window/stretch/mode="2d"
window/stretch/aspect="expand"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 406 KiB

After

Width:  |  Height:  |  Size: 318 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 KiB

After

Width:  |  Height:  |  Size: 159 KiB

View File

@@ -6,6 +6,8 @@ Language: GDScript
Renderer: GLES 2
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/111
## Screenshots
![Screenshot](screenshots/hex.png)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -22,6 +22,7 @@ config/icon="res://icon.png"
[display]
window/dpi/allow_hidpi=true
window/stretch/mode="2d"
window/stretch/aspect="expand"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 401 KiB

After

Width:  |  Height:  |  Size: 340 KiB

View File

@@ -7,6 +7,8 @@ Language: GDScript
Renderer: GLES 2
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/148
## Screenshots
![Screenshot](screenshots/instancing.png)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@@ -24,6 +24,7 @@ config/icon="res://icon.png"
[display]
window/size/width=800
window/dpi/allow_hidpi=true
window/stretch/mode="2d"
window/stretch/aspect="expand"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 96 KiB

View File

@@ -9,6 +9,8 @@ Language: GDScript
Renderer: GLES 2
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/112
## How does it work?
The level uses a [`TileMap`](https://docs.godotengine.org/en/latest/classes/class_tilemap.html#class-tilemap)

View File

@@ -25,6 +25,7 @@ config/icon="res://icon.png"
[display]
window/dpi/allow_hidpi=true
window/stretch/mode="2d"
window/stretch/aspect="expand"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 440 KiB

After

Width:  |  Height:  |  Size: 369 KiB

View File

@@ -9,6 +9,8 @@ Language: GDScript
Renderer: GLES 2
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/113
## Screenshots
![Screenshot](screenshots/kinematic.png)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 480 B

After

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 468 B

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 495 B

After

Width:  |  Height:  |  Size: 398 B

View File

@@ -26,6 +26,7 @@ config/icon="res://icon.png"
window/size/width=530
window/size/height=495
window/dpi/allow_hidpi=true
window/stretch/mode="2d"
window/stretch/aspect="expand"
stretch/aspect="keep"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -6,6 +6,8 @@ Language: GDScript
Renderer: GLES 2
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/115
## Screenshots
![Screenshot](screenshots/mask.png)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@@ -22,6 +22,7 @@ config/icon="res://icon.png"
[display]
window/dpi/allow_hidpi=true
window/stretch/mode="2d"
window/stretch/aspect="expand"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 253 KiB

After

Width:  |  Height:  |  Size: 212 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -8,6 +8,8 @@ Language: GDScript
Renderer: GLES 2
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/116
## Screenshots
![Screenshot](screenshots/lights.png)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 B

After

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 B

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -2,15 +2,15 @@
importer="texture"
type="StreamTexture"
path="res://.import/left_pallete.png-bc33611074a0f886142e37c77bd2545a.stex"
path="res://.import/godot.png-5e0da45ed3d6786d5794553e04f58a8c.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://left_pallete.png"
dest_files=[ "res://.import/left_pallete.png-bc33611074a0f886142e37c77bd2545a.stex" ]
source_file="res://godot.png"
dest_files=[ "res://.import/godot.png-5e0da45ed3d6786d5794553e04f58a8c.stex" ]
[params]

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -2,15 +2,15 @@
importer="texture"
type="StreamTexture"
path="res://.import/right_pallete.png-fc6e4a6a7c8197834656482b94708e47.stex"
path="res://.import/godot_normal.png-7f91d6bfda6a23aaa1320ed999c27a39.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://right_pallete.png"
dest_files=[ "res://.import/right_pallete.png-fc6e4a6a7c8197834656482b94708e47.stex" ]
source_file="res://godot_normal.png"
dest_files=[ "res://.import/godot_normal.png-7f91d6bfda6a23aaa1320ed999c27a39.stex" ]
[params]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 KiB

After

Width:  |  Height:  |  Size: 156 KiB

View File

@@ -1,9 +1,11 @@
[gd_scene load_steps=12 format=2]
[gd_scene load_steps=14 format=2]
[ext_resource path="res://background.png" type="Texture" id=1]
[ext_resource path="res://caster.png" type="Texture" id=2]
[ext_resource path="res://light.png" type="Texture" id=3]
[ext_resource path="res://spot.png" type="Texture" id=4]
[ext_resource path="res://godot.png" type="Texture" id=5]
[ext_resource path="res://godot_normal.png" type="Texture" id=6]
[sub_resource type="OccluderPolygon2D" id=1]
polygon = PoolVector2Array( -15.913, -15.9738, 15.9079, -16.0785, 15.6986, 15.847, -16.1223, 15.9517 )
@@ -71,10 +73,80 @@ tracks/0/keys = {
color = Color( 0.27451, 0.27451, 0.27451, 1 )
[node name="Background" type="Sprite" parent="."]
position = Vector2( 401.251, 301.906 )
position = Vector2( 401.251, 302.906 )
scale = Vector2( 128, 128 )
texture = ExtResource( 1 )
[node name="Sprite" type="Sprite" parent="."]
position = Vector2( 295.886, 216.938 )
texture = ExtResource( 5 )
normal_map = ExtResource( 6 )
[node name="Label" type="Label" parent="Sprite"]
margin_left = -22.5563
margin_top = 64.6982
margin_right = 24.4437
margin_bottom = 78.6982
text = "Normal"
align = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="SpriteFlipX" type="Sprite" parent="."]
position = Vector2( 543.341, 220.255 )
scale = Vector2( -1, 1 )
texture = ExtResource( 5 )
normal_map = ExtResource( 6 )
[node name="Label" type="Label" parent="SpriteFlipX"]
margin_left = 22.5564
margin_top = 66.0347
margin_right = 69.5564
margin_bottom = 80.0347
rect_scale = Vector2( -1, 1 )
text = "Flip X"
align = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="SpriteFlipY" type="Sprite" parent="."]
position = Vector2( 291.308, 423.369 )
scale = Vector2( 1, -1 )
texture = ExtResource( 5 )
normal_map = ExtResource( 6 )
[node name="Label" type="Label" parent="SpriteFlipY"]
margin_left = -23.3056
margin_top = -67.2446
margin_right = 23.6944
margin_bottom = -53.2446
rect_scale = Vector2( 1, -1 )
text = "Flip Y"
align = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="SpriteFlipXY" type="Sprite" parent="."]
position = Vector2( 542.081, 424.696 )
scale = Vector2( -1, -1 )
texture = ExtResource( 5 )
normal_map = ExtResource( 6 )
[node name="Label" type="Label" parent="SpriteFlipXY"]
margin_left = 23.9495
margin_top = -67.5714
margin_right = 81.9495
margin_bottom = -53.5714
rect_scale = Vector2( -1, -1 )
text = "Flip X + Y"
align = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Casters" type="Node2D" parent="."]
[node name="ShadowCaster" type="Sprite" parent="Casters"]
@@ -99,7 +171,7 @@ texture = ExtResource( 2 )
occluder = SubResource( 1 )
[node name="ShadowCaster3" type="Sprite" parent="Casters"]
position = Vector2( 348.291, 206.319 )
position = Vector2( 408.291, 226.319 )
texture = ExtResource( 2 )
[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster3"]
@@ -186,11 +258,13 @@ occluder = SubResource( 1 )
position = Vector2( 159.289, 452.441 )
texture = ExtResource( 3 )
color = Color( 1, 0.446392, 0.0576646, 1 )
energy = 0.95
shadow_enabled = true
shadow_gradient_length = 1.3
shadow_filter = 3
shadow_filter_smooth = 11.1
__meta__ = {
"_edit_lock_": true
}
[node name="Blob" type="Sprite" parent="RedLight"]
material = SubResource( 2 )
@@ -205,11 +279,13 @@ anims/motion2 = SubResource( 4 )
position = Vector2( 753.756, 314.336 )
texture = ExtResource( 3 )
color = Color( 0.49247, 0.878537, 0.409146, 1 )
energy = 0.95
shadow_enabled = true
shadow_gradient_length = 1.2
shadow_filter = 3
shadow_filter_smooth = 7.1
__meta__ = {
"_edit_lock_": true
}
[node name="blob" type="Sprite" parent="GreenLight"]
material = SubResource( 5 )
@@ -224,11 +300,13 @@ anims/motion = SubResource( 3 )
position = Vector2( 692.078, 31.1773 )
texture = ExtResource( 3 )
color = Color( 0.396752, 0.446392, 0.929792, 1 )
energy = 0.95
shadow_enabled = true
shadow_gradient_length = 1.4
shadow_filter = 3
shadow_filter_smooth = 5.3
__meta__ = {
"_edit_lock_": true
}
[node name="blob" type="Sprite" parent="BlueLight"]
material = SubResource( 6 )

View File

@@ -24,6 +24,7 @@ config/icon="res://icon.png"
[display]
window/size/width=800
window/dpi/allow_hidpi=true
window/stretch/mode="2d"
window/stretch/aspect="expand"
stretch/aspect="keep"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 KiB

After

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -10,6 +10,8 @@ Language: GDScript
Renderer: GLES 2
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/117
## Screenshots
![Screenshot](screenshots/navigation.png)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -25,6 +25,7 @@ config/icon="res://icon.png"
[display]
window/size/width=800
window/dpi/allow_hidpi=true
window/stretch/mode="2d"
window/stretch/aspect="expand"
stretch/aspect="keep"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 KiB

After

Width:  |  Height:  |  Size: 166 KiB

View File

@@ -7,6 +7,8 @@ Language: GDScript
Renderer: GLES 2
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/519
## Screenshots
![Screenshot](screenshots/nav_astar.png)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -23,6 +23,7 @@ config/icon="res://icon.png"
[display]
window/dpi/allow_hidpi=true
window/stretch/mode="2d"
window/stretch/aspect="expand"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 888 B

After

Width:  |  Height:  |  Size: 453 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 522 B

After

Width:  |  Height:  |  Size: 103 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 649 B

After

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 640 B

View File

@@ -6,6 +6,8 @@ Language: GDScript
Renderer: GLES 3 (particles are not available in GLES 2)
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/118
## How does it work?
It uses [`Particles2D`](https://docs.godotengine.org/en/latest/classes/class_particles2d.html) nodes

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
2d/particles/flipbook.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=35 format=2]
[gd_scene load_steps=38 format=2]
[ext_resource path="res://fire_particle.png" type="Texture" id=1]
[ext_resource path="res://smoke_particle.png" type="Texture" id=2]
@@ -6,6 +6,7 @@
[ext_resource path="res://point_texture_emit.tres" type="Texture" id=4]
[ext_resource path="res://point_texture_image_outline.tres" type="Texture" id=5]
[ext_resource path="res://point_normal_texture_image_outline.tres" type="Texture" id=6]
[ext_resource path="res://flipbook.png" type="Texture" id=7]
[sub_resource type="CanvasItemMaterial" id=1]
blend_mode = 1
@@ -18,11 +19,11 @@ _data = [ Vector2( 0, 1 ), 0.0, 0.0, 0, 0, Vector2( 1, 85.0781 ), 0.0, 0.0, 0, 0
[sub_resource type="CurveTexture" id=3]
curve = SubResource( 2 )
[sub_resource type="Curve" id=4]
_data = [ Vector2( 0, 1 ), 0.0, 0.0, 0, 0, Vector2( 1, 0.295898 ), 0.0, 0.0, 0, 0 ]
[sub_resource type="Curve" id=31]
_data = [ Vector2( 0, 1 ), 0.0, 0.0, 0, 0, Vector2( 1, 0 ), 0.0, 0.0, 0, 0 ]
[sub_resource type="CurveTexture" id=5]
curve = SubResource( 4 )
curve = SubResource( 31 )
[sub_resource type="ParticlesMaterial" id=6]
emission_shape = 1
@@ -41,13 +42,39 @@ scale_random = 0.3
scale_curve = SubResource( 5 )
color = Color( 0.859375, 0.180278, 0.0469971, 1 )
[sub_resource type="Gradient" id=7]
[sub_resource type="CanvasItemMaterial" id=7]
blend_mode = 1
particles_animation = true
particles_anim_h_frames = 2
particles_anim_v_frames = 2
particles_anim_loop = false
[sub_resource type="ParticlesMaterial" id=8]
emission_shape = 1
emission_sphere_radius = 75.0
flag_disable_z = true
gravity = Vector3( 0, -26, 0 )
angular_velocity = 1.0
angular_velocity_curve = SubResource( 3 )
orbit_velocity = 0.0
orbit_velocity_random = 0.0
linear_accel_random = 1.0
damping = 2.0
scale = 0.5
scale_curve = SubResource( 5 )
color = Color( 0, 0.67, 2, 1 )
hue_variation = 0.05
hue_variation_random = 1.0
anim_offset = 1.0
anim_offset_random = 1.0
[sub_resource type="Gradient" id=9]
colors = PoolColorArray( 1, 1, 1, 0.806627, 1, 1, 1, 0 )
[sub_resource type="GradientTexture" id=8]
gradient = SubResource( 7 )
[sub_resource type="GradientTexture" id=10]
gradient = SubResource( 9 )
[sub_resource type="ParticlesMaterial" id=9]
[sub_resource type="ParticlesMaterial" id=11]
emission_shape = 1
emission_sphere_radius = 30.0
flag_disable_z = true
@@ -62,33 +89,33 @@ damping = 20.0
damping_random = 0.2
angle = 360.0
angle_random = 1.0
color_ramp = SubResource( 8 )
color_ramp = SubResource( 10 )
[sub_resource type="CanvasItemMaterial" id=10]
[sub_resource type="CanvasItemMaterial" id=12]
blend_mode = 1
[sub_resource type="Gradient" id=11]
[sub_resource type="Gradient" id=13]
offsets = PoolRealArray( 0, 0.0769231, 0.16568, 0.266272, 0.378698, 0.491124, 0.609467, 0.704142, 0.804734, 0.911243, 1 )
colors = PoolColorArray( 1, 1, 1, 1, 1, 0.152961, 0, 1, 1, 0.726562, 0, 1, 0.78125, 1, 0, 1, 0.289062, 1, 0, 1, 0, 1, 0.472656, 1, 0, 1, 0.835938, 1, 0, 0.71875, 1, 1, 0.21875, 0, 1, 1, 1, 0, 0.773438, 1, 1, 1, 1, 1 )
[sub_resource type="GradientTexture" id=12]
gradient = SubResource( 11 )
[sub_resource type="Curve" id=13]
_data = [ Vector2( 0, 0.510742 ), 0.0, 0.0, 0, 0, Vector2( 1, 1 ), 0.0, 0.0, 0, 0 ]
[sub_resource type="CurveTexture" id=14]
curve = SubResource( 13 )
[sub_resource type="GradientTexture" id=14]
gradient = SubResource( 13 )
[sub_resource type="Curve" id=15]
_data = [ Vector2( 0, 0.961914 ), 0.0, 0.0, 0, 0, Vector2( 1, 0 ), 0.0, 0.0, 0, 0 ]
_data = [ Vector2( 0, 0.510742 ), 0.0, 0.0, 0, 0, Vector2( 1, 1 ), 0.0, 0.0, 0, 0 ]
[sub_resource type="CurveTexture" id=16]
curve = SubResource( 15 )
[sub_resource type="ParticlesMaterial" id=17]
[sub_resource type="Curve" id=17]
_data = [ Vector2( 0, 0.961914 ), 0.0, 0.0, 0, 0, Vector2( 1, 0 ), 0.0, 0.0, 0, 0 ]
[sub_resource type="CurveTexture" id=18]
curve = SubResource( 17 )
[sub_resource type="ParticlesMaterial" id=19]
trail_divisor = 32
trail_size_modifier = SubResource( 16 )
trail_size_modifier = SubResource( 18 )
emission_shape = 1
emission_sphere_radius = 4.0
flag_disable_z = true
@@ -101,36 +128,36 @@ tangential_accel = 100.0
angle = 360.0
angle_random = 1.0
scale = 3.0
scale_curve = SubResource( 14 )
color_ramp = SubResource( 12 )
scale_curve = SubResource( 16 )
color_ramp = SubResource( 14 )
hue_variation = 1.0
hue_variation_random = 1.0
[sub_resource type="CanvasItemMaterial" id=18]
[sub_resource type="CanvasItemMaterial" id=20]
blend_mode = 1
[sub_resource type="Gradient" id=19]
[sub_resource type="Gradient" id=21]
offsets = PoolRealArray( 0, 0.171598, 0.301775, 0.390533, 1 )
colors = PoolColorArray( 1, 0.63501, 0.28125, 1, 1, 0.398438, 0, 1, 0.679688, 0.277451, 0.169922, 0.232039, 0.515625, 0.362454, 0.199402, 0.0784314, 1, 1, 1, 0.0839033 )
[sub_resource type="GradientTexture" id=20]
gradient = SubResource( 19 )
[sub_resource type="Curve" id=21]
max_value = 50.0
_data = [ Vector2( 0, 0 ), 0.0, 0.0, 0, 0, Vector2( 0.0180711, 0 ), 74.6314, 74.6314, 0, 0, Vector2( 0.0392147, 40.9884 ), 0.0, 0.0, 0, 0, Vector2( 1, 50 ), 0.0, 0.0, 0, 0 ]
[sub_resource type="CurveTexture" id=22]
curve = SubResource( 21 )
[sub_resource type="GradientTexture" id=22]
gradient = SubResource( 21 )
[sub_resource type="Curve" id=23]
max_value = 2.0
_data = [ Vector2( 0, 0 ), 0.0, 1.78215, 0, 0, Vector2( 0.282731, 1.17848 ), -1.56917, 21.2492, 0, 0, Vector2( 0.311895, 2 ), 1.46231, 0.0, 0, 0, Vector2( 1, 2 ), 0.0, 0.0, 0, 0 ]
max_value = 50.0
_data = [ Vector2( 0, 0 ), 0.0, 0.0, 0, 0, Vector2( 0.0180711, 0 ), 74.6314, 74.6314, 0, 0, Vector2( 0.0392147, 40.9884 ), 0.0, 0.0, 0, 0, Vector2( 1, 50 ), 0.0, 0.0, 0, 0 ]
[sub_resource type="CurveTexture" id=24]
curve = SubResource( 23 )
[sub_resource type="ParticlesMaterial" id=25]
[sub_resource type="Curve" id=25]
max_value = 2.0
_data = [ Vector2( 0, 0 ), 0.0, 1.78215, 0, 0, Vector2( 0.282731, 1.17848 ), -1.56917, 21.2492, 0, 0, Vector2( 0.311895, 2 ), 1.46231, 0.0, 0, 0, Vector2( 1, 2 ), 0.0, 0.0, 0, 0 ]
[sub_resource type="CurveTexture" id=26]
curve = SubResource( 25 )
[sub_resource type="ParticlesMaterial" id=27]
emission_shape = 2
emission_box_extents = Vector3( 10, 10, 40 )
flag_rotate_y = true
@@ -142,12 +169,12 @@ orbit_velocity = 0.0
orbit_velocity_random = 0.0
radial_accel = 1.0
radial_accel_random = 0.3
radial_accel_curve = SubResource( 22 )
radial_accel_curve = SubResource( 24 )
damping = 10.0
scale_curve = SubResource( 24 )
color_ramp = SubResource( 20 )
scale_curve = SubResource( 26 )
color_ramp = SubResource( 22 )
[sub_resource type="ParticlesMaterial" id=26]
[sub_resource type="ParticlesMaterial" id=28]
emission_shape = 3
emission_point_texture = ExtResource( 4 )
emission_point_count = 10554
@@ -161,7 +188,7 @@ scale = 0.5
scale_random = 1.0
color = Color( 1, 0.550781, 0.550781, 1 )
[sub_resource type="ParticlesMaterial" id=27]
[sub_resource type="ParticlesMaterial" id=29]
emission_shape = 3
emission_point_texture = ExtResource( 5 )
emission_point_count = 1288
@@ -175,7 +202,7 @@ scale = 0.5
scale_random = 1.0
color = Color( 0.375, 0.692383, 1, 1 )
[sub_resource type="ParticlesMaterial" id=28]
[sub_resource type="ParticlesMaterial" id=30]
emission_shape = 4
emission_point_texture = ExtResource( 5 )
emission_normal_texture = ExtResource( 6 )
@@ -200,40 +227,52 @@ preprocess = 0.1
process_material = SubResource( 6 )
texture = ExtResource( 1 )
[node name="Flipbook" type="Particles2D" parent="."]
material = SubResource( 7 )
position = Vector2( 392, 215 )
amount = 20
lifetime = 3.0
preprocess = 0.1
process_material = SubResource( 8 )
texture = ExtResource( 7 )
__meta__ = {
"_editor_description_": "Flipbook animation requires setting a custom CanvasItemMaterial with Particles Animation enabled."
}
[node name="Smoke" type="Particles2D" parent="."]
position = Vector2( 362, 502 )
amount = 32
lifetime = 2.0
preprocess = 0.1
process_material = SubResource( 9 )
process_material = SubResource( 11 )
texture = ExtResource( 2 )
[node name="Magic" type="Particles2D" parent="."]
material = SubResource( 10 )
material = SubResource( 12 )
position = Vector2( 620, 440 )
amount = 64
lifetime = 2.0
preprocess = 0.1
randomness = 1.0
process_material = SubResource( 17 )
process_material = SubResource( 19 )
texture = ExtResource( 3 )
[node name="Explosion" type="Particles2D" parent="."]
material = SubResource( 18 )
material = SubResource( 20 )
position = Vector2( 613.467, 182.62 )
rotation = 3.13794
amount = 16
lifetime = 2.0
explosiveness = 1.0
process_material = SubResource( 25 )
process_material = SubResource( 27 )
texture = ExtResource( 2 )
[node name="Emit_Mask" type="Particles2D" parent="."]
[node name="EmitMask" type="Particles2D" parent="."]
position = Vector2( 42, -68 )
amount = 180
lifetime = 0.2
visibility_rect = Rect2( 26.0055, 90.0015, 199.176, 95.0445 )
process_material = SubResource( 26 )
process_material = SubResource( 28 )
texture = ExtResource( 3 )
[node name="OutlineMask" type="Particles2D" parent="."]
@@ -241,7 +280,7 @@ position = Vector2( 42, 52 )
amount = 180
lifetime = 0.2
visibility_rect = Rect2( 26.0055, 90.0015, 199.176, 95.0445 )
process_material = SubResource( 27 )
process_material = SubResource( 29 )
texture = ExtResource( 3 )
[node name="DirectionMask" type="Particles2D" parent="."]
@@ -249,7 +288,7 @@ position = Vector2( 40, 180 )
amount = 180
lifetime = 0.2
visibility_rect = Rect2( 26.0055, 90.0015, 199.176, 95.0445 )
process_material = SubResource( 28 )
process_material = SubResource( 30 )
texture = ExtResource( 3 )
[node name="Camera2D" type="Camera2D" parent="."]

View File

@@ -22,6 +22,7 @@ config/icon="res://icon.png"
[display]
window/dpi/allow_hidpi=true
window/stretch/mode="2d"
window/stretch/aspect="expand"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 KiB

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

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