Compare commits

..

33 Commits
3.0 ... 2.1

Author SHA1 Message Date
Aaron Franke
238b5f001c [2.1] Simplify list of branches in the README (#1255) 2025-10-02 16:35:34 -07:00
Rémi Verschelde
9537d1fc99 Update README for new branches, matches Godot upstream
(cherry picked from commit c0180d20d1)
2023-02-28 18:37:29 +01:00
Aaron Franke
0b47703fc4 [2.1] Update README for the new 3.3 branch 2021-11-05 10:14:42 -05:00
Aaron Franke
c231e2abba Merge pull request #608 from aaronfranke/2.1-readme-license-3.2
[2.1] Update README for the new 3.2 branch
2021-04-21 03:50:38 -05:00
Aaron Franke
b02987981b [2.1] Update README for the new 3.2 branch 2021-04-04 01:15:25 -04:00
Aaron Franke
7dec39be19 Merge pull request #402 from aaronfranke/2.1-readme-license
[2.1] Update README and LICENSE
2020-02-03 17:06:35 -05:00
Aaron Franke
1ef7c8defb [2.1] Update README and LICENSE 2020-02-03 17:02:18 -05:00
Aaron Franke
238057d534 Merge pull request #269 from PetePete1984/space-shooter-rework
Update Space Shooter demo to 2.1.5
2020-01-21 22:06:31 -05:00
PetePete1984
4221882f58 Update Space Shooter demo to 2.1.5
Major changes:
- added Readme
- included sensible directory structure
- resizable window now uses stretching
- main menu UI organized in containers
- less reliance on get_parent() or get_node("..") calls
- more usage of signals and groups
- split the large level scene into enemies & tilemap scenes
- moved the hud out of the player scene and into the main game scene
- player can now shoot by holding the space bar

Room for improvement:
- the enemies use very similar code and could be generalized more
2018-08-02 18:03:42 +02:00
Rémi Verschelde
9587296412 Merge pull request #232 from Calinou/improve-readme-2.1
Reorganize the README and make the version compatibility notice clearer
2018-03-26 20:58:49 +02:00
Hugo Locurcio
5f65fcbca1 Reorganize the README and make the version compatibility notice clearer 2018-03-26 18:44:50 +02:00
Rémi Verschelde
af5d7a1598 Merge pull request #173 from RandomShaper/adpod-mt-2.1
Examples about (multi)touch events (2.1)
2018-01-09 22:31:30 +01:00
Pedro J. Estébanez
b6db599fa1 Examples about (multi)touch events 2017-12-07 03:42:48 +01:00
Rémi Verschelde
0eec5d704a Merge pull request #101 from mhilbrunner/patch-1
README: Different branches for Godot versions
2017-11-28 17:59:41 +01:00
Max Hilbrunner
864b185f51 README: Different branches for Godot versions 2017-11-28 17:31:57 +01:00
Rémi Verschelde
35d4415184 Merge pull request #64 from ISylvox/spaceshooter-fix
[2.1] 2D/space_shooter: Some tweaks
2017-10-29 16:53:41 +01:00
Rémi Verschelde
951315dd26 Merge pull request #63 from ISylvox/3dplatformer-smallfix
[2.1] 3D/platformer: Adjust Player's collision capsule
2017-10-29 16:53:25 +01:00
Rémi Verschelde
71e832089d Input mapping: Add code to load/save config 2017-09-24 16:58:38 +02:00
Rémi Verschelde
fdcdd2ea5b Merge pull request #62 from ISylvox/rubegoldberg-smallfix
Rubegoldberg/engine.cfg: Changed the deprecated 'default_density' to 'default_linear_damp'
2017-09-04 10:45:52 +02:00
Indah Sylvia
2666ea133b 2D/space_shooter tweaks:
- renamed the project
- made the ship can't do shooting when killed
2017-09-04 03:19:10 +07:00
Indah Sylvia
2ce07fd572 3D/platformer: Adjust Player's collision capsule 2017-09-03 14:48:38 +07:00
Indah Sylvia
ff8052794b Rubegoldberg/engine.cfg: 'default_density' to 'default_linear_damp' 2017-09-03 13:55:08 +07:00
Rémi Verschelde
d88403cec1 Merge pull request #60 from eon-s/2.1
Added platformer demo with kinematic character from 2.2
2017-08-29 07:53:01 +02:00
eon-s
b6390ebc4d Added platformer demo with kinematic character from 2.2
Has some fixes on the input handling (replacing just_pressed), fix motion enabled, corrections on enemy scene and tilemap.
2017-08-28 20:14:53 -03:00
Rémi Verschelde
5fe6147a34 Add gitignore 2017-07-15 12:34:17 +02:00
Rémi Verschelde
4621cbd2d3 Tween Demo: Fix sprite and color pickers display 2017-07-15 12:33:34 +02:00
Rémi Verschelde
cbccc3a3da Allow changing player facing side while in the air
* As soon as the user wants to change direction while in the air, change
  the character's facing side.
* This allows for example shooting left then right while in the air and
  gives a better feeling.

Adapted from @stormi's 8ff2aec4f1.
2017-04-11 22:24:27 +02:00
Mario Schlack
491aef3974 Added Input.set_mouse_mode(...) test cases.
(cherry picked from commit ee75abef10)
2017-01-21 16:32:42 +01:00
Rémi Verschelde
67313fc1be Merge pull request #34 from Faless/split_screen_rebased
Backport split screen platformer to 2.1 compatibile API
2017-01-19 11:19:33 +01:00
Fabio Alessandrelli
ed6ae9dc2f Implement split screen in "Split Screen Platformer" 2017-01-14 02:14:19 +01:00
Fabio Alessandrelli
5260eeabc7 Copy 2D platformer code to new split screen platformer folder 2017-01-14 02:14:08 +01:00
Rémi Verschelde
f18d5d02c3 Remove empty inverse kinematics demo
Fixes #27.

(cherry picked from commit 50895875ed)
2016-12-04 11:29:26 +01:00
William Tumeo
ed9494f251 free coin in 3D platformer
(cherry picked from commit 76bfb10deb)
2016-11-16 19:17:44 +01:00
1613 changed files with 19178 additions and 53383 deletions

View File

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

BIN
2d/area_input/box_area.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

5
2d/area_input/engine.cfg Normal file
View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

14
2d/area_input/input.gd Normal file
View 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
View 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

View File

@@ -1,2 +0,0 @@
.import
logs/

View File

@@ -1,25 +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")
$StartButton.show()
$MessageLabel.text = "Dodge the\nCreeps!"
$MessageLabel.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()

View File

@@ -1,126 +0,0 @@
[gd_scene load_steps=6 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
use_mipmaps = false
use_filter = false
font_data = ExtResource( 2 )
_sections_unfolded = [ "Font", "Settings" ]
[sub_resource type="DynamicFont" id=2]
size = 72
use_mipmaps = false
use_filter = false
font_data = ExtResource( 2 )
_sections_unfolded = [ "Font", "Settings" ]
[sub_resource type="DynamicFont" id=3]
size = 48
use_mipmaps = false
use_filter = false
font_data = ExtResource( 2 )
_sections_unfolded = [ "Font", "Settings" ]
[node name="HUD" type="CanvasLayer"]
layer = 1
offset = Vector2( 0, 0 )
rotation = 0.0
scale = Vector2( 1, 1 )
transform = Transform2D( 1, 0, 0, 1, 0, 0 )
script = ExtResource( 1 )
[node name="ScoreLabel" type="Label" parent="." index="0"]
anchor_left = 0.5
anchor_top = 0.0
anchor_right = 0.5
anchor_bottom = 0.0
margin_left = -25.0
margin_right = 25.0
margin_bottom = 100.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 4
custom_fonts/font = SubResource( 1 )
text = "0"
align = 1
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
_sections_unfolded = [ "Anchor", "Margin", "custom_fonts" ]
[node name="MessageLabel" type="Label" parent="." index="1"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -200.0
margin_top = -150.0
margin_right = 200.0
margin_bottom = 50.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 4
custom_fonts/font = SubResource( 2 )
text = "Dodge the
Creeps!"
align = 1
valign = 1
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
_sections_unfolded = [ "Anchor", "Margin", "custom_fonts" ]
[node name="MessageTimer" type="Timer" parent="." index="2"]
process_mode = 1
wait_time = 2.0
one_shot = true
autostart = false
[node name="StartButton" type="Button" parent="." index="3"]
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
margin_left = -100.0
margin_top = -200.0
margin_right = 100.0
margin_bottom = -100.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
focus_mode = 2
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
custom_fonts/font = SubResource( 3 )
toggle_mode = false
enabled_focus_mode = 2
shortcut = null
group = null
text = "Start"
flat = false
align = 1
_sections_unfolded = [ "Anchor", "Margin", "Visibility", "custom_fonts" ]
[connection signal="timeout" from="MessageTimer" to="." method="_on_MessageTimer_timeout"]
[connection signal="pressed" from="StartButton" to="." method="_on_StartButton_pressed"]

View File

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

View File

@@ -1,42 +0,0 @@
extends Node
export (PackedScene) var Mob
var score
func _ready():
randomize()
func new_game():
score = 0
$HUD.update_score(score)
$Player.start($StartPosition.position)
$StartTimer.start()
$HUD.show_message("Get Ready")
$Music.play()
func game_over():
$DeathSound.play()
$Music.stop()
$ScoreTimer.stop()
$MobTimer.stop()
$HUD.show_game_over()
func _on_MobTimer_timeout():
# choose a random location on the Path2D
$MobPath/MobSpawnLocation.set_offset(randi())
var mob = Mob.instance()
add_child(mob)
var direction = $MobPath/MobSpawnLocation.rotation + PI/2
mob.position = $MobPath/MobSpawnLocation.position
# add some randomness to the direction
direction += rand_range(-PI/4, PI/4)
mob.rotation = direction
mob.set_linear_velocity(Vector2(rand_range(mob.MIN_SPEED, mob.MAX_SPEED), 0).rotated(direction))
func _on_StartTimer_timeout():
$MobTimer.start()
$ScoreTimer.start()
func _on_ScoreTimer_timeout():
score += 1
$HUD.update_score(score)

View File

@@ -1,112 +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]
bake_interval = 5.0
_data = {
"points": PoolVector2Array( 0, 0, 0, 0, 1.70602, 3.56798, 0, 0, 0, 0, 482.263, 3.26522, 0, 0, 0, 0, 480.489, 729.458, 0, 0, 0, 0, 0.794434, 732.118, 0, 0, 0, 0, 1.97066, 3.83263 )
}
[node name="Main" type="Node" index="0"]
script = ExtResource( 1 )
Mob = ExtResource( 2 )
[node name="ColorRect" type="ColorRect" parent="." index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 486.0
margin_bottom = 734.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
color = Color( 0.253451, 0.425288, 0.429412, 1 )
[node name="Player" parent="." index="1" instance=ExtResource( 3 )]
[node name="MobTimer" type="Timer" parent="." index="2"]
process_mode = 1
wait_time = 0.5
one_shot = false
autostart = false
[node name="ScoreTimer" type="Timer" parent="." index="3"]
process_mode = 1
wait_time = 1.0
one_shot = false
autostart = false
[node name="StartTimer" type="Timer" parent="." index="4"]
process_mode = 1
wait_time = 2.0
one_shot = true
autostart = false
[node name="StartPosition" type="Position2D" parent="." index="5"]
position = Vector2( 240, 450 )
_sections_unfolded = [ "Transform" ]
[node name="HUD" parent="." index="6" instance=ExtResource( 4 )]
transform = Transform2D( 1, 0, 0, 1, 0, 0 )
[node name="Music" type="AudioStreamPlayer" parent="." index="7"]
stream = ExtResource( 5 )
volume_db = -8.0
autoplay = false
mix_target = 0
bus = "Master"
[node name="DeathSound" type="AudioStreamPlayer" parent="." index="8"]
stream = ExtResource( 6 )
volume_db = -5.0
autoplay = false
mix_target = 0
bus = "Master"
[node name="MobPath" type="Path2D" parent="." index="9"]
curve = SubResource( 1 )
[node name="MobSpawnLocation" type="PathFollow2D" parent="MobPath" index="0"]
position = Vector2( 1.70602, 3.56798 )
rotation = -0.000630111
offset = 0.0
h_offset = 0.0
v_offset = 0.0
rotate = true
cubic_interp = true
loop = true
lookahead = 4.0
[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"]

View File

@@ -1,11 +0,0 @@
extends RigidBody2D
export (int) var MIN_SPEED
export (int) var MAX_SPEED
var mob_types = ["walk", "swim", "fly"]
func _ready():
$AnimatedSprite.animation = mob_types[randi() % mob_types.size()]
func _on_Visibility_screen_exited():
queue_free()

View File

@@ -1,82 +0,0 @@
[gd_scene load_steps=10 format=2]
[ext_resource path="res://Mob.gd" type="Script" id=1]
[ext_resource path="res://art/enemyWalking_1.png" type="Texture" id=2]
[ext_resource path="res://art/enemyWalking_2.png" type="Texture" id=3]
[ext_resource path="res://art/enemyFlyingAlt_1.png" type="Texture" id=4]
[ext_resource path="res://art/enemyFlyingAlt_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": "walk",
"speed": 4.0
}, {
"frames": [ ExtResource( 4 ), ExtResource( 5 ) ],
"loop": true,
"name": "fly",
"speed": 3.0
}, {
"frames": [ ExtResource( 6 ), ExtResource( 7 ) ],
"loop": true,
"name": "swim",
"speed": 4.0
} ]
[sub_resource type="CapsuleShape2D" id=2]
custom_solver_bias = 0.0
radius = 34.8222
height = 28.8308
[node name="Mob" type="RigidBody2D"]
input_pickable = true
collision_layer = 1
collision_mask = 0
mode = 0
mass = 1.0
friction = 1.0
bounce = 0.0
gravity_scale = 0.0
custom_integrator = false
continuous_cd = 0
contacts_reported = 0
contact_monitor = false
sleeping = false
can_sleep = true
linear_velocity = Vector2( 0, 0 )
linear_damp = 0.1
angular_velocity = 0.0
angular_damp = 1.0
script = ExtResource( 1 )
_sections_unfolded = [ "Angular", "Collision", "Transform" ]
__meta__ = {
"_edit_group_": true
}
MIN_SPEED = 150
MAX_SPEED = 250
[node name="AnimatedSprite" type="AnimatedSprite" parent="." index="0"]
scale = Vector2( 0.75, 0.75 )
frames = SubResource( 1 )
animation = "swim"
playing = true
_sections_unfolded = [ "Transform" ]
[node name="Collision" type="CollisionShape2D" parent="." index="1"]
rotation = 1.5708
shape = SubResource( 2 )
_sections_unfolded = [ "Transform", "Visibility" ]
[node name="Visibility" type="VisibilityNotifier2D" parent="." index="2"]
rect = Rect2( -10, -10, 20, 20 )

View File

@@ -1,54 +0,0 @@
extends Area2D
signal hit
export (int) var SPEED
var velocity = Vector2()
var screensize
func _ready():
hide()
screensize = get_viewport_rect().size
func start(pos):
position = pos
show()
$Collision.disabled = false
func _process(delta):
velocity = Vector2()
if Input.is_action_pressed("ui_right"):
velocity.x += 1
if Input.is_action_pressed("ui_left"):
velocity.x -= 1
if Input.is_action_pressed("ui_down"):
velocity.y += 1
if Input.is_action_pressed("ui_up"):
velocity.y -= 1
if velocity.length() > 0:
velocity = velocity.normalized() * SPEED
$AnimatedSprite.play()
$Trail.emitting = true
else:
$AnimatedSprite.stop()
$Trail.emitting = false
position += velocity * delta
position.x = clamp(position.x, 0, screensize.x)
position.y = clamp(position.y, 0, screensize.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 _on_Player_body_entered( body ):
$Collision.disabled = true
hide()
emit_signal("hit")

View File

@@ -1,145 +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]
custom_solver_bias = 0.0
radius = 26.5155
height = 13.8847
[sub_resource type="Gradient" id=3]
offsets = PoolRealArray( 0, 1 )
colors = PoolColorArray( 1, 1, 1, 0.523804, 1, 1, 1, 0 )
[sub_resource type="GradientTexture" id=4]
flags = 4
gradient = SubResource( 3 )
width = 2048
[sub_resource type="Curve" id=5]
min_value = 0.0
max_value = 1.0
bake_resolution = 100
_data = [ Vector2( 0, 0.446289 ), 0.0, 0.0, 0, 0, Vector2( 1, 0.306641 ), 0.0, 0.0, 0, 0 ]
[sub_resource type="CurveTexture" id=6]
flags = 4
width = 2048
curve = SubResource( 5 )
[sub_resource type="ParticlesMaterial" id=7]
render_priority = 0
trail_divisor = 1
emission_shape = 0
flag_align_y = false
flag_rotate_y = false
flag_disable_z = true
spread = 45.0
flatness = 0.0
gravity = Vector3( 0, 0, 0 )
initial_velocity = 1.0
initial_velocity_random = 0.0
angular_velocity = 1.56945e-43
angular_velocity_random = 0.0
orbit_velocity = 0.0
orbit_velocity_random = 0.0
linear_accel = 0.0
linear_accel_random = 0.0
radial_accel = 0.0
radial_accel_random = 0.0
tangential_accel = 0.0
tangential_accel_random = 0.0
damping = 0.0
damping_random = 0.0
angle = 0.0
angle_random = 0.0
scale = 1.0
scale_random = 0.0
scale_curve = SubResource( 6 )
color_ramp = SubResource( 4 )
hue_variation = 0.0
hue_variation_random = 0.0
anim_speed = 0.0
anim_speed_random = 0.0
anim_offset = 0.0
anim_offset_random = 0.0
anim_loop = false
_sections_unfolded = [ "Color", "Gravity", "Scale" ]
[node name="Player" type="Area2D"]
input_pickable = true
gravity_vec = Vector2( 0, 1 )
gravity = 98.0
linear_damp = 0.1
angular_damp = 1.0
audio_bus_override = false
audio_bus_name = "Master"
script = ExtResource( 1 )
_sections_unfolded = [ "Transform" ]
__meta__ = {
"_edit_group_": true
}
SPEED = 400
[node name="AnimatedSprite" type="AnimatedSprite" parent="." index="0"]
scale = Vector2( 0.5, 0.5 )
frames = SubResource( 1 )
animation = "right"
_sections_unfolded = [ "Region", "Transform", "Z" ]
[node name="Collision" type="CollisionShape2D" parent="." index="1"]
shape = SubResource( 2 )
[node name="Trail" type="Particles2D" parent="." index="2"]
show_behind_parent = true
emitting = true
amount = 10
lifetime = 1.0
one_shot = false
preprocess = 0.0
speed_scale = 2.0
explosiveness = 0.0
randomness = 0.0
fixed_fps = 0
fract_delta = true
visibility_rect = Rect2( -100, -100, 200, 200 )
local_coords = false
draw_order = 0
process_material = SubResource( 7 )
texture = ExtResource( 4 )
normal_map = null
h_frames = 1
v_frames = 1
_sections_unfolded = [ "Drawing", "Process Material", "Textures", "Time", "Transform", "Visibility" ]
[connection signal="body_entered" from="." to="." method="_on_Player_body_entered"]

View File

@@ -1,14 +0,0 @@
[remap]
importer="ogg_vorbis"
type="AudioStreamOGGVorbis"
path="res://.import/House In a Forest Loop.ogg-1a6a72ae843ad792b7039931227e8d50.oggstr"
[deps]
source_md5="c395b0cc351a71713417cf862282849f"
[params]
loop=true
loop_offset=0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

View File

@@ -1,28 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/enemyFlyingAlt_1.png-559f599b16c69b112c1b53f6332e9489.stex"
[deps]
source_md5="64d9fdc23f76112a64a283673e3fd8dd"
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

View File

@@ -1,28 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/enemyFlyingAlt_2.png-31dc7310eda6e1b721224f3cd932c076.stex"
[deps]
source_md5="5281b0d2b947deb09cbf95ecf9628ae7"
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

View File

@@ -1,28 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/enemySwimming_1.png-dd0e11759dc3d624c8a704f6e98a3d80.stex"
[deps]
source_md5="5e557d1bd564dd553650de1c38746ed9"
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

View File

@@ -1,28 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/enemySwimming_2.png-4c0cbc0732264c4ea3290340bd4a0a62.stex"
[deps]
source_md5="d04b001ba2f4ac6884fdbe44b55fa656"
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

View File

@@ -1,28 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/enemyWalking_1.png-5af6eedbe61b701677d490ffdc1e6471.stex"
[deps]
source_md5="0e417b74e72f5d8f4aca0e557a735643"
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

View File

@@ -1,28 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/enemyWalking_2.png-67c480ed60c35e95f5acb0436246b935.stex"
[deps]
source_md5="838f40a8b77a0cb387dc5e5aff6bd8d5"
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

View File

@@ -1,20 +0,0 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/gameover.wav-98c95c744b35280048c2bd093cf8a356.sample"
[deps]
source_md5="fe94a3a7558cff917a5500a1298fdcac"
[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=false
compress/mode=0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

View File

@@ -1,28 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/playerGrey_up1.png-6bd114d0a6beac91f48e3a7314d44564.stex"
[deps]
source_md5="f84241d41055080a3393c9a8619f172b"
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

View File

@@ -1,28 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/playerGrey_up2.png-d6aba85f5f2675ebc7045efa7552ee79.stex"
[deps]
source_md5="57618c302a312d248705c7f045978765"
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

View File

@@ -1,28 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/playerGrey_walk1.png-c4773fe7a7bf85d7ab732eb4458c2742.stex"
[deps]
source_md5="7892ed98ba910fbda0d37266127e96bb"
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

View File

@@ -1,28 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/playerGrey_walk2.png-34d2d916366100182d08037c51884043.stex"
[deps]
source_md5="9fc73e1224a6b16d8fb5d0f667e3aed2"
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=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
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

View File

@@ -1,28 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/set3_tiles.png-7dd06b1fc0bcfaa06e9dd732f61382a2.stex"
[deps]
source_md5="eef34d896b231438a2d97707c0ab06a2"
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=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
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View File

@@ -1,2 +0,0 @@
"Abstract Platformer" by kenney.nl is licensed under http://creativecommons.org/publicdomain/zero/1.0/
"House in a Forest Loop" by https://opengameart.org/users/horrorpen is licensed under http://creativecommons.org/licenses/by/3.0/

View File

@@ -1,102 +0,0 @@
[gd_resource type="Environment" load_steps=2 format=2]
[sub_resource type="ProceduralSky" id=1]
radiance_size = 4
sky_top_color = Color( 0.0470588, 0.454902, 0.976471, 1 )
sky_horizon_color = Color( 0.556863, 0.823529, 0.909804, 1 )
sky_curve = 0.25
sky_energy = 1.0
ground_bottom_color = Color( 0.101961, 0.145098, 0.188235, 1 )
ground_horizon_color = Color( 0.482353, 0.788235, 0.952941, 1 )
ground_curve = 0.01
ground_energy = 1.0
sun_color = Color( 1, 1, 1, 1 )
sun_latitude = 35.0
sun_longitude = 0.0
sun_angle_min = 1.0
sun_angle_max = 100.0
sun_curve = 0.05
sun_energy = 16.0
texture_size = 2
[resource]
background_mode = 2
background_sky = SubResource( 1 )
background_sky_custom_fov = 0.0
background_color = Color( 0, 0, 0, 1 )
background_energy = 1.0
background_canvas_max_layer = 0
ambient_light_color = Color( 0, 0, 0, 1 )
ambient_light_energy = 1.0
ambient_light_sky_contribution = 0.0
fog_enabled = false
fog_color = Color( 0.5, 0.6, 0.7, 1 )
fog_sun_color = Color( 1, 0.9, 0.7, 1 )
fog_sun_amount = 0.0
fog_depth_enabled = true
fog_depth_begin = 10.0
fog_depth_curve = 1.0
fog_transmit_enabled = false
fog_transmit_curve = 1.0
fog_height_enabled = false
fog_height_min = 0.0
fog_height_max = 100.0
fog_height_curve = 1.0
tonemap_mode = 0
tonemap_exposure = 1.0
tonemap_white = 1.0
auto_exposure_enabled = false
auto_exposure_scale = 0.4
auto_exposure_min_luma = 0.05
auto_exposure_max_luma = 8.0
auto_exposure_speed = 0.5
ss_reflections_enabled = false
ss_reflections_max_steps = 64
ss_reflections_fade_in = 0.15
ss_reflections_fade_out = 2.0
ss_reflections_depth_tolerance = 0.2
ss_reflections_roughness = true
ssao_enabled = false
ssao_radius = 1.0
ssao_intensity = 1.0
ssao_radius2 = 0.0
ssao_intensity2 = 1.0
ssao_bias = 0.01
ssao_light_affect = 0.0
ssao_color = Color( 0, 0, 0, 1 )
ssao_quality = 0
ssao_blur = 1
ssao_edge_sharpness = 4.0
dof_blur_far_enabled = false
dof_blur_far_distance = 10.0
dof_blur_far_transition = 5.0
dof_blur_far_amount = 0.1
dof_blur_far_quality = 1
dof_blur_near_enabled = false
dof_blur_near_distance = 2.0
dof_blur_near_transition = 1.0
dof_blur_near_amount = 0.1
dof_blur_near_quality = 1
glow_enabled = false
glow_levels/1 = false
glow_levels/2 = false
glow_levels/3 = true
glow_levels/4 = false
glow_levels/5 = true
glow_levels/6 = false
glow_levels/7 = false
glow_intensity = 0.8
glow_strength = 1.0
glow_bloom = 0.0
glow_blend_mode = 2
glow_hdr_threshold = 1.0
glow_hdr_scale = 2.0
glow_bicubic_upscale = false
adjustment_enabled = false
adjustment_brightness = 1.0
adjustment_contrast = 1.0
adjustment_saturation = 1.0
_sections_unfolded = [ "Background" ]

View File

@@ -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:
ĄĆĘŁŃŚŹŻąćęłńśźżıˆˇ˙˚˛˜

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

View File

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

View File

@@ -1,29 +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=3
[application]
config/name="Dodge the Creeps"
run/main_scene="res://Main.tscn"
config/icon="res://icon.png"
[display]
window/size/width=480
window/size/height=720
window/size/resizable=false
[gdnative]
singletons=[ ]
[rendering]
environment/default_environment="res://default_env.tres"

View 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)

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 889 B

View 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)

View 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

View File

@@ -0,0 +1,5 @@
[application]
name="Run-Time CollisionShape"
main_scene="res://dynamic_colobjs.tscn"
icon="res://icon.png"

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -1,21 +0,0 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://player/Player.tscn" type="PackedScene" id=1]
[ext_resource path="res://debug/StatesStackDiplayer.tscn" type="PackedScene" id=2]
[ext_resource path="res://debug/ControlsPanel.tscn" type="PackedScene" id=3]
[ext_resource path="res://debug/Explanations.tscn" type="PackedScene" id=4]
[node name="Demo" type="Node"]
[node name="Player" parent="." index="0" instance=ExtResource( 1 )]
editor/display_folded = true
[node name="StatesStackDiplayer" parent="." index="1" instance=ExtResource( 2 )]
[node name="ControlsPanel" parent="." index="2" instance=ExtResource( 3 )]
[node name="Explanations" parent="." index="3" instance=ExtResource( 4 )]
[editable path="Player"]

View File

@@ -1,77 +0,0 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://debug/top_level_ui.gd" type="Script" id=1]
[ext_resource path="res://fonts/source_code_pro_explanations.tres" type="DynamicFont" id=2]
[node name="ControlsPanel" type="Panel" index="0"]
anchor_left = 1.0
anchor_top = 0.0
anchor_right = 1.0
anchor_bottom = 0.0
margin_left = -220.0
margin_bottom = 170.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
script = ExtResource( 1 )
[node name="Keys" type="Label" parent="." index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 10.0
margin_top = 10.0
margin_right = -10.0
margin_bottom = -10.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 4
custom_fonts/font = ExtResource( 2 )
text = "Shoot:
Attack:
Stagger:
Jump:
Sprint:"
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
_sections_unfolded = [ "BBCode", "custom_fonts" ]
[node name="Keys2" type="Label" parent="." index="1"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 10.0
margin_top = 10.0
margin_right = -10.0
margin_bottom = -10.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 4
custom_fonts/font = ExtResource( 2 )
text = "R
F
X
Space
Shift"
align = 2
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
_sections_unfolded = [ "BBCode", "custom_fonts" ]

View File

@@ -1,59 +0,0 @@
[gd_scene load_steps=4 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]
[ext_resource path="res://debug/top_level_ui.gd" type="Script" id=3]
[node name="Explanations" type="RichTextLabel"]
anchor_left = 0.0
anchor_top = 0.0
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_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
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]."
visible_characters = -1
percent_visible = 1.0
meta_underlined = true
tab_size = 4
text = "This example shows how to apply the State programming pattern in GDscript, including Hierarchical States, and a pushdown automaton.
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."
scroll_active = true
scroll_following = false
selection_enabled = false
override_selected_font_color = false
script = ExtResource( 3 )
_sections_unfolded = [ "BBCode", "custom_fonts" ]
__meta__ = {
"_edit_lock_": true
}

View File

@@ -1,108 +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_mipmaps = false
use_filter = true
font_data = ExtResource( 2 )
_sections_unfolded = [ "Font", "Settings" ]
[node name="StatesStackDiplayer" type="Panel"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 210.0
margin_bottom = 170.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
script = ExtResource( 1 )
__meta__ = {
"_edit_group_": true
}
[node name="Title" type="Label" parent="." index="0"]
anchor_left = 0.5
anchor_top = 0.0
anchor_right = 0.5
anchor_bottom = 0.0
margin_left = -105.0
margin_right = 105.0
margin_bottom = 40.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 4
custom_fonts/font = SubResource( 1 )
text = "Pushown"
align = 1
valign = 1
uppercase = true
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
_sections_unfolded = [ "custom_fonts" ]
[node name="States" type="Label" parent="." index="1"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 20.0
margin_top = 50.0
margin_right = 190.0
margin_bottom = 170.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 4
custom_fonts/font = SubResource( 1 )
text = "Jump
Test"
align = 1
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
_sections_unfolded = [ "custom_fonts" ]
[node name="Numbers" type="Label" parent="." index="2"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 20.0
margin_top = 50.0
margin_right = 190.0
margin_bottom = 170.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 4
custom_fonts/font = SubResource( 1 )
text = "1.
2."
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
_sections_unfolded = [ "custom_fonts" ]

View File

@@ -1,18 +0,0 @@
extends Panel
onready var fsm_node = get_node("../Player/StateMachine")
func _ready():
set_as_toplevel(true)
func _process(delta):
var states_names = ''
var numbers = ''
var index = 0
for state in fsm_node.states_stack:
states_names += state.get_name() + '\n'
numbers += str(index) + '\n'
index += 1
$States.text = states_names
$Numbers.text = numbers

View File

@@ -1,5 +0,0 @@
tool
extends Control
func _ready():
set_as_toplevel(true)

View File

@@ -1,101 +0,0 @@
[gd_resource type="Environment" load_steps=2 format=2]
[sub_resource type="ProceduralSky" id=1]
radiance_size = 4
sky_top_color = Color( 0.0470588, 0.454902, 0.976471, 1 )
sky_horizon_color = Color( 0.556863, 0.823529, 0.909804, 1 )
sky_curve = 0.25
sky_energy = 1.0
ground_bottom_color = Color( 0.101961, 0.145098, 0.188235, 1 )
ground_horizon_color = Color( 0.482353, 0.788235, 0.952941, 1 )
ground_curve = 0.01
ground_energy = 1.0
sun_color = Color( 1, 1, 1, 1 )
sun_latitude = 35.0
sun_longitude = 0.0
sun_angle_min = 1.0
sun_angle_max = 100.0
sun_curve = 0.05
sun_energy = 16.0
texture_size = 2
[resource]
background_mode = 2
background_sky = SubResource( 1 )
background_sky_custom_fov = 0.0
background_color = Color( 0, 0, 0, 1 )
background_energy = 1.0
background_canvas_max_layer = 0
ambient_light_color = Color( 0, 0, 0, 1 )
ambient_light_energy = 1.0
ambient_light_sky_contribution = 1.0
fog_enabled = false
fog_color = Color( 0.5, 0.6, 0.7, 1 )
fog_sun_color = Color( 1, 0.9, 0.7, 1 )
fog_sun_amount = 0.0
fog_depth_enabled = true
fog_depth_begin = 10.0
fog_depth_curve = 1.0
fog_transmit_enabled = false
fog_transmit_curve = 1.0
fog_height_enabled = false
fog_height_min = 0.0
fog_height_max = 100.0
fog_height_curve = 1.0
tonemap_mode = 0
tonemap_exposure = 1.0
tonemap_white = 1.0
auto_exposure_enabled = false
auto_exposure_scale = 0.4
auto_exposure_min_luma = 0.05
auto_exposure_max_luma = 8.0
auto_exposure_speed = 0.5
ss_reflections_enabled = false
ss_reflections_max_steps = 64
ss_reflections_fade_in = 0.15
ss_reflections_fade_out = 2.0
ss_reflections_depth_tolerance = 0.2
ss_reflections_roughness = true
ssao_enabled = false
ssao_radius = 1.0
ssao_intensity = 1.0
ssao_radius2 = 0.0
ssao_intensity2 = 1.0
ssao_bias = 0.01
ssao_light_affect = 0.0
ssao_color = Color( 0, 0, 0, 1 )
ssao_quality = 0
ssao_blur = 3
ssao_edge_sharpness = 4.0
dof_blur_far_enabled = false
dof_blur_far_distance = 10.0
dof_blur_far_transition = 5.0
dof_blur_far_amount = 0.1
dof_blur_far_quality = 1
dof_blur_near_enabled = false
dof_blur_near_distance = 2.0
dof_blur_near_transition = 1.0
dof_blur_near_amount = 0.1
dof_blur_near_quality = 1
glow_enabled = false
glow_levels/1 = false
glow_levels/2 = false
glow_levels/3 = true
glow_levels/4 = false
glow_levels/5 = true
glow_levels/6 = false
glow_levels/7 = false
glow_intensity = 0.8
glow_strength = 1.0
glow_bloom = 0.0
glow_blend_mode = 2
glow_hdr_threshold = 1.0
glow_hdr_scale = 2.0
glow_bicubic_upscale = false
adjustment_enabled = false
adjustment_brightness = 1.0
adjustment_contrast = 1.0
adjustment_saturation = 1.0

View File

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

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

View File

@@ -1,29 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
[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/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View File

@@ -1,200 +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]
length = 1.0
loop = false
step = 0.1
[sub_resource type="Animation" id=2]
length = 0.6
loop = false
step = 0.1
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]
length = 1.0
loop = false
step = 0.1
[sub_resource type="DynamicFont" id=4]
size = 20
use_mipmaps = false
use_filter = true
font_data = ExtResource( 14 )
_sections_unfolded = [ "Font", "Settings" ]
[node name="Player" type="KinematicBody2D" index="0"]
position = Vector2( 628.826, 391.266 )
input_pickable = false
collision_layer = 1
collision_mask = 1
collision/safe_margin = 0.08
script = ExtResource( 1 )
_sections_unfolded = [ "Visibility" ]
__meta__ = {
"_edit_horizontal_guides_": [ ]
}
[node name="StateMachine" type="Node" parent="." index="0"]
script = ExtResource( 2 )
START_STATE = NodePath("Idle")
[node name="Idle" type="Node" parent="StateMachine" index="0"]
script = ExtResource( 3 )
[node name="Move" type="Node" parent="StateMachine" index="1"]
script = ExtResource( 4 )
MAX_WALK_SPEED = 450
MAX_RUN_SPEED = 700
[node name="Jump" type="Node" parent="StateMachine" index="2"]
script = ExtResource( 5 )
BASE_MAX_HORIZONTAL_SPEED = 400.0
AIR_ACCELERATION = 1000.0
AIR_DECCELERATION = 2000.0
AIR_STEERING_POWER = 50.0
JUMP_HEIGHT = 120.0
JUMP_DURATION = 0.8
GRAVITY = 1600.0
[node name="Stagger" type="Node" parent="StateMachine" index="3"]
script = ExtResource( 6 )
[node name="Attack" type="Node" parent="StateMachine" index="4"]
script = ExtResource( 7 )
[node name="Die" type="Node" parent="StateMachine" index="5"]
script = ExtResource( 8 )
[node name="AnimationPlayer" type="AnimationPlayer" parent="." index="1"]
root_node = NodePath("..")
autoplay = ""
playback_process_mode = 1
playback_default_blend_time = 0.0
playback_speed = 1.0
anims/idle = SubResource( 1 )
anims/stagger = SubResource( 2 )
anims/walk = SubResource( 3 )
blend_times = [ ]
[node name="Shadow" type="Sprite" parent="." index="2"]
self_modulate = Color( 1, 1, 1, 0.361098 )
position = Vector2( 0, -4 )
texture = ExtResource( 9 )
_sections_unfolded = [ "Visibility" ]
[node name="BodyPivot" type="Position2D" parent="." index="3"]
[node name="Body" type="Sprite" parent="BodyPivot" index="0"]
position = Vector2( 0, -58.8242 )
texture = ExtResource( 10 )
[node name="BulletSpawn" type="Node2D" parent="BodyPivot" index="1"]
editor/display_folded = true
position = Vector2( 1.17401, -61.266 )
script = ExtResource( 11 )
_sections_unfolded = [ "Transform" ]
[node name="CooldownTimer" type="Timer" parent="BodyPivot/BulletSpawn" index="0"]
process_mode = 1
wait_time = 0.2
one_shot = true
autostart = false
[node name="WeaponPivot" type="Position2D" parent="BodyPivot" index="2"]
position = Vector2( 1.17401, -61.266 )
script = ExtResource( 12 )
[node name="Offset" type="Position2D" parent="BodyPivot/WeaponPivot" index="0"]
position = Vector2( 110, 0 )
[node name="Sword" parent="BodyPivot/WeaponPivot/Offset" index="0" instance=ExtResource( 13 )]
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="." index="4"]
build_mode = 0
polygon = PoolVector2Array( -20, 0, -20, -20, 20, -20, 20, 0 )
[node name="StateNameDisplayer" type="Label" parent="." index="5"]
editor/display_folded = true
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = -109.0
margin_top = -172.0
margin_right = 110.0
margin_bottom = -138.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 4
custom_fonts/font = SubResource( 4 )
text = "Test"
align = 1
valign = 1
uppercase = true
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
script = ExtResource( 15 )
_sections_unfolded = [ "Rect", "custom_fonts" ]
[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"]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

View File

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

View File

@@ -1,25 +0,0 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://player/bullet/bullet.gd" type="Script" id=1]
[sub_resource type="CircleShape2D" id=1]
custom_solver_bias = 0.0
radius = 12.0
[node name="Bullet" type="KinematicBody2D"]
input_pickable = false
collision_layer = 2
collision_mask = 2
collision/safe_margin = 0.08
script = ExtResource( 1 )
_sections_unfolded = [ "Collision", "collision" ]
SPEED = 1000.0
[node name="CollisionShape2D" type="CollisionShape2D" parent="." index="0"]
shape = SubResource( 1 )

View File

@@ -1,28 +0,0 @@
extends KinematicBody2D
var direction = Vector2()
export(float) var SPEED = 1000.0
func _ready():
set_as_toplevel(true)
func _physics_process(delta):
if is_outside_view_bounds():
queue_free()
var motion = direction * SPEED * delta
var collision_info = move_and_collide(motion)
if collision_info:
queue_free()
func is_outside_view_bounds():
return position.x > OS.get_screen_size().x or position.x < 0.0 \
or position.y > OS.get_screen_size().y or position.y < 0.0
func _draw():
draw_circle(Vector2(), $CollisionShape2D.shape.radius, Color('#ffffff'))

View File

@@ -1,16 +0,0 @@
extends Node2D
var bullet = preload("Bullet.tscn")
func _input(event):
if event.is_action_pressed("fire"):
fire(owner.look_direction)
func fire(direction):
if not $CooldownTimer.is_stopped():
return
$CooldownTimer.start()
var new_bullet = bullet.instance()
new_bullet.direction = direction
add_child(new_bullet)

View File

@@ -1,25 +0,0 @@
"""
The Player is a KinematicBody2D, in other words a physics-driven object.
It can move, collide with the world...
It HAS a state machine, but the body and the state machine are separate.
"""
extends KinematicBody2D
signal direction_changed(new_direction)
var look_direction = Vector2(1, 0) setget set_look_direction
func take_damage(attacker, amount, effect=null):
if self.is_a_parent_of(attacker):
return
$States/Stagger.knockback_direction = (attacker.global_position - global_position).normalized()
$Health.take_damage(amount, effect)
func set_dead(value):
set_process_input(not value)
set_physics_process(not value)
$CollisionPolygon2D.disabled = value
func set_look_direction(value):
look_direction = value
emit_signal("direction_changed", value)

View File

@@ -1,34 +0,0 @@
extends "res://state_machine/state_machine.gd"
func _ready():
states_map = {
"idle": $Idle,
"move": $Move,
"jump": $Jump,
"stagger": $Stagger,
"attack": $Attack,
}
func _change_state(state_name):
"""
The base state_machine interface this node extends does most of the work
"""
if not _active:
return
if state_name in ["stagger", "jump", "attack"]:
states_stack.push_front(states_map[state_name])
if state_name == "jump" and current_state == $Move:
$Jump.initialize($Move.speed, $Move.velocity)
._change_state(state_name)
func _input(event):
"""
Here we only handle input that can interrupt states, attacking in this case
otherwise we let the state node handle it
"""
if event.is_action_pressed("attack"):
if current_state in [$Attack, $Stagger]:
return
_change_state("attack")
return
current_state.handle_input(event)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 967 B

View File

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

View File

@@ -1,7 +0,0 @@
extends "res://state_machine/state.gd"
func enter():
owner.get_node("AnimationPlayer").play("idle")
func _on_Sword_attack_finished():
emit_signal("finished", "previous")

View File

@@ -1,15 +0,0 @@
"""
The stagger state end with the stagger animation from the AnimationPlayer
The animation only affects the Body Sprite"s modulate property so
it could stack with other animations if we had two AnimationPlayer nodes
"""
extends "res://state_machine/state.gd"
var knockback_direction = Vector2()
func enter():
owner.get_node("AnimationPlayer").play("stagger")
func _on_animation_finished(anim_name):
assert anim_name == "stagger"
emit_signal("finished", "previous")

View File

@@ -1,12 +0,0 @@
extends Label
var start_position = Vector2()
func _ready():
start_position = rect_position
func _physics_process(delta):
rect_position = $"../BodyPivot".position + start_position
func _on_StateMachine_state_changed(current_state):
text = current_state.get_name()

View File

@@ -1,10 +0,0 @@
extends "res://state_machine/state.gd"
# Initialize the state. E.g. change the animation
func enter():
owner.set_dead(true)
owner.get_node("AnimationPlayer").play("die")
func _on_animation_finished(anim_name):
emit_signal("finished", "dead")

View File

@@ -1,64 +0,0 @@
extends "../motion.gd"
export(float) var BASE_MAX_HORIZONTAL_SPEED = 400.0
export(float) var AIR_ACCELERATION = 1000.0
export(float) var AIR_DECCELERATION = 2000.0
export(float) var AIR_STEERING_POWER = 50.0
export(float) var JUMP_HEIGHT = 120.0
export(float) var JUMP_DURATION = 0.8
export(float) var GRAVITY = 1600.0
var enter_velocity = Vector2()
var max_horizontal_speed = 0.0
var horizontal_speed = 0.0
var horizontal_velocity = Vector2()
var vertical_speed = 0.0
var height = 0.0
func initialize(speed, velocity):
horizontal_speed = speed
max_horizontal_speed = speed if speed > 0.0 else BASE_MAX_HORIZONTAL_SPEED
enter_velocity = velocity
func enter():
var input_direction = get_input_direction()
update_look_direction(input_direction)
horizontal_velocity = enter_velocity if input_direction else Vector2()
vertical_speed = 600.0
owner.get_node("AnimationPlayer").play("idle")
func update(delta):
var input_direction = get_input_direction()
update_look_direction(input_direction)
move_horizontally(delta, input_direction)
animate_jump_height(delta)
if height <= 0.0:
emit_signal("finished", "previous")
func move_horizontally(delta, direction):
if direction:
horizontal_speed += AIR_ACCELERATION * delta
else:
horizontal_speed -= AIR_DECCELERATION * delta
horizontal_speed = clamp(horizontal_speed, 0, max_horizontal_speed)
var target_velocity = horizontal_speed * direction.normalized()
var steering_velocity = (target_velocity - horizontal_velocity).normalized() * AIR_STEERING_POWER
horizontal_velocity += steering_velocity
owner.move_and_slide(horizontal_velocity)
func animate_jump_height(delta):
vertical_speed -= GRAVITY * delta
height += vertical_speed * delta
height = max(0.0, height)
owner.get_node("BodyPivot").position.y = -height

View File

@@ -1,16 +0,0 @@
# Collection of important methods to handle direction and animation
extends "res://state_machine/state.gd"
func handle_input(event):
if event.is_action_pressed("simulate_damage"):
emit_signal("finished", "stagger")
func get_input_direction():
var input_direction = Vector2()
input_direction.x = int(Input.is_action_pressed("move_right")) - int(Input.is_action_pressed("move_left"))
input_direction.y = int(Input.is_action_pressed("move_down")) - int(Input.is_action_pressed("move_up"))
return input_direction
func update_look_direction(direction):
if direction and owner.look_direction != direction:
owner.look_direction = direction

View File

@@ -1,12 +0,0 @@
extends "on_ground.gd"
func enter():
owner.get_node("AnimationPlayer").play("idle")
func handle_input(event):
return .handle_input(event)
func update(delta):
var input_direction = get_input_direction()
if input_direction:
emit_signal("finished", "move")

View File

@@ -1,35 +0,0 @@
extends "on_ground.gd"
export(float) var MAX_WALK_SPEED = 450
export(float) var MAX_RUN_SPEED = 700
func enter():
speed = 0.0
velocity = Vector2()
var input_direction = get_input_direction()
update_look_direction(input_direction)
owner.get_node("AnimationPlayer").play("walk")
func handle_input(event):
return .handle_input(event)
func update(delta):
var input_direction = get_input_direction()
if not input_direction:
emit_signal("finished", "idle")
update_look_direction(input_direction)
speed = MAX_RUN_SPEED if Input.is_action_pressed("run") else MAX_WALK_SPEED
var collision_info = move(speed, input_direction)
if not collision_info:
return
if speed == MAX_RUN_SPEED and collision_info.collider.is_in_group("environment"):
return null
func move(speed, direction):
velocity = direction.normalized() * speed
owner.move_and_slide(velocity, Vector2(), 5, 2)
if owner.get_slide_count() == 0:
return
return owner.get_slide_collision(0)

View File

@@ -1,9 +0,0 @@
extends "../motion.gd"
var speed = 0.0
var velocity = Vector2()
func handle_input(event):
if event.is_action_pressed("jump"):
emit_signal("finished", "jump")
return .handle_input(event)

View File

@@ -1,278 +0,0 @@
[gd_scene load_steps=8 format=2]
[ext_resource path="res://player/weapon/sword.gd" type="Script" id=1]
[ext_resource path="res://player/weapon/sword.png" type="Texture" id=2]
[sub_resource type="Animation" id=1]
resource_name = "SETUP"
length = 1.0
loop = false
step = 0.1
tracks/0/type = "value"
tracks/0/path = NodePath(".:rotation_degrees")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ 0.0 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath(".:scale")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Vector2( 1, 1 ) ]
}
tracks/2/type = "value"
tracks/2/path = NodePath(".:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
tracks/3/type = "value"
tracks/3/path = NodePath(".:monitoring")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
tracks/4/type = "value"
tracks/4/path = NodePath(".:monitorable")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ false ]
}
[sub_resource type="Animation" id=2]
resource_name = "attack_circular"
length = 0.3
loop = false
step = 0.05
tracks/0/type = "value"
tracks/0/path = NodePath(".:rotation_degrees")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.15, 0.2 ),
"transitions": PoolRealArray( 0.439427, 1, 1 ),
"update": 0,
"values": [ -100.0, 100.0, 90.0 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath(".:scale")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.05, 0.15, 0.2 ),
"transitions": PoolRealArray( 1, 2.50795, 1, 1 ),
"update": 0,
"values": [ Vector2( 1, 1 ), Vector2( 1, 1.3 ), Vector2( 1, 1 ), Vector2( 1, 1 ) ]
}
tracks/2/type = "value"
tracks/2/path = NodePath(".:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
[sub_resource type="Animation" id=3]
length = 0.45
loop = false
step = 0.05
tracks/0/type = "value"
tracks/0/path = NodePath(".:rotation_degrees")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.15, 0.2 ),
"transitions": PoolRealArray( 0.439427, 1, 1 ),
"update": 0,
"values": [ -80.0, 85.0, 75.0 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath(".:scale")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.05, 0.15, 0.2 ),
"transitions": PoolRealArray( 1, 2.50795, 1, 1 ),
"update": 0,
"values": [ Vector2( 1, 1 ), Vector2( 1, 1.3 ), Vector2( 1, 1 ), Vector2( 1, 1 ) ]
}
tracks/2/type = "value"
tracks/2/path = NodePath(".:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
tracks/3/type = "method"
tracks/3/path = NodePath(".")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 0.1, 0.25 ),
"transitions": PoolRealArray( 1, 1 ),
"values": [ {
"args": [ ],
"method": "set_attack_input_listening"
}, {
"args": [ ],
"method": "set_ready_for_next_attack"
} ]
}
[sub_resource type="Animation" id=4]
resource_name = "attack_medium"
length = 0.5
loop = false
step = 0.05
tracks/0/type = "value"
tracks/0/path = NodePath(".:rotation_degrees")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0.05, 0.25, 0.35 ),
"transitions": PoolRealArray( 0.439427, 1, 1 ),
"update": 0,
"values": [ 95.0, -95.0, -90.0 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath(".:scale")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.1, 0.2, 0.25 ),
"transitions": PoolRealArray( 1, 2.50795, 1, 1 ),
"update": 0,
"values": [ Vector2( 1, 1 ), Vector2( 1, 1.3 ), Vector2( 1, 1 ), Vector2( 1, 1 ) ]
}
tracks/2/type = "value"
tracks/2/path = NodePath(".:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
[sub_resource type="Animation" id=5]
length = 0.01
loop = false
step = 0.1
tracks/0/type = "value"
tracks/0/path = NodePath(".:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ false ]
}
[node name="Sword" type="Area2D"]
input_pickable = false
gravity_vec = Vector2( 0, 1 )
gravity = 98.0
linear_damp = 0.1
angular_damp = 1.0
monitorable = false
collision_layer = 16
collision_mask = 3
audio_bus_override = false
audio_bus_name = "Master"
script = ExtResource( 1 )
_sections_unfolded = [ "Transform" ]
[node name="AnimationPlayer" type="AnimationPlayer" parent="." index="0"]
root_node = NodePath("..")
autoplay = ""
playback_process_mode = 1
playback_default_blend_time = 0.0
playback_speed = 1.0
anims/SETUP = SubResource( 1 )
anims/attack_circular = SubResource( 2 )
anims/attack_fast = SubResource( 3 )
anims/attack_medium = SubResource( 4 )
anims/idle = SubResource( 5 )
blend_times = [ ]
_sections_unfolded = [ "Playback Options" ]
[node name="sword" type="Sprite" parent="." index="1"]
position = Vector2( 4, 0 )
texture = ExtResource( 2 )
offset = Vector2( 67, 0 )
_sections_unfolded = [ "Offset", "Transform" ]
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="." index="2"]
build_mode = 0
polygon = PoolVector2Array( 28.0001, -15.9999, 136, -15.9995, 160, 0, 136, 16.0005, 27.9999, 16.0001 )

View File

@@ -1,102 +0,0 @@
extends Area2D
signal attack_finished
enum STATES { IDLE, ATTACK }
var state = null
enum ATTACK_INPUT_STATES { IDLE, LISTENING, REGISTERED }
var attack_input_state = ATTACK_INPUT_STATES.IDLE
var ready_for_next_attack = false
const MAX_COMBO_COUNT = 3
var combo_count = 0
var attack_current = {}
var combo = [{
'damage': 1,
'animation': 'attack_fast',
'effect': null
},
{
'damage': 1,
'animation': 'attack_fast',
'effect': null
},
{
'damage': 3,
'animation': 'attack_medium',
'effect': null
}]
var hit_objects = []
func _ready():
$AnimationPlayer.connect('animation_finished', self, "_on_animation_finished")
self.connect("body_entered", self, "_on_body_entered")
_change_state(STATES.IDLE)
func _change_state(new_state):
match state:
STATES.ATTACK:
hit_objects = []
attack_input_state = ATTACK_INPUT_STATES.LISTENING
ready_for_next_attack = false
match new_state:
STATES.IDLE:
combo_count = 0
$AnimationPlayer.stop()
visible = false
monitoring = false
STATES.ATTACK:
attack_current = combo[combo_count -1]
$AnimationPlayer.play(attack_current['animation'])
visible = true
monitoring = true
state = new_state
func _input(event):
if not state == STATES.ATTACK:
return
if attack_input_state != ATTACK_INPUT_STATES.LISTENING:
return
if event.is_action_pressed('attack'):
attack_input_state = ATTACK_INPUT_STATES.REGISTERED
func _physics_process(delta):
if attack_input_state == ATTACK_INPUT_STATES.REGISTERED and ready_for_next_attack:
attack()
func attack():
combo_count += 1
_change_state(STATES.ATTACK)
# use with AnimationPlayer func track
func set_attack_input_listening():
attack_input_state = ATTACK_INPUT_STATES.LISTENING
# use with AnimationPlayer func track
func set_ready_for_next_attack():
ready_for_next_attack = true
func _on_body_entered(body):
if not body.has_node('Health'):
return
if body.get_rid().get_id() in hit_objects:
return
hit_objects.append(body.get_rid().get_id())
body.take_damage(self, attack_current['damage'], attack_current['effect'])
func _on_animation_finished(name):
if not attack_current:
return
if attack_input_state == ATTACK_INPUT_STATES.REGISTERED and combo_count < MAX_COMBO_COUNT:
attack()
else:
_change_state(STATES.IDLE)
emit_signal("attack_finished")
func _on_StateMachine_state_changed(current_state):
if current_state.name == "Attack":
attack()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

View File

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

View File

@@ -1,15 +0,0 @@
extends Position2D
var z_index_start = 0
func _ready():
owner.connect("direction_changed", self, '_on_Parent_direction_changed')
z_index_start = z_index
func _on_Parent_direction_changed(direction):
rotation = direction.angle()
match direction:
Vector2(0, -1):
z_index = z_index_start - 1
_:
z_index = z_index_start

View File

@@ -1,64 +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=3
[application]
config/name="Hierarchical Finite State Machine example"
run/main_scene="res://Demo.tscn"
config/icon="res://icon.png"
[display]
window/size/width=1280
window/size/height=720
window/size/test_width=1280
window/size/test_height=720
window/stretch/mode="2d"
window/stretch/aspect="keep"
[gdnative]
singletons=[ ]
[input]
move_left=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":-1.0,"script":null)
]
move_up=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":-1.0,"script":null)
]
move_right=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":1.0,"script":null)
]
move_down=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":1.0,"script":null)
]
fire=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":82,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":2,"pressure":0.0,"pressed":false,"script":null)
]
run=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777237,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":7,"pressure":0.0,"pressed":false,"script":null)
]
jump=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":0,"pressure":0.0,"pressed":false,"script":null)
]
simulate_damage=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":88,"unicode":0,"echo":false,"script":null)
]
attack=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":70,"unicode":0,"echo":false,"script":null)
]
[rendering]
environment/default_environment="res://default_env.tres"

View File

@@ -1,25 +0,0 @@
"""
Base interface for all states: it doesn't do anything in itself
but forces us to pass the right arguments to the methods below
and makes sure every State object had all of these methods.
"""
extends Node
signal finished(next_state_name)
# Initialize the state. E.g. change the animation
func enter():
return
# Clean up the state. Reinitialize values like a timer
func exit():
return
func handle_input(event):
return
func update(delta):
return
func _on_animation_finished(anim_name):
return

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