Compare commits
66 Commits
3.2-8d9d58
...
3.2-5bd2bb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5bd2bbfda9 | ||
|
|
fc54dd9c23 | ||
|
|
d38d18006b | ||
|
|
6fd3e4d525 | ||
|
|
2503599bed | ||
|
|
1aaa8e1fc6 | ||
|
|
2a98499935 | ||
|
|
159adfd421 | ||
|
|
4bba07257a | ||
|
|
ae02236e50 | ||
|
|
3f8567f920 | ||
|
|
c7610e9334 | ||
|
|
78c7a48422 | ||
|
|
31d54a3540 | ||
|
|
2259303ee7 | ||
|
|
76c1d850fb | ||
|
|
ebc79dec04 | ||
|
|
4af7fd5562 | ||
|
|
1a19c5c4e1 | ||
|
|
f8317d20d5 | ||
|
|
766cc97855 | ||
|
|
136db0b25b | ||
|
|
aba0372718 | ||
|
|
dd11042d95 | ||
|
|
4d205325ad | ||
|
|
0d1f16d073 | ||
|
|
2c0cbbaed0 | ||
|
|
918a289ee2 | ||
|
|
fe9fd7d7e4 | ||
|
|
c8149a703f | ||
|
|
2979f85185 | ||
|
|
bc10b69d65 | ||
|
|
f5960b2a7f | ||
|
|
fe6103256a | ||
|
|
768346a092 | ||
|
|
7a84acea76 | ||
|
|
c343b2f4f5 | ||
|
|
9184a36ec1 | ||
|
|
d4bf89d364 | ||
|
|
f74f7c52b6 | ||
|
|
76df39ab2e | ||
|
|
e4f69c3de0 | ||
|
|
4fe1930aab | ||
|
|
a582304ee7 | ||
|
|
97e00544a9 | ||
|
|
bc40a8d61d | ||
|
|
4aae4f657b | ||
|
|
78fe523b3c | ||
|
|
c6163b3d20 | ||
|
|
e30571c1ad | ||
|
|
fcc7d5c723 | ||
|
|
50fb2071a0 | ||
|
|
4b9a809912 | ||
|
|
68a2204c07 | ||
|
|
6e98353ce3 | ||
|
|
b5d4b277f4 | ||
|
|
6a325fb3a5 | ||
|
|
913de13ec9 | ||
|
|
f9c93b0d28 | ||
|
|
bc8dc740b5 | ||
|
|
ddffbd7599 | ||
|
|
b718574112 | ||
|
|
ae2a97976a | ||
|
|
2c138bd75f | ||
|
|
b7b3a75389 | ||
|
|
28ec746545 |
11
.editorconfig
Normal 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
@@ -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
@@ -1,2 +0,0 @@
|
||||
patreon: godotengine
|
||||
custom: https://godotengine.org/donate
|
||||
6
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
@@ -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
@@ -1,3 +1,5 @@
|
||||
# Godot 4+ specific ignores
|
||||
.godot/
|
||||
|
||||
# Godot-specific ignores
|
||||
.import/
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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():
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()]
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||

|
||||
|
||||
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
0
2d/dodge_the_creeps/fonts/FONTLOG.txt
Executable file → Normal file
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 1.6 KiB |
@@ -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"
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 765 B After Width: | Height: | Size: 427 B |
@@ -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)
|
||||
|
||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.6 KiB |
@@ -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"
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 23 KiB |
@@ -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
|
||||
|
||||

|
||||
|
||||
|
Before Width: | Height: | Size: 884 B After Width: | Height: | Size: 474 B |
@@ -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)
|
||||
|
||||
|
Before Width: | Height: | Size: 440 B After Width: | Height: | Size: 273 B |
@@ -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"
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 31 KiB |
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||

|
||||
|
||||
BIN
2d/hdr/icon.png
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 392 KiB After Width: | Height: | Size: 376 KiB |
|
Before Width: | Height: | Size: 610 KiB After Width: | Height: | Size: 597 KiB |
@@ -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"
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 406 KiB After Width: | Height: | Size: 318 KiB |
|
Before Width: | Height: | Size: 192 KiB After Width: | Height: | Size: 159 KiB |
@@ -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
|
||||
|
||||

|
||||
|
||||
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 19 KiB |
@@ -22,6 +22,7 @@ config/icon="res://icon.png"
|
||||
|
||||
[display]
|
||||
|
||||
window/dpi/allow_hidpi=true
|
||||
window/stretch/mode="2d"
|
||||
window/stretch/aspect="expand"
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 401 KiB After Width: | Height: | Size: 340 KiB |
@@ -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
|
||||
|
||||

|
||||
|
||||
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
@@ -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"
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 96 KiB |
@@ -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)
|
||||
|
||||
@@ -25,6 +25,7 @@ config/icon="res://icon.png"
|
||||
|
||||
[display]
|
||||
|
||||
window/dpi/allow_hidpi=true
|
||||
window/stretch/mode="2d"
|
||||
window/stretch/aspect="expand"
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 440 KiB After Width: | Height: | Size: 369 KiB |
@@ -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
|
||||
|
||||

|
||||
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 480 B After Width: | Height: | Size: 401 B |
|
Before Width: | Height: | Size: 468 B After Width: | Height: | Size: 379 B |
|
Before Width: | Height: | Size: 495 B After Width: | Height: | Size: 398 B |
@@ -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"
|
||||
|
||||
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 16 KiB |
@@ -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
|
||||
|
||||

|
||||
|
||||
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.0 KiB |
@@ -22,6 +22,7 @@ config/icon="res://icon.png"
|
||||
|
||||
[display]
|
||||
|
||||
window/dpi/allow_hidpi=true
|
||||
window/stretch/mode="2d"
|
||||
window/stretch/aspect="expand"
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 253 KiB After Width: | Height: | Size: 212 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 12 KiB |
@@ -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
|
||||
|
||||

|
||||
|
||||
|
Before Width: | Height: | Size: 168 B After Width: | Height: | Size: 147 B |
|
Before Width: | Height: | Size: 89 B After Width: | Height: | Size: 68 B |
BIN
2d/lights_and_shadows/godot.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
@@ -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]
|
||||
|
||||
BIN
2d/lights_and_shadows/godot_normal.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
@@ -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]
|
||||
|
||||
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 166 KiB After Width: | Height: | Size: 156 KiB |
@@ -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 )
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
Before Width: | Height: | Size: 187 KiB After Width: | Height: | Size: 157 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.8 KiB |
@@ -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
|
||||
|
||||

|
||||
|
||||
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 1.9 KiB |
@@ -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"
|
||||
|
||||
|
Before Width: | Height: | Size: 205 KiB After Width: | Height: | Size: 166 KiB |
@@ -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
|
||||
|
||||

|
||||
|
||||
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.7 KiB |
@@ -23,6 +23,7 @@ config/icon="res://icon.png"
|
||||
|
||||
[display]
|
||||
|
||||
window/dpi/allow_hidpi=true
|
||||
window/stretch/mode="2d"
|
||||
window/stretch/aspect="expand"
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 888 B After Width: | Height: | Size: 453 B |
|
Before Width: | Height: | Size: 522 B After Width: | Height: | Size: 103 B |
|
Before Width: | Height: | Size: 649 B After Width: | Height: | Size: 230 B |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 640 B |
@@ -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
|
||||
|
||||
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
BIN
2d/particles/flipbook.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
34
2d/particles/flipbook.png.import
Normal 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
|
||||
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
@@ -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="."]
|
||||
|
||||
@@ -22,6 +22,7 @@ config/icon="res://icon.png"
|
||||
|
||||
[display]
|
||||
|
||||
window/dpi/allow_hidpi=true
|
||||
window/stretch/mode="2d"
|
||||
window/stretch/aspect="expand"
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 123 KiB After Width: | Height: | Size: 94 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |