Compare commits
33 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
238b5f001c | ||
|
|
9537d1fc99 | ||
|
|
0b47703fc4 | ||
|
|
c231e2abba | ||
|
|
b02987981b | ||
|
|
7dec39be19 | ||
|
|
1ef7c8defb | ||
|
|
238057d534 | ||
|
|
4221882f58 | ||
|
|
9587296412 | ||
|
|
5f65fcbca1 | ||
|
|
af5d7a1598 | ||
|
|
b6db599fa1 | ||
|
|
0eec5d704a | ||
|
|
864b185f51 | ||
|
|
35d4415184 | ||
|
|
951315dd26 | ||
|
|
71e832089d | ||
|
|
fdcdd2ea5b | ||
|
|
2666ea133b | ||
|
|
2ce07fd572 | ||
|
|
ff8052794b | ||
|
|
d88403cec1 | ||
|
|
b6390ebc4d | ||
|
|
5fe6147a34 | ||
|
|
4621cbd2d3 | ||
|
|
cbccc3a3da | ||
|
|
491aef3974 | ||
|
|
67313fc1be | ||
|
|
ed6ae9dc2f | ||
|
|
5260eeabc7 | ||
|
|
f18d5d02c3 | ||
|
|
ed9494f251 |
@@ -6,11 +6,3 @@ root = true
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
|
||||
[*.cs]
|
||||
csharp_space_after_cast = false
|
||||
indent_size = 4
|
||||
|
||||
[*.csproj]
|
||||
insert_final_newline = false
|
||||
indent_size = 2
|
||||
|
||||
2
.gitattributes
vendored
@@ -1,4 +1,2 @@
|
||||
# Normalize EOL for all files that Git considers text files.
|
||||
* text=auto eol=lf
|
||||
|
||||
*.hdr binary
|
||||
|
||||
13
.github/CODEOWNERS
vendored
@@ -1,13 +0,0 @@
|
||||
# Lines starting with '#' are comments.
|
||||
# Each line is a file pattern followed by one or more owners.
|
||||
# Owners can be @users, @org/teams or emails
|
||||
|
||||
/.github/dist/ @Calinou
|
||||
|
||||
/3d/voxel/ @aaronfranke
|
||||
/misc/matrix_transform/ @aaronfranke
|
||||
/misc/2.5d/ @aaronfranke
|
||||
/mono/2.5d/ @aaronfranke
|
||||
|
||||
/2d/physics_tests/ @pouleyKetchoupp
|
||||
/3d/physics_tests/ @pouleyKetchoupp
|
||||
34
.github/ISSUE_TEMPLATE/bug-report.md
vendored
@@ -1,34 +0,0 @@
|
||||
---
|
||||
name: Bug Report
|
||||
about: Report a bug with one of the demo projects.
|
||||
title: ""
|
||||
labels: bug
|
||||
assignees: ""
|
||||
|
||||
---
|
||||
|
||||
<!--
|
||||
Please search existing issues for potential duplicates before filing yours:
|
||||
https://github.com/godotengine/godot-demo-projects/issues?q=is%3Aissue
|
||||
|
||||
Only submit an issue if it is reproducible with the latest stable Godot version.
|
||||
-->
|
||||
|
||||
**Which demo project is affected:**
|
||||
<!-- Specify the project name or path. -->
|
||||
|
||||
|
||||
**OS/device including version:**
|
||||
<!-- Specify GPU model and drivers if graphics-related. -->
|
||||
|
||||
|
||||
**Issue description:**
|
||||
<!-- What happened, what was expected, and what went wrong. -->
|
||||
|
||||
|
||||
**Screenshots of issue:**
|
||||
<!--
|
||||
This section is optional.
|
||||
Drag in an image, or post an image with a link in the form of:
|
||||

|
||||
-->
|
||||
@@ -1,19 +0,0 @@
|
||||
---
|
||||
name: Feature / Enhancement Request
|
||||
about: Adding new features or improving existing ones.
|
||||
title: ""
|
||||
labels: enhancement
|
||||
assignees: ""
|
||||
|
||||
---
|
||||
|
||||
<!--
|
||||
Please search existing issues for potential duplicates before filing yours:
|
||||
https://github.com/godotengine/godot-demo-projects/issues?q=is%3Aissue
|
||||
-->
|
||||
|
||||
**Which demo project is affected:**
|
||||
<!-- Specify the project name or path. -->
|
||||
|
||||
|
||||
**Description:**
|
||||
23
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1,23 +0,0 @@
|
||||
<!--
|
||||
Only submit a pull request if all of the following conditions are met:
|
||||
|
||||
* It must work with the latest Godot version of the branch you're submitting to.
|
||||
|
||||
* It must follow all of the Godot style guides, including the GDScript
|
||||
style guide and the C# style guide.
|
||||
|
||||
* The demo should not be overcomplicated. Simplicity is usually preferred.
|
||||
|
||||
* If you are submitting a new demo, please ensure that it includes a
|
||||
README file similar to the other demos.
|
||||
|
||||
* If you are submitting a copy of a demo translated to C# etc:
|
||||
|
||||
* Please ensure that there is a good reason to have this demo translated.
|
||||
We don't want to have multiple copies of every single project.
|
||||
|
||||
* Please ensure that the code mirrors the original closely.
|
||||
|
||||
* In the project.godot file and in the README, include "with C#" etc in
|
||||
the title, and also include a link to the original in the README.
|
||||
-->
|
||||
6
.github/dependabot.yml
vendored
@@ -1,6 +0,0 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
0
.github/dist/.nojekyll
vendored
23
.github/dist/export_presets.cfg
vendored
@@ -1,23 +0,0 @@
|
||||
[preset.0]
|
||||
|
||||
name="HTML5"
|
||||
platform="HTML5"
|
||||
runnable=true
|
||||
custom_features=""
|
||||
export_filter="all_resources"
|
||||
include_filter="*.json"
|
||||
exclude_filter=""
|
||||
export_path=""
|
||||
script_export_mode=1
|
||||
script_encryption_key=""
|
||||
|
||||
[preset.0.options]
|
||||
|
||||
custom_template/debug=""
|
||||
custom_template/release=""
|
||||
variant/export_type=0
|
||||
vram_texture_compression/for_desktop=true
|
||||
vram_texture_compression/for_mobile=false
|
||||
html/custom_html_shell=""
|
||||
html/head_include=""
|
||||
html/full_window_size=true
|
||||
20
.github/dist/footer.html
vendored
@@ -1,20 +0,0 @@
|
||||
<!-- The list of demos will be inserted above by the CI process. -->
|
||||
</ul>
|
||||
<h2>Unavailable demos</h2>
|
||||
<ul>
|
||||
<li><code>2d/hdr/</code>: Not supported on HTML5 yet.</li>
|
||||
<li><code>3d/global_illumination/</code>: Not supported on HTML5 yet (freezes the browser).</li>
|
||||
<li><code>3d/voxel/</code>: Not supported on HTML5 yet.</li>
|
||||
<li><code>audio/device_changer/</code>: Not supported on HTML5 due to browser limitations.</li>
|
||||
<li><code>loading/background_load/</code>: Not supported on HTML5 yet.</li>
|
||||
<li><code>loading/multiple_threads_loading/</code>: Not supported on HTML5 yet.</li>
|
||||
<li><code>loading/threads/</code>: Not supported on HTML5 yet.</li>
|
||||
<li><code>misc/matrix_transform/</code>: Results are only visible in the editor.</li>
|
||||
<li><code>mobile/android_iap/</code>: Only relevant on native Android.</li>
|
||||
<li><code>mobile/sensors/</code>: Not supported on HTML5 yet.</li>
|
||||
<li><code>mono/*/</code>: Not available yet (requires Mono-enabled HTML5 build).</li>
|
||||
<li><code>networking/*/</code>: Doesn't make sense to be hosted on a static host, as the server must be hosted on the same origin due to the browser's same-origin policy.</li>
|
||||
<li><code>plugins/*/</code>: Only effective within the editor.</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
118
.github/dist/header.html
vendored
@@ -1,118 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Godot demos exported to HTML5</title>
|
||||
<style>
|
||||
:root {
|
||||
--background-color: #fff;
|
||||
--text-color: #222;
|
||||
--link-color: hsl(220, 100%, 45%);
|
||||
--link-underline-color: hsla(220, 100%, 45%, 0.3);
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--background-color: #222;
|
||||
--text-color: #eee;
|
||||
--link-color: hsl(200, 100%, 70%);
|
||||
--link-underline-color: hsla(200, 100%, 70%, 0.3);
|
||||
}
|
||||
}
|
||||
|
||||
*:focus {
|
||||
/* More visible outline for better keyboard navigation. */
|
||||
outline: 0.125rem solid hsl(220, 100%, 62.5%);
|
||||
/* Make the outline always appear above other elements. */
|
||||
position: relative;
|
||||
}
|
||||
|
||||
html {
|
||||
background-color: var(--background-color);
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
||||
max-width: 50rem;
|
||||
margin: 0 auto;
|
||||
padding: 0.75rem;
|
||||
line-height: 1.618rem;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin-top: 2.5rem;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--link-color);
|
||||
text-decoration-color: var(--link-underline-color);
|
||||
text-decoration-thickness: 0.125rem;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
filter: brightness(117.5%);
|
||||
}
|
||||
|
||||
a:active {
|
||||
filter: brightness(82.5%);
|
||||
}
|
||||
|
||||
ul {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
li {
|
||||
display: block;
|
||||
}
|
||||
|
||||
li a {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
height: 4rem;
|
||||
margin-left: 0.5rem;
|
||||
}
|
||||
|
||||
li a:hover {
|
||||
background-color: hsla(0, 0%, 50%, 0.1);
|
||||
}
|
||||
|
||||
li a * {
|
||||
float: left;
|
||||
}
|
||||
|
||||
li a p {
|
||||
height: 24px;
|
||||
margin: 20px 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Godot demo projects</h1>
|
||||
<p>
|
||||
This page lists
|
||||
<a href="https://github.com/godotengine/godot-demo-projects">official Godot demo projects</a>
|
||||
exported to HTML5 for testing purposes. These projects are deployed automatically
|
||||
on every commit on the <code>master</code> branch of the repository.
|
||||
</p>
|
||||
<p>
|
||||
The HTML5 exports on this page are provided for demonstration purposes only.
|
||||
Some of these demos may not function or render correctly on HTML5,
|
||||
especially on mobile devices.
|
||||
For best performance, it's recommended to
|
||||
<a href="https://godotengine.org/download">download</a> a native editor
|
||||
and run the demo project by importing its files in the project manager.
|
||||
</p>
|
||||
<p>
|
||||
See the
|
||||
<a href="https://docs.godotengine.org/en/stable/getting_started/workflow/export/exporting_for_web.html">Exporting for the Web</a>
|
||||
documentation for information on exporting your own projects to HTML5.
|
||||
</p>
|
||||
|
||||
<h2>List of demos</h2>
|
||||
<ul>
|
||||
<!-- The list of demos will be inserted below by the CI process. -->
|
||||
@@ -1,8 +0,0 @@
|
||||
# 2D Demos
|
||||
|
||||
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/shaders/shader_reference/shading_language.html)
|
||||
|
||||
Renderers: 4 of them are GLES 3, but most are GLES 2
|
||||
BIN
2d/area_input/box_area.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
2d/area_input/circle_area.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
5
2d/area_input/engine.cfg
Normal file
@@ -0,0 +1,5 @@
|
||||
[application]
|
||||
|
||||
name="Area 2D Input Events"
|
||||
main_scene="res://input.tscn"
|
||||
icon="res://icon.png"
|
||||
BIN
2d/area_input/icon.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
14
2d/area_input/input.gd
Normal file
@@ -0,0 +1,14 @@
|
||||
extends Area2D
|
||||
|
||||
|
||||
# Virtual from CollisionObject2D (also available as signal)
|
||||
func _input_event(viewport, event, shape_idx):
|
||||
# Convert event to local coordinates
|
||||
if (event.type == InputEvent.MOUSE_MOTION):
|
||||
event = make_input_local(event)
|
||||
get_node("label").set_text(str(event.pos))
|
||||
|
||||
|
||||
# Virtual from CollisionObject2D (also available as signal)
|
||||
func _mouse_exit():
|
||||
get_node("label").set_text("")
|
||||
109
2d/area_input/input.tscn
Normal file
@@ -0,0 +1,109 @@
|
||||
[gd_scene load_steps=6 format=1]
|
||||
|
||||
[ext_resource path="res://input.gd" type="Script" id=1]
|
||||
[ext_resource path="res://box_area.png" type="Texture" id=2]
|
||||
[ext_resource path="res://circle_area.png" type="Texture" id=3]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
extents = Vector2( 64, 64 )
|
||||
|
||||
[sub_resource type="CircleShape2D" id=2]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
radius = 64.0
|
||||
|
||||
[node name="base" type="Node2D"]
|
||||
|
||||
[node name="box" type="Area2D" parent="."]
|
||||
|
||||
transform/pos = Vector2( 212, 281 )
|
||||
transform/rot = 35.4081
|
||||
input/pickable = true
|
||||
shapes/0/shape = SubResource( 1 )
|
||||
shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 )
|
||||
shapes/0/trigger = false
|
||||
gravity_vec = Vector2( 0, 1 )
|
||||
gravity = 98.0
|
||||
linear_damp = 0.1
|
||||
angular_damp = 1.0
|
||||
script/script = ExtResource( 1 )
|
||||
|
||||
[node name="sprite" type="Sprite" parent="box"]
|
||||
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="label" type="Label" parent="box"]
|
||||
|
||||
focus/ignore_mouse = true
|
||||
focus/stop_mouse = true
|
||||
size_flags/horizontal = 2
|
||||
margin/left = -43.0
|
||||
margin/top = 71.0
|
||||
margin/right = 43.0
|
||||
margin/bottom = 84.0
|
||||
align = 1
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
|
||||
[node name="shape" type="CollisionShape2D" parent="box"]
|
||||
|
||||
shape = SubResource( 1 )
|
||||
trigger = false
|
||||
_update_shape_index = -1
|
||||
|
||||
[node name="circle" type="Area2D" parent="."]
|
||||
|
||||
transform/pos = Vector2( 547.877, 286.808 )
|
||||
transform/rot = -40.5985
|
||||
input/pickable = true
|
||||
shapes/0/shape = SubResource( 2 )
|
||||
shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 )
|
||||
shapes/0/trigger = false
|
||||
gravity_vec = Vector2( 0, 1 )
|
||||
gravity = 98.0
|
||||
linear_damp = 0.1
|
||||
angular_damp = 1.0
|
||||
script/script = ExtResource( 1 )
|
||||
|
||||
[node name="sprite" type="Sprite" parent="circle"]
|
||||
|
||||
texture = ExtResource( 3 )
|
||||
|
||||
[node name="label" type="Label" parent="circle"]
|
||||
|
||||
focus/ignore_mouse = true
|
||||
focus/stop_mouse = true
|
||||
size_flags/horizontal = 2
|
||||
margin/left = -43.0
|
||||
margin/top = 71.0
|
||||
margin/right = 43.0
|
||||
margin/bottom = 84.0
|
||||
align = 1
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
|
||||
[node name="shape" type="CollisionShape2D" parent="circle"]
|
||||
|
||||
shape = SubResource( 2 )
|
||||
trigger = false
|
||||
_update_shape_index = -1
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
|
||||
focus/ignore_mouse = true
|
||||
focus/stop_mouse = true
|
||||
size_flags/horizontal = 2
|
||||
margin/left = 0.0
|
||||
margin/top = 0.0
|
||||
margin/right = 40.0
|
||||
margin/bottom = 13.0
|
||||
text = "This demo shows how to use a regular Area2D to get input events, and how to convert the input events to local coordinates of the node.\nUnlike controls, Input on Area2D or PhysicsBody2D nodes only works properly (with scrolling) on canvas layer 0."
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
# Bullet Shower
|
||||
|
||||
This demonstrates how to manage large amounts of objects efficiently using
|
||||
low-level Servers.
|
||||
|
||||
See
|
||||
[Optimization using Servers](https://docs.godotengine.org/en/latest/tutorials/performance/using_servers.html)
|
||||
in the documentation for more information.
|
||||
|
||||
Language: GDScript
|
||||
|
||||
Renderer: GLES 2
|
||||
|
||||
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/887
|
||||
|
||||
## Screenshots
|
||||
|
||||

|
||||
|
||||

|
||||
|
Before Width: | Height: | Size: 312 B |
@@ -1,35 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/bullet.png-ff1424653e10246c11e3724e402c519e.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://bullet.png"
|
||||
dest_files=[ "res://.import/bullet.png-ff1424653e10246c11e3724e402c519e.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=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
@@ -1,93 +0,0 @@
|
||||
extends Node2D
|
||||
# This demo is an example of controling a high number of 2D objects with logic
|
||||
# and collision without using nodes in the scene. This technique is a lot more
|
||||
# efficient than using instancing and nodes, but requires more programming and
|
||||
# is less visual. Bullets are managed together in the `bullets.gd` script.
|
||||
|
||||
const BULLET_COUNT = 500
|
||||
const SPEED_MIN = 20
|
||||
const SPEED_MAX = 80
|
||||
|
||||
const bullet_image = preload("res://bullet.png")
|
||||
|
||||
var bullets = []
|
||||
var shape
|
||||
|
||||
|
||||
class Bullet:
|
||||
var position = Vector2()
|
||||
var speed = 1.0
|
||||
# The body is stored as a RID, which is an "opaque" way to access resources.
|
||||
# With large amounts of objects (thousands or more), it can be significantly
|
||||
# faster to use RIDs compared to a high-level approach.
|
||||
var body = RID()
|
||||
|
||||
|
||||
func _ready():
|
||||
randomize()
|
||||
|
||||
shape = Physics2DServer.circle_shape_create()
|
||||
# Set the collision shape's radius for each bullet in pixels.
|
||||
Physics2DServer.shape_set_data(shape, 8)
|
||||
|
||||
for _i in BULLET_COUNT:
|
||||
var bullet = Bullet.new()
|
||||
# Give each bullet its own speed.
|
||||
bullet.speed = rand_range(SPEED_MIN, SPEED_MAX)
|
||||
bullet.body = Physics2DServer.body_create()
|
||||
|
||||
Physics2DServer.body_set_space(bullet.body, get_world_2d().get_space())
|
||||
Physics2DServer.body_add_shape(bullet.body, shape)
|
||||
# Don't make bullets check collision with other bullets to improve performance.
|
||||
# Their collision mask is still configured to the default value, which allows
|
||||
# bullets to detect collisions with the player.
|
||||
Physics2DServer.body_set_collision_layer(bullet.body, 0)
|
||||
|
||||
# Place bullets randomly on the viewport and move bullets outside the
|
||||
# play area so that they fade in nicely.
|
||||
bullet.position = Vector2(
|
||||
rand_range(0, get_viewport_rect().size.x) + get_viewport_rect().size.x,
|
||||
rand_range(0, get_viewport_rect().size.y)
|
||||
)
|
||||
var transform2d = Transform2D()
|
||||
transform2d.origin = bullet.position
|
||||
Physics2DServer.body_set_state(bullet.body, Physics2DServer.BODY_STATE_TRANSFORM, transform2d)
|
||||
|
||||
bullets.push_back(bullet)
|
||||
|
||||
|
||||
func _process(_delta):
|
||||
# Order the CanvasItem to update every frame.
|
||||
update()
|
||||
|
||||
|
||||
func _physics_process(delta):
|
||||
var transform2d = Transform2D()
|
||||
var offset = get_viewport_rect().size.x + 16
|
||||
for bullet in bullets:
|
||||
bullet.position.x -= bullet.speed * delta
|
||||
|
||||
if bullet.position.x < -16:
|
||||
# The bullet has left the screen; move it back to the right.
|
||||
bullet.position.x = offset
|
||||
|
||||
transform2d.origin = bullet.position
|
||||
|
||||
Physics2DServer.body_set_state(bullet.body, Physics2DServer.BODY_STATE_TRANSFORM, transform2d)
|
||||
|
||||
|
||||
# Instead of drawing each bullet individually in a script attached to each bullet,
|
||||
# we are drawing *all* the bullets at once here.
|
||||
func _draw():
|
||||
var offset = -bullet_image.get_size() * 0.5
|
||||
for bullet in bullets:
|
||||
draw_texture(bullet_image, bullet.position + offset)
|
||||
|
||||
|
||||
# Perform cleanup operations (required to exit without error messages in the console).
|
||||
func _exit_tree():
|
||||
for bullet in bullets:
|
||||
Physics2DServer.free_rid(bullet.body)
|
||||
|
||||
Physics2DServer.free_rid(shape)
|
||||
bullets.clear()
|
||||
|
Before Width: | Height: | Size: 907 B |
@@ -1,35 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/face_happy.png-38d387d31ec13459f749c93ce3d75d80.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://face_happy.png"
|
||||
dest_files=[ "res://.import/face_happy.png-38d387d31ec13459f749c93ce3d75d80.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=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
|
Before Width: | Height: | Size: 846 B |
@@ -1,35 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/face_sad.png-0ac7165eab24f595aba17a746a66c550.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://face_sad.png"
|
||||
dest_files=[ "res://.import/face_sad.png-0ac7165eab24f595aba17a746a66c550.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=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
|
Before Width: | Height: | Size: 1.9 KiB |
@@ -1,35 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://icon.png"
|
||||
dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.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=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
@@ -1,33 +0,0 @@
|
||||
extends Node2D
|
||||
# This demo is an example of controling a high number of 2D objects with logic
|
||||
# and collision without using nodes in the scene. This technique is a lot more
|
||||
# efficient than using instancing and nodes, but requires more programming and
|
||||
# is less visual. Bullets are managed together in the `bullets.gd` script.
|
||||
|
||||
# The number of bullets currently touched by the player.
|
||||
var touching = 0
|
||||
|
||||
onready var sprite = $AnimatedSprite
|
||||
|
||||
|
||||
func _ready():
|
||||
# The player follows the mouse cursor automatically, so there's no point
|
||||
# in displaying the mouse cursor.
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
|
||||
|
||||
|
||||
func _input(event):
|
||||
if event is InputEventMouseMotion:
|
||||
position = event.position - Vector2(0, 16)
|
||||
|
||||
|
||||
func _on_body_shape_entered(_body_id, _body, _body_shape, _local_shape):
|
||||
touching += 1
|
||||
if touching >= 1:
|
||||
sprite.frame = 1
|
||||
|
||||
|
||||
func _on_body_shape_exited(_body_id, _body, _body_shape, _local_shape):
|
||||
touching -= 1
|
||||
if touching == 0:
|
||||
sprite.frame = 0
|
||||
@@ -1,40 +0,0 @@
|
||||
; Engine configuration file.
|
||||
; It's best edited using the editor UI and not directly,
|
||||
; since the parameters that go here are not all obvious.
|
||||
;
|
||||
; Format:
|
||||
; [section] ; section goes between []
|
||||
; param=value ; assign values to parameters
|
||||
|
||||
config_version=4
|
||||
|
||||
_global_script_classes=[ ]
|
||||
_global_script_class_icons={
|
||||
}
|
||||
|
||||
[application]
|
||||
|
||||
config/name="Bullet Shower"
|
||||
config/description="Demonstrates how to manage large amounts of objects efficiently using low-level Servers."
|
||||
run/main_scene="res://shower.tscn"
|
||||
config/icon="res://icon.png"
|
||||
|
||||
[display]
|
||||
|
||||
window/dpi/allow_hidpi=true
|
||||
window/stretch/mode="2d"
|
||||
window/stretch/aspect="expand"
|
||||
|
||||
[physics]
|
||||
|
||||
common/enable_pause_aware_picking=true
|
||||
2d/cell_size=64
|
||||
|
||||
[rendering]
|
||||
|
||||
quality/driver/driver_name="GLES2"
|
||||
quality/intended_usage/framebuffer_allocation=0
|
||||
quality/intended_usage/framebuffer_allocation.mobile=0
|
||||
vram_compression/import_etc=true
|
||||
vram_compression/import_etc2=false
|
||||
environment/default_clear_color=Color( 0.133333, 0.133333, 0.2, 1 )
|
||||
|
Before Width: | Height: | Size: 152 KiB |
|
Before Width: | Height: | Size: 150 KiB |
@@ -1,34 +0,0 @@
|
||||
[gd_scene load_steps=7 format=2]
|
||||
|
||||
[ext_resource path="res://bullets.gd" type="Script" id=2]
|
||||
[ext_resource path="res://face_happy.png" type="Texture" id=3]
|
||||
[ext_resource path="res://face_sad.png" type="Texture" id=4]
|
||||
[ext_resource path="res://player.gd" type="Script" id=5]
|
||||
|
||||
[sub_resource type="SpriteFrames" id=1]
|
||||
animations = [ {
|
||||
"frames": [ ExtResource( 3 ), ExtResource( 4 ) ],
|
||||
"loop": true,
|
||||
"name": "default",
|
||||
"speed": 5.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=2]
|
||||
radius = 27.0
|
||||
|
||||
[node name="Shower" type="Node2D"]
|
||||
|
||||
[node name="Bullets" type="Node2D" parent="."]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Player" type="Area2D" parent="."]
|
||||
script = ExtResource( 5 )
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="Player"]
|
||||
frames = SubResource( 1 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Player"]
|
||||
shape = SubResource( 2 )
|
||||
|
||||
[connection signal="body_shape_entered" from="Player" to="Player" method="_on_body_shape_entered"]
|
||||
[connection signal="body_shape_exited" from="Player" to="Player" method="_on_body_shape_exited"]
|
||||
2
2d/dodge_the_creeps/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
.import
|
||||
logs/
|
||||
@@ -1,31 +0,0 @@
|
||||
extends CanvasLayer
|
||||
|
||||
signal start_game
|
||||
|
||||
|
||||
func show_message(text):
|
||||
$MessageLabel.text = text
|
||||
$MessageLabel.show()
|
||||
$MessageTimer.start()
|
||||
|
||||
|
||||
func show_game_over():
|
||||
show_message("Game Over")
|
||||
yield($MessageTimer, "timeout")
|
||||
$MessageLabel.text = "Dodge the\nCreeps"
|
||||
$MessageLabel.show()
|
||||
yield(get_tree().create_timer(1), "timeout")
|
||||
$StartButton.show()
|
||||
|
||||
|
||||
func update_score(score):
|
||||
$ScoreLabel.text = str(score)
|
||||
|
||||
|
||||
func _on_StartButton_pressed():
|
||||
$StartButton.hide()
|
||||
emit_signal("start_game")
|
||||
|
||||
|
||||
func _on_MessageTimer_timeout():
|
||||
$MessageLabel.hide()
|
||||
@@ -1,61 +0,0 @@
|
||||
[gd_scene load_steps=7 format=2]
|
||||
|
||||
[ext_resource path="res://HUD.gd" type="Script" id=1]
|
||||
[ext_resource path="res://fonts/Xolonium-Regular.ttf" type="DynamicFontData" id=2]
|
||||
|
||||
[sub_resource type="DynamicFont" id=1]
|
||||
size = 64
|
||||
font_data = ExtResource( 2 )
|
||||
|
||||
[sub_resource type="DynamicFont" id=2]
|
||||
size = 64
|
||||
font_data = ExtResource( 2 )
|
||||
|
||||
[sub_resource type="InputEventAction" id=3]
|
||||
action = "start_game"
|
||||
|
||||
[sub_resource type="ShortCut" id=4]
|
||||
shortcut = SubResource( 3 )
|
||||
|
||||
[node name="HUD" type="CanvasLayer"]
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="ScoreLabel" type="Label" parent="."]
|
||||
anchor_right = 1.0
|
||||
margin_bottom = 78.0
|
||||
custom_fonts/font = SubResource( 1 )
|
||||
text = "0"
|
||||
align = 1
|
||||
|
||||
[node name="MessageLabel" type="Label" parent="."]
|
||||
anchor_top = 0.5
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 0.5
|
||||
margin_top = -79.5
|
||||
margin_bottom = 79.5
|
||||
custom_fonts/font = SubResource( 1 )
|
||||
text = "Dodge the
|
||||
Creeps"
|
||||
align = 1
|
||||
|
||||
[node name="StartButton" type="Button" parent="."]
|
||||
anchor_left = 0.5
|
||||
anchor_top = 1.0
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 1.0
|
||||
margin_left = -90.0
|
||||
margin_top = -200.0
|
||||
margin_right = 90.0
|
||||
margin_bottom = -100.0
|
||||
custom_fonts/font = SubResource( 2 )
|
||||
shortcut = SubResource( 4 )
|
||||
text = "Start"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="MessageTimer" type="Timer" parent="."]
|
||||
one_shot = true
|
||||
|
||||
[connection signal="pressed" from="StartButton" to="." method="_on_StartButton_pressed"]
|
||||
[connection signal="timeout" from="MessageTimer" to="." method="_on_MessageTimer_timeout"]
|
||||
@@ -1,21 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2017 KidsCanCode
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -1,62 +0,0 @@
|
||||
extends Node
|
||||
|
||||
export(PackedScene) var mob_scene
|
||||
var score
|
||||
|
||||
|
||||
func _ready():
|
||||
randomize()
|
||||
|
||||
|
||||
func game_over():
|
||||
$ScoreTimer.stop()
|
||||
$MobTimer.stop()
|
||||
$HUD.show_game_over()
|
||||
$Music.stop()
|
||||
$DeathSound.play()
|
||||
|
||||
|
||||
func new_game():
|
||||
get_tree().call_group("mobs", "queue_free")
|
||||
score = 0
|
||||
$Player.start($StartPosition.position)
|
||||
$StartTimer.start()
|
||||
$HUD.update_score(score)
|
||||
$HUD.show_message("Get Ready")
|
||||
$Music.play()
|
||||
|
||||
|
||||
func _on_MobTimer_timeout():
|
||||
# Create a new instance of the Mob scene.
|
||||
var mob = mob_scene.instance()
|
||||
|
||||
# Choose a random location on Path2D.
|
||||
var mob_spawn_location = get_node("MobPath/MobSpawnLocation")
|
||||
mob_spawn_location.offset = randi()
|
||||
|
||||
# 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
|
||||
|
||||
# Choose the velocity for the mob.
|
||||
var velocity = Vector2(rand_range(150.0, 250.0), 0.0)
|
||||
mob.linear_velocity = velocity.rotated(direction)
|
||||
|
||||
# Spawn the mob by adding it to the Main scene.
|
||||
add_child(mob)
|
||||
|
||||
|
||||
func _on_ScoreTimer_timeout():
|
||||
score += 1
|
||||
$HUD.update_score(score)
|
||||
|
||||
|
||||
func _on_StartTimer_timeout():
|
||||
$MobTimer.start()
|
||||
$ScoreTimer.start()
|
||||
@@ -1,55 +0,0 @@
|
||||
[gd_scene load_steps=8 format=2]
|
||||
|
||||
[ext_resource path="res://Main.gd" type="Script" id=1]
|
||||
[ext_resource path="res://Mob.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://Player.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://HUD.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://art/House In a Forest Loop.ogg" type="AudioStream" id=5]
|
||||
[ext_resource path="res://art/gameover.wav" type="AudioStream" id=6]
|
||||
|
||||
[sub_resource type="Curve2D" id=1]
|
||||
_data = {
|
||||
"points": PoolVector2Array( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 480, 0, 0, 0, 0, 0, 480, 720, 0, 0, 0, 0, 0, 720, 0, 0, 0, 0, 0, 0 )
|
||||
}
|
||||
|
||||
[node name="Main" type="Node"]
|
||||
script = ExtResource( 1 )
|
||||
mob_scene = ExtResource( 2 )
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
color = Color( 0.219608, 0.372549, 0.380392, 1 )
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource( 3 )]
|
||||
|
||||
[node name="MobTimer" type="Timer" parent="."]
|
||||
wait_time = 0.5
|
||||
|
||||
[node name="ScoreTimer" type="Timer" parent="."]
|
||||
|
||||
[node name="StartTimer" type="Timer" parent="."]
|
||||
wait_time = 2.0
|
||||
one_shot = true
|
||||
|
||||
[node name="StartPosition" type="Position2D" parent="."]
|
||||
position = Vector2( 240, 450 )
|
||||
|
||||
[node name="MobPath" type="Path2D" parent="."]
|
||||
curve = SubResource( 1 )
|
||||
|
||||
[node name="MobSpawnLocation" type="PathFollow2D" parent="MobPath"]
|
||||
|
||||
[node name="HUD" parent="." instance=ExtResource( 4 )]
|
||||
|
||||
[node name="Music" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource( 5 )
|
||||
|
||||
[node name="DeathSound" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource( 6 )
|
||||
|
||||
[connection signal="hit" from="Player" to="." method="game_over"]
|
||||
[connection signal="timeout" from="MobTimer" to="." method="_on_MobTimer_timeout"]
|
||||
[connection signal="timeout" from="ScoreTimer" to="." method="_on_ScoreTimer_timeout"]
|
||||
[connection signal="timeout" from="StartTimer" to="." method="_on_StartTimer_timeout"]
|
||||
[connection signal="start_game" from="HUD" to="." method="new_game"]
|
||||
@@ -1,11 +0,0 @@
|
||||
extends RigidBody2D
|
||||
|
||||
|
||||
func _ready():
|
||||
$AnimatedSprite.playing = true
|
||||
var mob_types = $AnimatedSprite.frames.get_animation_names()
|
||||
$AnimatedSprite.animation = mob_types[randi() % mob_types.size()]
|
||||
|
||||
|
||||
func _on_VisibilityNotifier2D_screen_exited():
|
||||
queue_free()
|
||||
@@ -1,52 +0,0 @@
|
||||
[gd_scene load_steps=10 format=2]
|
||||
|
||||
[ext_resource path="res://Mob.gd" type="Script" id=1]
|
||||
[ext_resource path="res://art/enemyFlyingAlt_1.png" type="Texture" id=2]
|
||||
[ext_resource path="res://art/enemyFlyingAlt_2.png" type="Texture" id=3]
|
||||
[ext_resource path="res://art/enemyWalking_1.png" type="Texture" id=4]
|
||||
[ext_resource path="res://art/enemyWalking_2.png" type="Texture" id=5]
|
||||
[ext_resource path="res://art/enemySwimming_1.png" type="Texture" id=6]
|
||||
[ext_resource path="res://art/enemySwimming_2.png" type="Texture" id=7]
|
||||
|
||||
[sub_resource type="SpriteFrames" id=1]
|
||||
animations = [ {
|
||||
"frames": [ ExtResource( 2 ), ExtResource( 3 ) ],
|
||||
"loop": true,
|
||||
"name": "fly",
|
||||
"speed": 3.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 6 ), ExtResource( 7 ) ],
|
||||
"loop": true,
|
||||
"name": "swim",
|
||||
"speed": 4.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 4 ), ExtResource( 5 ) ],
|
||||
"loop": true,
|
||||
"name": "walk",
|
||||
"speed": 4.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=2]
|
||||
radius = 35.2706
|
||||
height = 23.3281
|
||||
|
||||
[node name="Mob" type="RigidBody2D" groups=["mobs"]]
|
||||
collision_mask = 0
|
||||
gravity_scale = 0.0
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_group_": true
|
||||
}
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||
scale = Vector2( 0.75, 0.75 )
|
||||
frames = SubResource( 1 )
|
||||
animation = "walk"
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
rotation = 1.5708
|
||||
shape = SubResource( 2 )
|
||||
|
||||
[node name="VisibilityNotifier2D" type="VisibilityNotifier2D" parent="."]
|
||||
|
||||
[connection signal="screen_exited" from="VisibilityNotifier2D" to="." method="_on_VisibilityNotifier2D_screen_exited"]
|
||||
@@ -1,54 +0,0 @@
|
||||
extends Area2D
|
||||
|
||||
signal hit
|
||||
|
||||
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
|
||||
hide()
|
||||
|
||||
|
||||
func _process(delta):
|
||||
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)
|
||||
|
||||
if velocity.x != 0:
|
||||
$AnimatedSprite.animation = "right"
|
||||
$AnimatedSprite.flip_v = false
|
||||
$AnimatedSprite.flip_h = velocity.x < 0
|
||||
elif velocity.y != 0:
|
||||
$AnimatedSprite.animation = "up"
|
||||
$AnimatedSprite.flip_v = velocity.y > 0
|
||||
|
||||
|
||||
func start(pos):
|
||||
position = pos
|
||||
show()
|
||||
$CollisionShape2D.disabled = false
|
||||
|
||||
|
||||
func _on_Player_body_entered(_body):
|
||||
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)
|
||||
@@ -1,71 +0,0 @@
|
||||
[gd_scene load_steps=13 format=2]
|
||||
|
||||
[ext_resource path="res://Player.gd" type="Script" id=1]
|
||||
[ext_resource path="res://art/playerGrey_walk1.png" type="Texture" id=2]
|
||||
[ext_resource path="res://art/playerGrey_walk2.png" type="Texture" id=3]
|
||||
[ext_resource path="res://art/playerGrey_up1.png" type="Texture" id=4]
|
||||
[ext_resource path="res://art/playerGrey_up2.png" type="Texture" id=5]
|
||||
|
||||
[sub_resource type="SpriteFrames" id=1]
|
||||
animations = [ {
|
||||
"frames": [ ExtResource( 2 ), ExtResource( 3 ) ],
|
||||
"loop": true,
|
||||
"name": "right",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 4 ), ExtResource( 5 ) ],
|
||||
"loop": true,
|
||||
"name": "up",
|
||||
"speed": 5.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=2]
|
||||
radius = 26.1701
|
||||
height = 14.822
|
||||
|
||||
[sub_resource type="Gradient" id=3]
|
||||
colors = PoolColorArray( 1, 1, 1, 0.501961, 1, 1, 1, 0 )
|
||||
|
||||
[sub_resource type="GradientTexture" id=4]
|
||||
gradient = SubResource( 3 )
|
||||
|
||||
[sub_resource type="Curve" id=5]
|
||||
_data = [ Vector2( 0.00501098, 0.5 ), 0.0, 0.0, 0, 0, Vector2( 0.994989, 0.324 ), 0.0, 0.0, 0, 0 ]
|
||||
|
||||
[sub_resource type="CurveTexture" id=6]
|
||||
curve = SubResource( 5 )
|
||||
|
||||
[sub_resource type="ParticlesMaterial" id=7]
|
||||
flag_disable_z = true
|
||||
gravity = Vector3( 0, 0, 0 )
|
||||
initial_velocity = 1.0
|
||||
orbit_velocity = 0.0
|
||||
orbit_velocity_random = 0.0
|
||||
scale = 0.75
|
||||
scale_curve = SubResource( 6 )
|
||||
color_ramp = SubResource( 4 )
|
||||
|
||||
[node name="Player" type="Area2D"]
|
||||
z_index = 10
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_group_": true
|
||||
}
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||
scale = Vector2( 0.5, 0.5 )
|
||||
frames = SubResource( 1 )
|
||||
animation = "right"
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource( 2 )
|
||||
|
||||
[node name="Trail" type="Particles2D" parent="."]
|
||||
z_index = -1
|
||||
amount = 10
|
||||
speed_scale = 2.0
|
||||
local_coords = false
|
||||
process_material = SubResource( 7 )
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_Player_body_entered"]
|
||||
@@ -1,33 +0,0 @@
|
||||
# Dodge the Creeps
|
||||
|
||||
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 2D game"](https://docs.godotengine.org/en/latest/getting_started/first_2d_game/index.html)
|
||||
tutorial in the documentation. For more details,
|
||||
consider following the tutorial in the documentation.
|
||||
|
||||
Language: GDScript
|
||||
|
||||
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).
|
||||
|
||||
Note: There is a GDNative C++ version available [here](https://github.com/godotengine/gdnative-demos/tree/master/cpp/dodge_the_creeps).
|
||||
|
||||
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/515
|
||||
|
||||
## Screenshots
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## Copying
|
||||
|
||||
`art/House In a Forest Loop.ogg` Copyright © 2012 [HorrorPen](https://opengameart.org/users/horrorpen), [CC-BY 3.0: Attribution](http://creativecommons.org/licenses/by/3.0/). Source: https://opengameart.org/content/loop-house-in-a-forest
|
||||
|
||||
Images are from "Abstract Platformer". Created in 2016 by kenney.nl, [CC0 1.0 Universal](http://creativecommons.org/publicdomain/zero/1.0/). Source: https://www.kenney.nl/assets/abstract-platformer
|
||||
|
||||
Font is "Xolonium". Copyright © 2011-2016 Severin Meyer <sev.ch@web.de>, with Reserved Font Name Xolonium, SIL open font license version 1.1. Details are in `fonts/LICENSE.txt`.
|
||||
@@ -1,15 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="ogg_vorbis"
|
||||
type="AudioStreamOGGVorbis"
|
||||
path="res://.import/House In a Forest Loop.ogg-1a6a72ae843ad792b7039931227e8d50.oggstr"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/House In a Forest Loop.ogg"
|
||||
dest_files=[ "res://.import/House In a Forest Loop.ogg-1a6a72ae843ad792b7039931227e8d50.oggstr" ]
|
||||
|
||||
[params]
|
||||
|
||||
loop=true
|
||||
loop_offset=0
|
||||
|
Before Width: | Height: | Size: 1.9 KiB |
@@ -1,35 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/enemyFlyingAlt_1.png-559f599b16c69b112c1b53f6332e9489.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/enemyFlyingAlt_1.png"
|
||||
dest_files=[ "res://.import/enemyFlyingAlt_1.png-559f599b16c69b112c1b53f6332e9489.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=false
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
|
Before Width: | Height: | Size: 2.0 KiB |
@@ -1,35 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/enemyFlyingAlt_2.png-31dc7310eda6e1b721224f3cd932c076.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/enemyFlyingAlt_2.png"
|
||||
dest_files=[ "res://.import/enemyFlyingAlt_2.png-31dc7310eda6e1b721224f3cd932c076.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=false
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
|
Before Width: | Height: | Size: 1.9 KiB |
@@ -1,35 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/enemySwimming_1.png-dd0e11759dc3d624c8a704f6e98a3d80.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/enemySwimming_1.png"
|
||||
dest_files=[ "res://.import/enemySwimming_1.png-dd0e11759dc3d624c8a704f6e98a3d80.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=false
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
|
Before Width: | Height: | Size: 1.9 KiB |
@@ -1,35 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/enemySwimming_2.png-4c0cbc0732264c4ea3290340bd4a0a62.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/enemySwimming_2.png"
|
||||
dest_files=[ "res://.import/enemySwimming_2.png-4c0cbc0732264c4ea3290340bd4a0a62.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=false
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
|
Before Width: | Height: | Size: 1.5 KiB |
@@ -1,35 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/enemyWalking_1.png-5af6eedbe61b701677d490ffdc1e6471.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/enemyWalking_1.png"
|
||||
dest_files=[ "res://.import/enemyWalking_1.png-5af6eedbe61b701677d490ffdc1e6471.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=false
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
|
Before Width: | Height: | Size: 1.6 KiB |
@@ -1,35 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/enemyWalking_2.png-67c480ed60c35e95f5acb0436246b935.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/enemyWalking_2.png"
|
||||
dest_files=[ "res://.import/enemyWalking_2.png-67c480ed60c35e95f5acb0436246b935.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=false
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
@@ -1,23 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamSample"
|
||||
path="res://.import/gameover.wav-98c95c744b35280048c2bd093cf8a356.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/gameover.wav"
|
||||
dest_files=[ "res://.import/gameover.wav-98c95c744b35280048c2bd093cf8a356.sample" ]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=true
|
||||
edit/normalize=true
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=0
|
||||
|
Before Width: | Height: | Size: 2.7 KiB |
@@ -1,35 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/playerGrey_up1.png-6bd114d0a6beac91f48e3a7314d44564.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/playerGrey_up1.png"
|
||||
dest_files=[ "res://.import/playerGrey_up1.png-6bd114d0a6beac91f48e3a7314d44564.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=false
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
|
Before Width: | Height: | Size: 2.7 KiB |
@@ -1,35 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/playerGrey_up2.png-d6aba85f5f2675ebc7045efa7552ee79.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/playerGrey_up2.png"
|
||||
dest_files=[ "res://.import/playerGrey_up2.png-d6aba85f5f2675ebc7045efa7552ee79.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=false
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
|
Before Width: | Height: | Size: 2.7 KiB |
@@ -1,35 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/playerGrey_walk1.png-c4773fe7a7bf85d7ab732eb4458c2742.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/playerGrey_walk1.png"
|
||||
dest_files=[ "res://.import/playerGrey_walk1.png-c4773fe7a7bf85d7ab732eb4458c2742.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=false
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
|
Before Width: | Height: | Size: 2.9 KiB |
@@ -1,35 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/playerGrey_walk2.png-34d2d916366100182d08037c51884043.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/playerGrey_walk2.png"
|
||||
dest_files=[ "res://.import/playerGrey_walk2.png-34d2d916366100182d08037c51884043.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=false
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
@@ -1,253 +0,0 @@
|
||||
Please distribute this file along with the Xolonium fonts when possible.
|
||||
|
||||
|
||||
Source
|
||||
|
||||
Find the sourcefiles of Xolonium at
|
||||
<gitlab.com/sev/xolonium>
|
||||
|
||||
|
||||
Credits
|
||||
|
||||
Xolonium is created with FontForge <fontforge.org>,
|
||||
Inkscape <inkscape.org>, Python <python.org>, and
|
||||
FontTools <github.com/fonttools>.
|
||||
|
||||
It originated as a custom font for the open-source
|
||||
game Xonotic <xonotic.org>. With many thanks to the
|
||||
Xonotic community for your support.
|
||||
|
||||
|
||||
Supported OpenType features
|
||||
|
||||
case Provides case sensitive placement of punctuation,
|
||||
brackets, and math symbols for uppercase text.
|
||||
frac Replaces number/number sequences with diagonal fractions.
|
||||
Numbers that touch a slash should not exceed 10 digits.
|
||||
kern Provides kerning for Latin, Greek, and Cyrillic scripts.
|
||||
locl Dutch: Replaces j with a stressed version if it follows í.
|
||||
Sami: Replaces n-form Eng with the preferred N-form version.
|
||||
Romanian and Moldovan: Replaces ŞşŢţ with the preferred ȘșȚț.
|
||||
pnum Replaces monospaced digits with proportional versions.
|
||||
sinf Replaces digits with scientific inferiors below the baseline.
|
||||
subs Replaces digits with subscript versions on the baseline.
|
||||
sups Replaces digits with superscript versions.
|
||||
zero Replaces zero with a slashed version.
|
||||
|
||||
|
||||
Supported glyph sets
|
||||
|
||||
Adobe Latin 3
|
||||
OpenType W1G
|
||||
ISO 8859-1 Western European
|
||||
ISO 8859-2 Central European
|
||||
ISO 8859-3 South European
|
||||
ISO 8859-4 North European
|
||||
ISO 8859-5 Cyrillic
|
||||
ISO 8859-7 Greek
|
||||
ISO 8859-9 Turkish
|
||||
ISO 8859-10 Nordic
|
||||
ISO 8859-13 Baltic Rim
|
||||
ISO 8859-14 Celtic
|
||||
ISO 8859-15 Western European
|
||||
ISO 8859-16 South-Eastern European
|
||||
|
||||
|
||||
Available glyphs
|
||||
|
||||
!"#$%&'()*+,-./0123456789:;<=>?
|
||||
@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
|
||||
`abcdefghijklmnopqrstuvwxyz{|}~
|
||||
|
||||
¡¢£¤¥¦§¨©ª«¬ ®¯°±²³´µ¶·¸¹º»¼½¾¿
|
||||
ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞß
|
||||
àáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ
|
||||
ĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğ
|
||||
ĠġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľ
|
||||
ĿŀŁłŃńŅņŇňŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞş
|
||||
ŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽž
|
||||
ƒǺǻǼǽǾǿȘșȚțȷ
|
||||
|
||||
ˆˇˉ˘˙˚˛˜˝
|
||||
|
||||
ͺ;΄΅Ά·ΈΉΊΌΎΏΐ
|
||||
ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩΪΫάέήίΰ
|
||||
αβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ
|
||||
|
||||
ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛМНОП
|
||||
РСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп
|
||||
рстуфхцчшщъыьэюяѐёђѓєѕіїјљњћќѝўџ
|
||||
ѢѣѲѳѴѵҐґҒғҔҕҖҗҘҙҚқҜҝҞҟҠҡҢңҤҥҦҧҨҩ
|
||||
ҪҫҬҭҮүҰұҲҳҴҵҶҷҸҹҺһҼҽӀӁӂӇӈӋӌӏӐӑӒӓ
|
||||
ӔӕӖӗӘәӜӝӞӟӠӡӢӣӤӥӦӧӨөӮӯӰӱӲӳӴӵӶӷӸӹ
|
||||
Ԥԥ
|
||||
|
||||
ḂḃḊḋḞḟṀṁṖṗṠṡṪṫẀẁẂẃẄẅẞỲỳ
|
||||
|
||||
‒–—―‘’‚‛“”„‟†‡•…‰′″‹›‽‾⁄
|
||||
⁰⁴⁵⁶⁷⁸⁹⁺⁻⁼⁽⁾ⁿ₀₁₂₃₄₅₆₇₈₉₊₋₌₍₎
|
||||
₤₦₩₫€₯₱₹₺₽₿
|
||||
℅ℓ№℗™Ω℮
|
||||
⅛⅜⅝⅞
|
||||
←↑→↓
|
||||
∂∆∏∑−∕∙√∞∟∫≈≠≤≥
|
||||
⌖
|
||||
■▬▮▰▲▶▼◀◆◊●◢◣◤◥
|
||||
☄★☠☢☣⚙⚛⚠⚡⛔
|
||||
❇❈❌❤❰❱❲❳
|
||||
fffiflffiffl
|
||||
🌌🌍🌎🌏👽💣🔥🔫
|
||||
😁😃😄😆😇😈😉😊😎😐😒😕😘
|
||||
😛😝😞😟😠😣😭😮😲😴😵
|
||||
🚀
|
||||
|
||||
|
||||
Debugging glyphs
|
||||
|
||||
U+EFFD Font version
|
||||
U+F000 Font hinting indicator
|
||||
|
||||
|
||||
Changelog
|
||||
|
||||
Xolonium 4.1 2016-11-22 Severin Meyer <sev.ch@web.de>
|
||||
Reverted frac OpenType feature to a more stable implementation
|
||||
|
||||
Xolonium 4.0 2016-10-08 Severin Meyer <sev.ch@web.de>
|
||||
Decreased width of most glyphs
|
||||
Thinner vertical stems in Xolonium-Regular
|
||||
Thicker horizontal stems in Xolonium-Bold
|
||||
Revised diagonal stems
|
||||
Lowered middle bars
|
||||
Revised diacritical bars
|
||||
Added glyphs:
|
||||
ӏẞ₿
|
||||
U+2007 U+2008 U+2009 U+200A U+202F
|
||||
U+EFFD U+F000
|
||||
Revised glyphs:
|
||||
$&,JKQRXkwxy~¢¤ßǻ˜ζκλμξφЖУжћѴѵ∕₱₺₦₩€ℓ№≈ffffiffl
|
||||
❤🌍🌎🌏😁😄😇😈😉😊😘😭😮😴🚀
|
||||
Removed uncommon glyphs:
|
||||
ʼnſʼҌҍҎҏҾҿӃӄӇӈӚӛӪӫӬӭ
|
||||
U+0312 U+0313 U+0326
|
||||
Simplified OpenType features pnum, zero, and case
|
||||
Removed OpenType feature dlig
|
||||
Revised vertical metrics
|
||||
Merged outlines of composite glyphs in otf version
|
||||
Added ttf version with custom outlines and instructions
|
||||
Added woff and woff2 version
|
||||
|
||||
Xolonium 3.1 2015-06-10 Severin Meyer <sev.ch@web.de>
|
||||
Added currency glyphs:
|
||||
₦₩₫₱₹₺₽
|
||||
Revised glyph:
|
||||
₯
|
||||
Relicensed public release under the SIL Open Font License 1.1
|
||||
|
||||
Xolonium 3.0 2015-05-04 Severin Meyer <sev.ch@web.de>
|
||||
Decreased width of glyphs
|
||||
Decreased descender height
|
||||
Increased height of super/subscript glyphs
|
||||
Revised width of dashes, underscore, and overscore
|
||||
Sharper bends with more circular proportions
|
||||
Decreased stroke thickness of mathematical glyphs
|
||||
Revised diacritical marks
|
||||
Revised diacritical bars
|
||||
Revised Cyrillic hooks
|
||||
Revised glyphs:
|
||||
GQRYjmuwßŊŒſƒǻfffiffiffl
|
||||
ΞΨΩδζιξπςστυφω
|
||||
ЉЄДЛУЭЯбдлэяєљђєћѢѣҨҩҼҽӃӄӘә
|
||||
#$&'()*,/69?@[]{}~¡£¤¥§©®¿
|
||||
‹›₤€₯ℓ№℗℮←↑→↓∂∏∑∞≈▰☄❈❰❱❲❳😝
|
||||
Raised vertical position of mathematical glyphs
|
||||
Unified advance width of numeral and monetary glyphs
|
||||
Unified advance width of mathematical glyphs
|
||||
Revised bearings
|
||||
Rewrote kern feature
|
||||
Bolder Xolonium-Bold with improved proportions
|
||||
Updated glyph names to conform to the AGLFN 1.7
|
||||
Revised hints and PS Private Dictionary
|
||||
Added glyphs:
|
||||
ӶӷԤԥ
|
||||
Added OpenType features:
|
||||
case frac liga locl pnum sinf subs sups zero
|
||||
|
||||
Xolonium 2.4 2014-12-23 Severin Meyer <sev.ch@web.de>
|
||||
Added dingbats:
|
||||
⛔💣🔥
|
||||
Revised size and design of emoticons
|
||||
Revised dingbats:
|
||||
⌖☄☠☣⚙⚛⚠⚡❇❈🌌🌍🌎🌏🔫
|
||||
Removed dingbat:
|
||||
💥
|
||||
|
||||
Xolonium 2.3 2014-08-14 Severin Meyer <sev.ch@web.de>
|
||||
Bugfixed ε and έ, thanks to bowzee for the feedback
|
||||
|
||||
Xolonium 2.2 2014-03-01 Severin Meyer <sev.ch@web.de>
|
||||
Added dingbats:
|
||||
⌖◆●❌💥
|
||||
Revised dingbats:
|
||||
•←↑→↓◊☄★☠☣⚙⚛⚠⚡❇❈❤🌌🌍🌎🌏👽🔫🚀
|
||||
Removed dingbats:
|
||||
♻✪💡📡🔋🔧🔭
|
||||
|
||||
Xolonium 2.1 2013-10-20 Severin Meyer <sev.ch@web.de>
|
||||
Added dingbats:
|
||||
←↑→↓❰❱❲❳■▬▮▰▲▶▼◀◢◣◤◥
|
||||
☄★☠☢☣♻⚙⚛⚠⚡✪❇❈❤
|
||||
🌌🌍🌎🌏👽💡📡🔋🔧🔫🔭🚀
|
||||
😁😃😄😆😇😈😉😊😎😐😒😕
|
||||
😘😛😝😞😟😠😣😭😮😲😴😵
|
||||
|
||||
Xolonium 2.0.1 2013-07-12 Severin Meyer <sev.ch@web.de>
|
||||
Reorganised and simplified files
|
||||
|
||||
Xolonium 2.0 2012-08-11 Severin Meyer <sev.ch@web.de>
|
||||
Revised bends
|
||||
Revised thickness of uppercase diagonal stems
|
||||
Revised diacritical marks
|
||||
Revised hints and PS Private Dictionary
|
||||
Revised glyphs:
|
||||
*1469@DPRly{}§©®¶ÐÞƒΘΞαεζνξνυЄЉЊ
|
||||
ЏБЗЛУЧЪЫЬЭЯбзлчъыьэяєљњџ•€∂∙√∞∫≠
|
||||
Completed glyph sets:
|
||||
Adobe Latin 3
|
||||
OpenType World Glyph Set 1 (W1G)
|
||||
Ghostscript Standard (ghostscript-fonts-std-8.11)
|
||||
Added OpenType kern feature
|
||||
Added Xolonium-Bold
|
||||
|
||||
Xolonium 1.2 2011-02-12 Severin Meyer <sev.ch@web.de>
|
||||
Revised glyphs:
|
||||
D·Ðı
|
||||
Completed glyph sets:
|
||||
ISO 8859-7 (Greek)
|
||||
Unicode Latin Extended-A block
|
||||
Added glyphs:
|
||||
†‡•…‰⁄™∂∑−√∞≠≤≥
|
||||
|
||||
Xolonium 1.1 2011-01-17 Severin Meyer <sev.ch@web.de>
|
||||
Revised placement of cedilla and ogonek in accented glyphs
|
||||
Revised glyphs:
|
||||
,;DKTjkvwxy¥§Ð˛€
|
||||
Completed glyph sets:
|
||||
ISO 8859-2 (Central European)
|
||||
ISO 8859-3 (South European, Esperanto)
|
||||
ISO 8859-4 (North European)
|
||||
ISO 8859-5 (Cyrillic)
|
||||
ISO 8859-9 (Turkish)
|
||||
ISO 8859-10 (Nordic)
|
||||
ISO 8859-13 (Baltic Rim)
|
||||
ISO 8859-14 (Celtic)
|
||||
ISO 8859-16 (South-Eastern European)
|
||||
Added glyphs:
|
||||
ȷʼ̒ ЀЍѐѝ‒–—‘’‚‛“”„‟‹›
|
||||
|
||||
Xolonium 1.0 2011-01-04 Severin Meyer <sev.ch@web.de>
|
||||
Completed glyph sets:
|
||||
ISO 8859-1 (Western European)
|
||||
ISO 8859-15 (Western European)
|
||||
Added glyphs:
|
||||
ĄĆĘŁŃŚŹŻąćęłńśźżıˆˇ˙˚˛˜
|
||||
@@ -1,94 +0,0 @@
|
||||
Copyright 2011-2016 Severin Meyer <sev.ch@web.de>,
|
||||
with Reserved Font Name Xolonium.
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License,
|
||||
Version 1.1. This license is copied below, and is also available
|
||||
with a FAQ at <http://scripts.sil.org/OFL>
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
|
Before Width: | Height: | Size: 1.6 KiB |
@@ -1,35 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://icon.png"
|
||||
dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.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=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
@@ -1,68 +0,0 @@
|
||||
; Engine configuration file.
|
||||
; It's best edited using the editor UI and not directly,
|
||||
; since the parameters that go here are not all obvious.
|
||||
;
|
||||
; Format:
|
||||
; [section] ; section goes between []
|
||||
; param=value ; assign values to parameters
|
||||
|
||||
config_version=4
|
||||
|
||||
[application]
|
||||
|
||||
config/name="Dodge the Creeps"
|
||||
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 2D game'
|
||||
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"
|
||||
|
||||
[display]
|
||||
|
||||
window/size/width=480
|
||||
window/size/height=720
|
||||
window/stretch/mode="2d"
|
||||
window/stretch/aspect="keep"
|
||||
|
||||
[input]
|
||||
|
||||
move_left={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":-1.0,"script":null)
|
||||
]
|
||||
}
|
||||
move_right={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":15,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":1.0,"script":null)
|
||||
]
|
||||
}
|
||||
move_up={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":-1.0,"script":null)
|
||||
]
|
||||
}
|
||||
move_down={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":1.0,"script":null)
|
||||
]
|
||||
}
|
||||
start_game={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777221,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
Before Width: | Height: | Size: 12 KiB |
16
2d/dynamic_collision_shapes/ball.gd
Normal file
@@ -0,0 +1,16 @@
|
||||
extends RigidBody2D
|
||||
|
||||
# Member variables
|
||||
var timeout = 5
|
||||
|
||||
|
||||
func _process(delta):
|
||||
timeout -= delta
|
||||
if (timeout < 1):
|
||||
set_opacity(timeout)
|
||||
if (timeout < 0):
|
||||
queue_free()
|
||||
|
||||
|
||||
func _ready():
|
||||
set_process(true)
|
||||
BIN
2d/dynamic_collision_shapes/ball.png
Normal file
|
After Width: | Height: | Size: 321 B |
47
2d/dynamic_collision_shapes/ball.tscn
Normal file
@@ -0,0 +1,47 @@
|
||||
[gd_scene load_steps=4 format=1]
|
||||
|
||||
[ext_resource path="res://ball.gd" type="Script" id=1]
|
||||
[ext_resource path="res://ball.png" type="Texture" id=2]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
radius = 7.45713
|
||||
|
||||
[node name="bal" type="RigidBody2D"]
|
||||
|
||||
input/pickable = false
|
||||
shapes/0/shape = SubResource( 1 )
|
||||
shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 )
|
||||
shapes/0/trigger = false
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
mode = 0
|
||||
mass = 1.0
|
||||
friction = 1.0
|
||||
bounce = 0.0
|
||||
gravity_scale = 1.0
|
||||
custom_integrator = false
|
||||
continuous_cd = 0
|
||||
contacts_reported = 0
|
||||
contact_monitor = false
|
||||
sleeping = false
|
||||
can_sleep = true
|
||||
velocity/linear = Vector2( 0, 0 )
|
||||
velocity/angular = 0.0
|
||||
damp_override/linear = -1.0
|
||||
damp_override/angular = -1.0
|
||||
script/script = ExtResource( 1 )
|
||||
|
||||
[node name="sprite" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 0, 1 )
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
|
||||
shape = SubResource( 1 )
|
||||
trigger = false
|
||||
_update_shape_index = 0
|
||||
|
||||
|
||||
BIN
2d/dynamic_collision_shapes/box.png
Normal file
|
After Width: | Height: | Size: 253 B |
BIN
2d/dynamic_collision_shapes/circle.png
Normal file
|
After Width: | Height: | Size: 889 B |
18
2d/dynamic_collision_shapes/dynamic_colobjs.gd
Normal file
@@ -0,0 +1,18 @@
|
||||
extends Node2D
|
||||
|
||||
# Member variables
|
||||
const EMIT_INTERVAL = 0.1
|
||||
var timeout = EMIT_INTERVAL
|
||||
|
||||
|
||||
func _process(delta):
|
||||
timeout -= delta
|
||||
if (timeout < 0):
|
||||
timeout = EMIT_INTERVAL
|
||||
var ball = preload("res://ball.tscn").instance()
|
||||
ball.set_pos(Vector2(randf()*get_viewport_rect().size.x, 0))
|
||||
add_child(ball)
|
||||
|
||||
|
||||
func _ready():
|
||||
set_process(true)
|
||||
178
2d/dynamic_collision_shapes/dynamic_colobjs.tscn
Normal file
@@ -0,0 +1,178 @@
|
||||
[gd_scene load_steps=13 format=1]
|
||||
|
||||
[ext_resource path="res://dynamic_colobjs.gd" type="Script" id=1]
|
||||
[ext_resource path="res://circle.png" type="Texture" id=2]
|
||||
[ext_resource path="res://box.png" type="Texture" id=3]
|
||||
[ext_resource path="res://poly.png" type="Texture" id=4]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
radius = 28.8504
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=2]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
extents = Vector2( 32.1805, 30.0328 )
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=3]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
points = Vector2Array( 49.5669, -27.9744, 45.1564, 15.3961, 18.6931, -1.51105 )
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=4]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
points = Vector2Array( -55.093, -14.2052, -37.1739, 2.89948, -40.1345, 21.2602, -53.3067, 15.8716 )
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=5]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
points = Vector2Array( -40.1345, 21.2602, -37.1739, 2.89948, -14.386, -14.0076, -6.30005, 0.694214 )
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=6]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
points = Vector2Array( -14.386, -14.0076, 18.6931, -1.51105, 45.1564, 15.3961, -6.30005, 0.694214 )
|
||||
|
||||
[sub_resource type="Animation" id=7]
|
||||
|
||||
resource/name = "movethem"
|
||||
length = 4.0
|
||||
loop = true
|
||||
step = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("base/circle:transform/pos")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/keys = { "cont":true, "times":FloatArray( 0, 2 ), "transitions":FloatArray( 1, 1 ), "values":[ Vector2( 0, 0 ), Vector2( 52.7569, -70.845 ) ] }
|
||||
tracks/1/type = "value"
|
||||
tracks/1/path = NodePath("base/box:transform/pos")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/keys = { "cont":true, "times":FloatArray( 0, 2 ), "transitions":FloatArray( 1, 1 ), "values":[ Vector2( 193.173, -2.72076 ), Vector2( 195.894, -72.0999 ) ] }
|
||||
tracks/2/type = "value"
|
||||
tracks/2/path = NodePath("base/box:transform/rot")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/keys = { "cont":true, "times":FloatArray( 0, 2 ), "transitions":FloatArray( 1, 1 ), "values":[ 0.0, 92.8111 ] }
|
||||
tracks/3/type = "value"
|
||||
tracks/3/path = NodePath("base/polygon:transform/pos")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/keys = { "cont":true, "times":FloatArray( 0, 2 ), "transitions":FloatArray( 1, 1 ), "values":[ Vector2( 382.265, -2.72076 ), Vector2( 495.176, -10.883 ) ] }
|
||||
|
||||
[sub_resource type="Animation" id=8]
|
||||
|
||||
resource/name = "toggletrigger"
|
||||
length = 6.0
|
||||
loop = true
|
||||
step = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("base/box:trigger")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/keys = { "cont":false, "times":FloatArray( 0, 4 ), "transitions":FloatArray( 1, 1 ), "values":[ false, true ] }
|
||||
tracks/1/type = "value"
|
||||
tracks/1/path = NodePath("base/box:visibility/opacity")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/keys = { "cont":false, "times":FloatArray( 0, 4 ), "transitions":FloatArray( 1, 1 ), "values":[ 1.0, 0.2 ] }
|
||||
|
||||
[node name="base" type="Node2D"]
|
||||
|
||||
script/script = ExtResource( 1 )
|
||||
|
||||
[node name="base" type="KinematicBody2D" parent="."]
|
||||
|
||||
transform/pos = Vector2( 137, 470 )
|
||||
input/pickable = false
|
||||
shapes/0/shape = SubResource( 1 )
|
||||
shapes/0/transform = Matrix32( 1, 0, 0, 1, 7.91353, -10.6267 )
|
||||
shapes/0/trigger = false
|
||||
shapes/1/shape = SubResource( 2 )
|
||||
shapes/1/transform = Matrix32( 0.970626, -0.240595, 0.240595, 0.970626, 193.581, -13.1276 )
|
||||
shapes/1/trigger = false
|
||||
shapes/2/shape = SubResource( 3 )
|
||||
shapes/2/transform = Matrix32( 1, 0, 0, 1, 399.202, -3.9451 )
|
||||
shapes/2/trigger = false
|
||||
shapes/3/shape = SubResource( 4 )
|
||||
shapes/3/transform = Matrix32( 1, 0, 0, 1, 399.202, -3.9451 )
|
||||
shapes/3/trigger = false
|
||||
shapes/4/shape = SubResource( 5 )
|
||||
shapes/4/transform = Matrix32( 1, 0, 0, 1, 399.202, -3.9451 )
|
||||
shapes/4/trigger = false
|
||||
shapes/5/shape = SubResource( 6 )
|
||||
shapes/5/transform = Matrix32( 1, 0, 0, 1, 399.202, -3.9451 )
|
||||
shapes/5/trigger = false
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
collision/margin = 0.08
|
||||
|
||||
[node name="circle" type="CollisionShape2D" parent="base"]
|
||||
|
||||
transform/pos = Vector2( 7.91353, -10.6267 )
|
||||
shape = SubResource( 1 )
|
||||
trigger = false
|
||||
_update_shape_index = 0
|
||||
|
||||
[node name="sprite" type="Sprite" parent="base/circle"]
|
||||
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="box" type="CollisionShape2D" parent="base"]
|
||||
|
||||
transform/pos = Vector2( 193.581, -13.1276 )
|
||||
transform/rot = 13.9217
|
||||
shape = SubResource( 2 )
|
||||
trigger = false
|
||||
_update_shape_index = 1
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="base/box"]
|
||||
|
||||
texture = ExtResource( 3 )
|
||||
|
||||
[node name="polygon" type="CollisionPolygon2D" parent="base"]
|
||||
|
||||
transform/pos = Vector2( 399.202, -3.9451 )
|
||||
build_mode = 0
|
||||
polygon = Vector2Array( -55.093, -14.2052, -37.1739, 2.89948, -14.386, -14.0076, 18.6931, -1.51105, 49.5669, -27.9744, 45.1564, 15.3961, -6.30005, 0.694214, -40.1345, 21.2602, -53.3067, 15.8716 )
|
||||
shape_range = Vector2( 2, 5 )
|
||||
trigger = false
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="base/polygon"]
|
||||
|
||||
texture = ExtResource( 4 )
|
||||
|
||||
[node name="shapemove" type="AnimationPlayer" parent="."]
|
||||
|
||||
playback/process_mode = 1
|
||||
playback/default_blend_time = 0.0
|
||||
root/root = NodePath("..")
|
||||
anims/movethem = SubResource( 7 )
|
||||
playback/active = true
|
||||
playback/speed = 1.0
|
||||
blend_times = [ ]
|
||||
autoplay = "movethem"
|
||||
|
||||
[node name="triggertoggle" type="AnimationPlayer" parent="."]
|
||||
|
||||
playback/process_mode = 1
|
||||
playback/default_blend_time = 0.0
|
||||
root/root = NodePath("..")
|
||||
anims/movethem = SubResource( 7 )
|
||||
anims/toggletrigger = SubResource( 8 )
|
||||
playback/active = true
|
||||
playback/speed = 1.0
|
||||
blend_times = [ ]
|
||||
autoplay = "toggletrigger"
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
|
||||
focus/ignore_mouse = true
|
||||
focus/stop_mouse = true
|
||||
size_flags/horizontal = 2
|
||||
margin/left = 21.0
|
||||
margin/top = 21.0
|
||||
margin/right = 719.0
|
||||
margin/bottom = 73.0
|
||||
text = "This demo simply shows that it\'s possible now to move a CollisionShape and CollisionPolygon after it was created\nand also turn it into a trigger at run-time. CollisionShape will remain alive during the running game and you can\ninteract with them, even though they are just meant to be helpers.\nIt is always recommended in a real use-case scenario, to move a body instead of a shape, as that path is better optimized."
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
|
||||
|
||||
5
2d/dynamic_collision_shapes/engine.cfg
Normal file
@@ -0,0 +1,5 @@
|
||||
[application]
|
||||
|
||||
name="Run-Time CollisionShape"
|
||||
main_scene="res://dynamic_colobjs.tscn"
|
||||
icon="res://icon.png"
|
||||
BIN
2d/dynamic_collision_shapes/icon.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
2d/dynamic_collision_shapes/poly.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
@@ -1,60 +0,0 @@
|
||||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://player/Player.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://fonts/source_code_pro_explanations.tres" type="DynamicFont" id=2]
|
||||
[ext_resource path="res://debug/StatesStackDiplayer.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://debug/ControlsPanel.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://fonts/source_code_pro_explanations_bold.tres" type="DynamicFont" id=5]
|
||||
|
||||
[node name="Demo" type="Node"]
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource( 1 )]
|
||||
position = Vector2( 640, 400 )
|
||||
|
||||
[node name="Explanations" type="RichTextLabel" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_left = 10.0
|
||||
margin_top = -370.0
|
||||
margin_right = -10.0
|
||||
margin_bottom = -730.0
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
size_flags_vertical = 4
|
||||
custom_fonts/bold_font = ExtResource( 5 )
|
||||
custom_fonts/normal_font = ExtResource( 2 )
|
||||
bbcode_enabled = true
|
||||
bbcode_text = "This example shows how to apply the State programming pattern in GDScript, including Hierarchical States, and a pushdown automaton.
|
||||
|
||||
States are common in games. You can use the pattern to:
|
||||
|
||||
1. Separate each behavior and transitions between behaviors, thus make scripts shorter and easier to manage
|
||||
2. Respect the Single Responsibility Principle. Each State object represents [b]one[/b] action
|
||||
3. Improve your code's structure. Look at the scene tree and FileSystem tab: without looking at the code, you'll know what the Player can or cannot do.
|
||||
|
||||
You can read more about States in the excellent [url=http://gameprogrammingpatterns.com/state.html]Game Programming Patterns ebook[/url]."
|
||||
text = "This example shows how to apply the State programming pattern in GDScript, including Hierarchical States, and a pushdown automaton.
|
||||
|
||||
States are common in games. You can use the pattern to:
|
||||
|
||||
1. Separate each behavior and transitions between behaviors, thus make scripts shorter and easier to manage
|
||||
2. Respect the Single Responsibility Principle. Each State object represents one action
|
||||
3. Improve your code's structure. Look at the scene tree and FileSystem tab: without looking at the code, you'll know what the Player can or cannot do.
|
||||
|
||||
You can read more about States in the excellent Game Programming Patterns ebook."
|
||||
__meta__ = {
|
||||
"_edit_lock_": true
|
||||
}
|
||||
|
||||
[node name="Control" type="Control" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="StatesStackDiplayer" parent="Control" instance=ExtResource( 3 )]
|
||||
|
||||
[node name="ControlsPanel" parent="Control" instance=ExtResource( 4 )]
|
||||
|
||||
[editable path="Player"]
|
||||
@@ -1,32 +0,0 @@
|
||||
# Hierarchical Finite State Machine
|
||||
|
||||
This example shows how to apply the State machine programming
|
||||
pattern in GDscript, including Hierarchical States, and a
|
||||
pushdown automaton.
|
||||
|
||||
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:
|
||||
|
||||
1. Separate each behavior and transitions between behaviors,
|
||||
thus make scripts shorter and easier to manage.
|
||||
|
||||
2. Respect the Single Responsibility Principle.
|
||||
Each State object represents one action.
|
||||
|
||||
3. Improve your code's structure. Look at the scene tree and
|
||||
FileSystem tab: without looking at the code, you'll know
|
||||
what the Player can or cannot do.
|
||||
|
||||
You can read more about States in the excellent
|
||||
[Game Programming Patterns ebook](https://gameprogrammingpatterns.com/state.html).
|
||||
|
||||
## Screenshots
|
||||
|
||||

|
||||
@@ -1,38 +0,0 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://fonts/source_code_pro_explanations.tres" type="DynamicFont" id=1]
|
||||
|
||||
[node name="ControlsPanel" type="Panel"]
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
margin_left = -220.0
|
||||
margin_bottom = 170.0
|
||||
|
||||
[node name="Keys" type="Label" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_left = 10.0
|
||||
margin_top = 10.0
|
||||
margin_right = -10.0
|
||||
margin_bottom = -10.0
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "Shoot:
|
||||
Attack:
|
||||
Stagger:
|
||||
Jump:
|
||||
Sprint:"
|
||||
|
||||
[node name="Keys2" type="Label" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_left = 10.0
|
||||
margin_top = 10.0
|
||||
margin_right = -10.0
|
||||
margin_bottom = -10.0
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "R
|
||||
F
|
||||
X
|
||||
Space
|
||||
Shift"
|
||||
align = 2
|
||||
@@ -1,39 +0,0 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://fonts/source_code_pro_explanations_bold.tres" type="DynamicFont" id=1]
|
||||
[ext_resource path="res://fonts/source_code_pro_explanations.tres" type="DynamicFont" id=2]
|
||||
|
||||
[node name="Explanations" type="RichTextLabel"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_left = 10.0
|
||||
margin_top = -370.0
|
||||
margin_right = -10.0
|
||||
margin_bottom = -730.0
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
size_flags_vertical = 4
|
||||
custom_fonts/bold_font = ExtResource( 1 )
|
||||
custom_fonts/normal_font = ExtResource( 2 )
|
||||
bbcode_enabled = true
|
||||
bbcode_text = "This example shows how to apply the State programming pattern in GDscript, including Hierarchical States, and a pushdown automaton.
|
||||
|
||||
States are common in games. You can use the pattern to:
|
||||
|
||||
1. Separate each behavior and transitions between behaviors, thus make scripts shorter and easier to manage
|
||||
2. Respect the Single Responsibility Principle. Each State object represents [b]one[/b] action
|
||||
3. Improve your code's structure. Look at the scene tree and FileSystem tab: without looking at the code, you'll know what the Player can or cannot do.
|
||||
|
||||
You can read more about States in the excellent [url=http://gameprogrammingpatterns.com/state.html]Game Programming Patterns ebook[/url]."
|
||||
text = "This example shows how to apply the State programming pattern in GDscript, including Hierarchical States, and a pushdown automaton.
|
||||
|
||||
States are common in games. You can use the pattern to:
|
||||
|
||||
1. Separate each behavior and transitions between behaviors, thus make scripts shorter and easier to manage
|
||||
2. Respect the Single Responsibility Principle. Each State object represents one action
|
||||
3. Improve your code's structure. Look at the scene tree and FileSystem tab: without looking at the code, you'll know what the Player can or cannot do.
|
||||
|
||||
You can read more about States in the excellent Game Programming Patterns ebook."
|
||||
__meta__ = {
|
||||
"_edit_lock_": true
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://debug/states_stack_displayer.gd" type="Script" id=1]
|
||||
[ext_resource path="res://fonts/SourceCodePro-Bold.ttf" type="DynamicFontData" id=2]
|
||||
|
||||
[sub_resource type="DynamicFont" id=1]
|
||||
size = 20
|
||||
use_filter = true
|
||||
font_data = ExtResource( 2 )
|
||||
|
||||
[node name="StatesStackDiplayer" type="Panel"]
|
||||
margin_right = 210.0
|
||||
margin_bottom = 170.0
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_group_": true
|
||||
}
|
||||
|
||||
[node name="Title" type="Label" parent="."]
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
margin_left = -105.0
|
||||
margin_right = 105.0
|
||||
margin_bottom = 40.0
|
||||
custom_fonts/font = SubResource( 1 )
|
||||
text = "Pushown"
|
||||
align = 1
|
||||
valign = 1
|
||||
uppercase = true
|
||||
|
||||
[node name="States" type="Label" parent="."]
|
||||
margin_left = 20.0
|
||||
margin_top = 50.0
|
||||
margin_right = 190.0
|
||||
margin_bottom = 170.0
|
||||
custom_fonts/font = SubResource( 1 )
|
||||
text = "Jump
|
||||
Test"
|
||||
align = 1
|
||||
|
||||
[node name="Numbers" type="Label" parent="."]
|
||||
margin_left = 20.0
|
||||
margin_top = 50.0
|
||||
margin_right = 190.0
|
||||
margin_bottom = 170.0
|
||||
custom_fonts/font = SubResource( 1 )
|
||||
text = "1.
|
||||
2."
|
||||
@@ -1,15 +0,0 @@
|
||||
extends Panel
|
||||
|
||||
onready var fsm_node = get_node("../../Player/StateMachine")
|
||||
|
||||
|
||||
func _process(_delta):
|
||||
var states_names = ""
|
||||
var numbers = ""
|
||||
var index = 0
|
||||
for state in fsm_node.states_stack:
|
||||
states_names += String(state.get_name()) + "\n"
|
||||
numbers += str(index) + "\n"
|
||||
index += 1
|
||||
$States.text = states_names
|
||||
$Numbers.text = numbers
|
||||
@@ -1,12 +0,0 @@
|
||||
[gd_resource type="DynamicFont" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://fonts/SourceCodePro-Bold.ttf" type="DynamicFontData" id=1]
|
||||
|
||||
[resource]
|
||||
|
||||
size = 20
|
||||
use_mipmaps = false
|
||||
use_filter = true
|
||||
font_data = ExtResource( 1 )
|
||||
_sections_unfolded = [ "Font", "Settings" ]
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
[gd_resource type="DynamicFont" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://fonts/SourceCodePro-Black.ttf" type="DynamicFontData" id=1]
|
||||
|
||||
[resource]
|
||||
|
||||
size = 24
|
||||
use_mipmaps = false
|
||||
use_filter = true
|
||||
font_data = ExtResource( 1 )
|
||||
_sections_unfolded = [ "Font", "Settings" ]
|
||||
|
||||
|
Before Width: | Height: | Size: 2.1 KiB |
@@ -1,35 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://icon.png"
|
||||
dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.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=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
@@ -1,124 +0,0 @@
|
||||
[gd_scene load_steps=20 format=2]
|
||||
|
||||
[ext_resource path="res://player/player_controller.gd" type="Script" id=1]
|
||||
[ext_resource path="res://player/player_state_machine.gd" type="Script" id=2]
|
||||
[ext_resource path="res://player/states/motion/on_ground/idle.gd" type="Script" id=3]
|
||||
[ext_resource path="res://player/states/motion/on_ground/move.gd" type="Script" id=4]
|
||||
[ext_resource path="res://player/states/motion/in_air/jump.gd" type="Script" id=5]
|
||||
[ext_resource path="res://player/states/combat/stagger.gd" type="Script" id=6]
|
||||
[ext_resource path="res://player/states/combat/attack.gd" type="Script" id=7]
|
||||
[ext_resource path="res://player/states/die.gd" type="Script" id=8]
|
||||
[ext_resource path="res://player/shadow.png" type="Texture" id=9]
|
||||
[ext_resource path="res://player/body.png" type="Texture" id=10]
|
||||
[ext_resource path="res://player/bullet/bullet_spawner.gd" type="Script" id=11]
|
||||
[ext_resource path="res://player/weapon/weapon_pivot.gd" type="Script" id=12]
|
||||
[ext_resource path="res://player/weapon/Sword.tscn" type="PackedScene" id=13]
|
||||
[ext_resource path="res://fonts/SourceCodePro-Bold.ttf" type="DynamicFontData" id=14]
|
||||
[ext_resource path="res://player/states/debug/state_name_displayer.gd" type="Script" id=15]
|
||||
|
||||
[sub_resource type="Animation" id=1]
|
||||
|
||||
[sub_resource type="Animation" id=2]
|
||||
length = 0.6
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("BodyPivot/Body:modulate")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.4 ),
|
||||
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1 ),
|
||||
"update": 0,
|
||||
"values": [ Color( 1, 1, 1, 1 ), Color( 1, 0, 0, 1 ), Color( 1, 1, 1, 1 ), Color( 1, 0, 0, 1 ), Color( 1, 1, 1, 1 ), Color( 1, 0, 0, 1 ), Color( 1, 1, 1, 1 ) ]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id=3]
|
||||
|
||||
[sub_resource type="DynamicFont" id=4]
|
||||
size = 20
|
||||
use_filter = true
|
||||
font_data = ExtResource( 14 )
|
||||
|
||||
[node name="Player" type="KinematicBody2D"]
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_horizontal_guides_": [ ]
|
||||
}
|
||||
|
||||
[node name="StateMachine" type="Node" parent="."]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Idle" type="Node" parent="StateMachine"]
|
||||
script = ExtResource( 3 )
|
||||
|
||||
[node name="Move" type="Node" parent="StateMachine"]
|
||||
script = ExtResource( 4 )
|
||||
|
||||
[node name="Jump" type="Node" parent="StateMachine"]
|
||||
script = ExtResource( 5 )
|
||||
|
||||
[node name="Stagger" type="Node" parent="StateMachine"]
|
||||
script = ExtResource( 6 )
|
||||
|
||||
[node name="Attack" type="Node" parent="StateMachine"]
|
||||
script = ExtResource( 7 )
|
||||
|
||||
[node name="Die" type="Node" parent="StateMachine"]
|
||||
script = ExtResource( 8 )
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
anims/idle = SubResource( 1 )
|
||||
anims/stagger = SubResource( 2 )
|
||||
anims/walk = SubResource( 3 )
|
||||
|
||||
[node name="Shadow" type="Sprite" parent="."]
|
||||
self_modulate = Color( 1, 1, 1, 0.361098 )
|
||||
position = Vector2( 0, -4 )
|
||||
texture = ExtResource( 9 )
|
||||
|
||||
[node name="BodyPivot" type="Position2D" parent="."]
|
||||
|
||||
[node name="Body" type="Sprite" parent="BodyPivot"]
|
||||
position = Vector2( 0, -58 )
|
||||
texture = ExtResource( 10 )
|
||||
|
||||
[node name="BulletSpawn" type="Node2D" parent="BodyPivot"]
|
||||
position = Vector2( 0, -58 )
|
||||
script = ExtResource( 11 )
|
||||
|
||||
[node name="CooldownTimer" type="Timer" parent="BodyPivot/BulletSpawn"]
|
||||
wait_time = 0.2
|
||||
one_shot = true
|
||||
|
||||
[node name="WeaponPivot" type="Position2D" parent="BodyPivot"]
|
||||
position = Vector2( 0, -58 )
|
||||
script = ExtResource( 12 )
|
||||
|
||||
[node name="Offset" type="Position2D" parent="BodyPivot/WeaponPivot"]
|
||||
position = Vector2( 110, 0 )
|
||||
|
||||
[node name="Sword" parent="BodyPivot/WeaponPivot/Offset" instance=ExtResource( 13 )]
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
|
||||
polygon = PoolVector2Array( -20, 0, -20, -20, 20, -20, 20, 0 )
|
||||
|
||||
[node name="StateNameDisplayer" type="Label" parent="."]
|
||||
margin_left = -109.0
|
||||
margin_top = -172.0
|
||||
margin_right = 110.0
|
||||
margin_bottom = -138.0
|
||||
custom_fonts/font = SubResource( 4 )
|
||||
text = "Idle"
|
||||
align = 1
|
||||
valign = 1
|
||||
uppercase = true
|
||||
script = ExtResource( 15 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[connection signal="state_changed" from="StateMachine" to="BodyPivot/WeaponPivot/Offset/Sword" method="_on_StateMachine_state_changed"]
|
||||
[connection signal="state_changed" from="StateMachine" to="StateNameDisplayer" method="_on_StateMachine_state_changed"]
|
||||
[connection signal="animation_finished" from="AnimationPlayer" to="StateMachine" method="_on_animation_finished"]
|
||||
[connection signal="attack_finished" from="BodyPivot/WeaponPivot/Offset/Sword" to="StateMachine/Attack" method="_on_Sword_attack_finished"]
|
||||