Frog Artwork and Flyer/Navigation Start
This commit is contained in:
parent
28fd3a9ba9
commit
53215e0673
Binary file not shown.
@ -1,26 +0,0 @@
|
|||||||
[remap]
|
|
||||||
|
|
||||||
importer="aseprite.wizard.plugin"
|
|
||||||
type="SpriteFrames"
|
|
||||||
path="res://.import/neu-blobby-falllose_altitude.aseprite-5026cd44477475935af029c69cb83a32.res"
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://assets/blobby/fall/neu-blobby-falllose_altitude.aseprite"
|
|
||||||
dest_files=[ "res://.import/neu-blobby-falllose_altitude.aseprite-5026cd44477475935af029c69cb83a32.res" ]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
split_layers=false
|
|
||||||
exclude_layers_pattern=""
|
|
||||||
only_visible_layers=false
|
|
||||||
sheet_type="Packed"
|
|
||||||
sprite_filename_pattern="{basename}.{layer}.{extension}"
|
|
||||||
texture_strip/import_texture_strip=false
|
|
||||||
texture_strip/filename_pattern="{basename}.{layer}.Strip.{extension}"
|
|
||||||
texture_atlas/import_texture_atlas=false
|
|
||||||
texture_atlas/filename_pattern="{basename}.{layer}.Atlas.{extension}"
|
|
||||||
texture_atlas/frame_filename_pattern="{basename}.{layer}.{animation}.{frame}.Atlas.{extension}"
|
|
||||||
animated_texture/import_animated_texture=false
|
|
||||||
animated_texture/filename_pattern="{basename}.{layer}.{animation}.Texture.{extension}"
|
|
||||||
animated_texture/frame_filename_pattern="{basename}.{layer}.{animation}.{frame}.Texture.{extension}"
|
|
||||||
Binary file not shown.
@ -1,26 +0,0 @@
|
|||||||
[remap]
|
|
||||||
|
|
||||||
importer="aseprite.wizard.plugin"
|
|
||||||
type="SpriteFrames"
|
|
||||||
path="res://.import/neu-blobby-jumpgain_altitude.aseprite-d3e743388ba919f7b0dd56646d0f0fe2.res"
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://assets/blobby/jump/neu-blobby-jumpgain_altitude.aseprite"
|
|
||||||
dest_files=[ "res://.import/neu-blobby-jumpgain_altitude.aseprite-d3e743388ba919f7b0dd56646d0f0fe2.res" ]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
split_layers=false
|
|
||||||
exclude_layers_pattern=""
|
|
||||||
only_visible_layers=false
|
|
||||||
sheet_type="Packed"
|
|
||||||
sprite_filename_pattern="{basename}.{layer}.{extension}"
|
|
||||||
texture_strip/import_texture_strip=false
|
|
||||||
texture_strip/filename_pattern="{basename}.{layer}.Strip.{extension}"
|
|
||||||
texture_atlas/import_texture_atlas=false
|
|
||||||
texture_atlas/filename_pattern="{basename}.{layer}.Atlas.{extension}"
|
|
||||||
texture_atlas/frame_filename_pattern="{basename}.{layer}.{animation}.{frame}.Atlas.{extension}"
|
|
||||||
animated_texture/import_animated_texture=false
|
|
||||||
animated_texture/filename_pattern="{basename}.{layer}.{animation}.Texture.{extension}"
|
|
||||||
animated_texture/frame_filename_pattern="{basename}.{layer}.{animation}.{frame}.Texture.{extension}"
|
|
||||||
BIN
assets/enemy/froshler.png
Normal file
BIN
assets/enemy/froshler.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
35
assets/enemy/froshler.png.import
Normal file
35
assets/enemy/froshler.png.import
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/froshler.png-b5007c288ea8ddd41007b585e714e1e2.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/enemy/froshler.png"
|
||||||
|
dest_files=[ "res://.import/froshler.png-b5007c288ea8ddd41007b585e714e1e2.stex" ]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_mode=0
|
||||||
|
compress/bptc_ldr=0
|
||||||
|
compress/normal_map=0
|
||||||
|
flags/repeat=0
|
||||||
|
flags/filter=false
|
||||||
|
flags/mipmaps=false
|
||||||
|
flags/anisotropic=false
|
||||||
|
flags/srgb=2
|
||||||
|
process/fix_alpha_border=false
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/HDR_as_SRGB=false
|
||||||
|
process/invert_color=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=false
|
||||||
|
svg/scale=1.0
|
||||||
BIN
assets/environment/blocks/Empty-Navigation-Tile.png
Normal file
BIN
assets/environment/blocks/Empty-Navigation-Tile.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 94 B |
35
assets/environment/blocks/Empty-Navigation-Tile.png.import
Normal file
35
assets/environment/blocks/Empty-Navigation-Tile.png.import
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/Empty-Navigation-Tile.png-0cba4cda892195959da33a13ae3d0b57.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/environment/blocks/Empty-Navigation-Tile.png"
|
||||||
|
dest_files=[ "res://.import/Empty-Navigation-Tile.png-0cba4cda892195959da33a13ae3d0b57.stex" ]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_mode=0
|
||||||
|
compress/bptc_ldr=0
|
||||||
|
compress/normal_map=0
|
||||||
|
flags/repeat=0
|
||||||
|
flags/filter=false
|
||||||
|
flags/mipmaps=false
|
||||||
|
flags/anisotropic=false
|
||||||
|
flags/srgb=2
|
||||||
|
process/fix_alpha_border=false
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/HDR_as_SRGB=false
|
||||||
|
process/invert_color=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=false
|
||||||
|
svg/scale=1.0
|
||||||
@ -285,7 +285,7 @@ states/wallsliding/node = SubResource( 96 )
|
|||||||
states/wallsliding/position = Vector2( 1795.54, 493.009 )
|
states/wallsliding/position = Vector2( 1795.54, 493.009 )
|
||||||
transitions = [ "falling", "wallsliding", SubResource( 138 ), "wallsliding", "idling", SubResource( 139 ), "wallsliding", "wallslideToJump", SubResource( 140 ), "wallslideToJump", "jumping", SubResource( 141 ), "idling", "jumping", SubResource( 147 ), "runToJump", "jumping", SubResource( 148 ), "ducking", "jumping", SubResource( 149 ), "jumping", "jumpToFall", SubResource( 150 ), "jumpToFall", "falling", SubResource( 151 ), "ducking", "duckTurn", SubResource( 152 ), "duckTurn", "ducking", SubResource( 153 ), "falling", "ducking", SubResource( 154 ), "ducking", "falling", SubResource( 155 ), "ducking", "walking", SubResource( 156 ), "walking", "ducking", SubResource( 157 ), "idling", "ducking", SubResource( 158 ), "ducking", "idling", SubResource( 159 ), "ducking", "running", SubResource( 160 ), "running", "ducking", SubResource( 161 ), "running", "falling", SubResource( 162 ), "falling", "running", SubResource( 163 ), "walking", "falling", SubResource( 164 ), "falling", "walking", SubResource( 165 ), "falling", "idling", SubResource( 166 ), "idling", "walking", SubResource( 167 ), "walking", "idling", SubResource( 168 ), "walking", "turnToRun", SubResource( 169 ), "turnToRun", "walking", SubResource( 170 ), "running", "turnToRun", SubResource( 171 ), "turnToRun", "running", SubResource( 172 ), "idling", "idleTurn", SubResource( 173 ), "walking", "idleTurn", SubResource( 174 ), "idleTurn", "walking", SubResource( 175 ), "idling", "turnToRun", SubResource( 176 ), "turnToRun", "idling", SubResource( 177 ), "running", "runToJump", SubResource( 178 ), "wallsliding", "falling", SubResource( 137 ), "jumping", "wallsliding", SubResource( 189 ) ]
|
transitions = [ "falling", "wallsliding", SubResource( 138 ), "wallsliding", "idling", SubResource( 139 ), "wallsliding", "wallslideToJump", SubResource( 140 ), "wallslideToJump", "jumping", SubResource( 141 ), "idling", "jumping", SubResource( 147 ), "runToJump", "jumping", SubResource( 148 ), "ducking", "jumping", SubResource( 149 ), "jumping", "jumpToFall", SubResource( 150 ), "jumpToFall", "falling", SubResource( 151 ), "ducking", "duckTurn", SubResource( 152 ), "duckTurn", "ducking", SubResource( 153 ), "falling", "ducking", SubResource( 154 ), "ducking", "falling", SubResource( 155 ), "ducking", "walking", SubResource( 156 ), "walking", "ducking", SubResource( 157 ), "idling", "ducking", SubResource( 158 ), "ducking", "idling", SubResource( 159 ), "ducking", "running", SubResource( 160 ), "running", "ducking", SubResource( 161 ), "running", "falling", SubResource( 162 ), "falling", "running", SubResource( 163 ), "walking", "falling", SubResource( 164 ), "falling", "walking", SubResource( 165 ), "falling", "idling", SubResource( 166 ), "idling", "walking", SubResource( 167 ), "walking", "idling", SubResource( 168 ), "walking", "turnToRun", SubResource( 169 ), "turnToRun", "walking", SubResource( 170 ), "running", "turnToRun", SubResource( 171 ), "turnToRun", "running", SubResource( 172 ), "idling", "idleTurn", SubResource( 173 ), "walking", "idleTurn", SubResource( 174 ), "idleTurn", "walking", SubResource( 175 ), "idling", "turnToRun", SubResource( 176 ), "turnToRun", "idling", SubResource( 177 ), "running", "runToJump", SubResource( 178 ), "wallsliding", "falling", SubResource( 137 ), "jumping", "wallsliding", SubResource( 189 ) ]
|
||||||
start_node = "idling"
|
start_node = "idling"
|
||||||
graph_offset = Vector2( 995.54, 69.009 )
|
graph_offset = Vector2( 1100.54, -208.991 )
|
||||||
|
|
||||||
[sub_resource type="AnimationNodeStateMachinePlayback" id=48]
|
[sub_resource type="AnimationNodeStateMachinePlayback" id=48]
|
||||||
|
|
||||||
@ -4482,6 +4482,20 @@ __meta__ = {
|
|||||||
"_edit_vertical_guides_": [ -22.4902 ]
|
"_edit_vertical_guides_": [ -22.4902 ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[node name="StateLabel" type="Label" parent="."]
|
||||||
|
visible = false
|
||||||
|
show_behind_parent = true
|
||||||
|
margin_left = -37.0
|
||||||
|
margin_top = -44.0
|
||||||
|
margin_right = 36.0
|
||||||
|
margin_bottom = -30.0
|
||||||
|
custom_colors/font_color = Color( 1, 1, 1, 1 )
|
||||||
|
custom_colors/font_outline_modulate = Color( 0, 0, 0, 1 )
|
||||||
|
custom_fonts/font = ExtResource( 5 )
|
||||||
|
text = "Ihre Werbung"
|
||||||
|
align = 1
|
||||||
|
valign = 1
|
||||||
|
|
||||||
[node name="BlobbySkin" type="Area2D" parent="." groups=["player"]]
|
[node name="BlobbySkin" type="Area2D" parent="." groups=["player"]]
|
||||||
process_priority = -1
|
process_priority = -1
|
||||||
collision_mask = 254
|
collision_mask = 254
|
||||||
@ -4589,19 +4603,6 @@ one_shot = true
|
|||||||
wait_time = 0.067
|
wait_time = 0.067
|
||||||
one_shot = true
|
one_shot = true
|
||||||
|
|
||||||
[node name="StateLabel" type="Label" parent="."]
|
|
||||||
show_behind_parent = true
|
|
||||||
margin_left = -37.0
|
|
||||||
margin_top = -44.0
|
|
||||||
margin_right = 36.0
|
|
||||||
margin_bottom = -30.0
|
|
||||||
custom_colors/font_color = Color( 1, 1, 1, 1 )
|
|
||||||
custom_colors/font_outline_modulate = Color( 0, 0, 0, 1 )
|
|
||||||
custom_fonts/font = ExtResource( 5 )
|
|
||||||
text = "Ihre Werbung"
|
|
||||||
align = 1
|
|
||||||
valign = 1
|
|
||||||
|
|
||||||
[node name="WallRaycasts" type="Node2D" parent="."]
|
[node name="WallRaycasts" type="Node2D" parent="."]
|
||||||
position = Vector2( 0, -1 )
|
position = Vector2( 0, -1 )
|
||||||
|
|
||||||
|
|||||||
@ -127,10 +127,10 @@ func get_horizontal_direction() -> Vector2:
|
|||||||
func _get_transition(_delta):
|
func _get_transition(_delta):
|
||||||
parent.get_node("StateLabel").text = (
|
parent.get_node("StateLabel").text = (
|
||||||
self.state
|
self.state
|
||||||
+ " x vel:"
|
# + " x vel:"
|
||||||
+ String(round(parent.velocity.x))
|
# + String(round(parent.velocity.x))
|
||||||
+ " y vel/10:"
|
# + " y vel/10:"
|
||||||
+ String(round(parent.velocity.y / 10))
|
# + String(round(parent.velocity.y / 10))
|
||||||
)
|
)
|
||||||
var new_state
|
var new_state
|
||||||
if !parent.is_on_floor():
|
if !parent.is_on_floor():
|
||||||
|
|||||||
@ -38,7 +38,7 @@ func _ready():
|
|||||||
image.create(128, 2, false, Image.FORMAT_RGBAH)
|
image.create(128, 2, false, Image.FORMAT_RGBAH)
|
||||||
_update_lighting_shader()
|
_update_lighting_shader()
|
||||||
# TODO Trigger when needed
|
# TODO Trigger when needed
|
||||||
get_node("LightAnimationPlayer").play("Pulsing")
|
# get_node("LightAnimationPlayer").play("Pulsing")
|
||||||
|
|
||||||
func _physics_process(delta: float) -> void:
|
func _physics_process(delta: float) -> void:
|
||||||
if(!GlobalState.is_dead):
|
if(!GlobalState.is_dead):
|
||||||
@ -66,7 +66,7 @@ func _physics_process(delta: float) -> void:
|
|||||||
func _set_boundaries():
|
func _set_boundaries():
|
||||||
# This is ok, because it only happens on initialization
|
# This is ok, because it only happens on initialization
|
||||||
# But it is also quite fickle
|
# But it is also quite fickle
|
||||||
var tilemap = get_node("../TileMap")
|
var tilemap = get_node("../%TileMap")
|
||||||
# TODO: This goes wrong when overwriting old tiles with new sprites
|
# TODO: This goes wrong when overwriting old tiles with new sprites
|
||||||
# New pngs -> completely new tiles and rebuild map
|
# New pngs -> completely new tiles and rebuild map
|
||||||
var rect = tilemap.get_used_rect()
|
var rect = tilemap.get_used_rect()
|
||||||
|
|||||||
@ -314,7 +314,7 @@ tracks/0/imported = false
|
|||||||
tracks/0/enabled = true
|
tracks/0/enabled = true
|
||||||
tracks/0/keys = {
|
tracks/0/keys = {
|
||||||
"times": PoolRealArray( 0, 0.6 ),
|
"times": PoolRealArray( 0, 0.6 ),
|
||||||
"transitions": PoolRealArray( 1, 0.5 ),
|
"transitions": PoolRealArray( 1, 1 ),
|
||||||
"update": 0,
|
"update": 0,
|
||||||
"values": [ Vector2( 0, 0 ), Vector2( 0, 0 ) ]
|
"values": [ Vector2( 0, 0 ), Vector2( 0, 0 ) ]
|
||||||
}
|
}
|
||||||
@ -326,7 +326,7 @@ tracks/1/imported = false
|
|||||||
tracks/1/enabled = true
|
tracks/1/enabled = true
|
||||||
tracks/1/keys = {
|
tracks/1/keys = {
|
||||||
"times": PoolRealArray( 0, 0.6 ),
|
"times": PoolRealArray( 0, 0.6 ),
|
||||||
"transitions": PoolRealArray( 1, 1.2 ),
|
"transitions": PoolRealArray( 1, 1 ),
|
||||||
"update": 0,
|
"update": 0,
|
||||||
"values": [ -10000000, -10000000 ]
|
"values": [ -10000000, -10000000 ]
|
||||||
}
|
}
|
||||||
@ -338,7 +338,7 @@ tracks/2/imported = false
|
|||||||
tracks/2/enabled = true
|
tracks/2/enabled = true
|
||||||
tracks/2/keys = {
|
tracks/2/keys = {
|
||||||
"times": PoolRealArray( 0, 0.6 ),
|
"times": PoolRealArray( 0, 0.6 ),
|
||||||
"transitions": PoolRealArray( 1, 1.2 ),
|
"transitions": PoolRealArray( 1, 1 ),
|
||||||
"update": 0,
|
"update": 0,
|
||||||
"values": [ -10000000, -10000000 ]
|
"values": [ -10000000, -10000000 ]
|
||||||
}
|
}
|
||||||
@ -350,7 +350,7 @@ tracks/3/imported = false
|
|||||||
tracks/3/enabled = true
|
tracks/3/enabled = true
|
||||||
tracks/3/keys = {
|
tracks/3/keys = {
|
||||||
"times": PoolRealArray( 0, 0.6 ),
|
"times": PoolRealArray( 0, 0.6 ),
|
||||||
"transitions": PoolRealArray( 1, 1.2 ),
|
"transitions": PoolRealArray( 1, 1 ),
|
||||||
"update": 0,
|
"update": 0,
|
||||||
"values": [ 10000000, 10000000 ]
|
"values": [ 10000000, 10000000 ]
|
||||||
}
|
}
|
||||||
@ -362,7 +362,7 @@ tracks/4/imported = false
|
|||||||
tracks/4/enabled = true
|
tracks/4/enabled = true
|
||||||
tracks/4/keys = {
|
tracks/4/keys = {
|
||||||
"times": PoolRealArray( 0, 0.6 ),
|
"times": PoolRealArray( 0, 0.6 ),
|
||||||
"transitions": PoolRealArray( 1, 1.2 ),
|
"transitions": PoolRealArray( 1, 1 ),
|
||||||
"update": 0,
|
"update": 0,
|
||||||
"values": [ 10000000, 10000000 ]
|
"values": [ 10000000, 10000000 ]
|
||||||
}
|
}
|
||||||
@ -569,7 +569,6 @@ z_index = -1
|
|||||||
texture = ExtResource( 3 )
|
texture = ExtResource( 3 )
|
||||||
|
|
||||||
[node name="ParallaxLayer3" type="ParallaxLayer" parent="ParallaxBackground"]
|
[node name="ParallaxLayer3" type="ParallaxLayer" parent="ParallaxBackground"]
|
||||||
visible = false
|
|
||||||
z_index = -1
|
z_index = -1
|
||||||
motion_scale = Vector2( 0.001, 0.001 )
|
motion_scale = Vector2( 0.001, 0.001 )
|
||||||
|
|
||||||
@ -578,7 +577,6 @@ z_index = -1
|
|||||||
texture = ExtResource( 2 )
|
texture = ExtResource( 2 )
|
||||||
|
|
||||||
[node name="ParallaxLayer4" type="ParallaxLayer" parent="ParallaxBackground"]
|
[node name="ParallaxLayer4" type="ParallaxLayer" parent="ParallaxBackground"]
|
||||||
visible = false
|
|
||||||
motion_scale = Vector2( 0.01, 0.01 )
|
motion_scale = Vector2( 0.01, 0.01 )
|
||||||
|
|
||||||
[node name="Sprite" type="Sprite" parent="ParallaxBackground/ParallaxLayer4"]
|
[node name="Sprite" type="Sprite" parent="ParallaxBackground/ParallaxLayer4"]
|
||||||
@ -587,18 +585,21 @@ z_index = -1
|
|||||||
texture = ExtResource( 5 )
|
texture = ExtResource( 5 )
|
||||||
|
|
||||||
[node name="Emitter3" type="Sprite" parent="ParallaxBackground/ParallaxLayer4" groups=["light"]]
|
[node name="Emitter3" type="Sprite" parent="ParallaxBackground/ParallaxLayer4" groups=["light"]]
|
||||||
|
visible = false
|
||||||
position = Vector2( -154, 14 )
|
position = Vector2( -154, 14 )
|
||||||
texture = ExtResource( 40 )
|
texture = ExtResource( 40 )
|
||||||
script = ExtResource( 39 )
|
script = ExtResource( 39 )
|
||||||
color = Color( 1, 0, 0, 0.615686 )
|
color = Color( 1, 0, 0, 0.615686 )
|
||||||
|
|
||||||
[node name="Emitter4" type="Sprite" parent="ParallaxBackground/ParallaxLayer4" groups=["light"]]
|
[node name="Emitter4" type="Sprite" parent="ParallaxBackground/ParallaxLayer4" groups=["light"]]
|
||||||
|
visible = false
|
||||||
position = Vector2( 1, 14 )
|
position = Vector2( 1, 14 )
|
||||||
texture = ExtResource( 40 )
|
texture = ExtResource( 40 )
|
||||||
script = ExtResource( 39 )
|
script = ExtResource( 39 )
|
||||||
color = Color( 1, 0, 0, 0.615686 )
|
color = Color( 1, 0, 0, 0.615686 )
|
||||||
|
|
||||||
[node name="Emitter5" type="Sprite" parent="ParallaxBackground/ParallaxLayer4" groups=["light"]]
|
[node name="Emitter5" type="Sprite" parent="ParallaxBackground/ParallaxLayer4" groups=["light"]]
|
||||||
|
visible = false
|
||||||
position = Vector2( 154, 14 )
|
position = Vector2( 154, 14 )
|
||||||
texture = ExtResource( 40 )
|
texture = ExtResource( 40 )
|
||||||
script = ExtResource( 39 )
|
script = ExtResource( 39 )
|
||||||
@ -632,10 +633,10 @@ texture = ExtResource( 8 )
|
|||||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="ParallaxBackground/ParallaxLayer5"]
|
[node name="AnimatedSprite" type="AnimatedSprite" parent="ParallaxBackground/ParallaxLayer5"]
|
||||||
visible = false
|
visible = false
|
||||||
frames = SubResource( 7 )
|
frames = SubResource( 7 )
|
||||||
frame = 6
|
frame = 10
|
||||||
playing = true
|
playing = true
|
||||||
|
|
||||||
[node name="AnimatedSprite2" type="AnimatedSprite" parent="ParallaxBackground/ParallaxLayer5"]
|
[node name="AnimatedSprite2" type="AnimatedSprite" parent="ParallaxBackground/ParallaxLayer5"]
|
||||||
frames = SubResource( 8 )
|
frames = SubResource( 8 )
|
||||||
frame = 11
|
frame = 1
|
||||||
playing = true
|
playing = true
|
||||||
|
|||||||
11
src/Actors/Enemies/Beings/ChasingFlyer.tscn
Normal file
11
src/Actors/Enemies/Beings/ChasingFlyer.tscn
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[gd_scene load_steps=2 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://assets/blobby/idle/blobby1.png" type="Texture" id=1]
|
||||||
|
|
||||||
|
[node name="ChasingFlyer" type="Node2D"]
|
||||||
|
|
||||||
|
[node name="NavigationAgent2D" type="NavigationAgent2D" parent="."]
|
||||||
|
navigation_layers = 8
|
||||||
|
|
||||||
|
[node name="Sprite" type="Sprite" parent="."]
|
||||||
|
texture = ExtResource( 1 )
|
||||||
401
src/Actors/Enemies/Beings/Flyer.gd
Normal file
401
src/Actors/Enemies/Beings/Flyer.gd
Normal file
@ -0,0 +1,401 @@
|
|||||||
|
extends Player
|
||||||
|
const PhysicsFunc = preload("res://src/Utilities/Physic/PhysicsFunc.gd")
|
||||||
|
|
||||||
|
onready var players = get_tree().get_nodes_in_group("player")
|
||||||
|
|
||||||
|
onready var vision_raycast: RayCast2D = $VisionRayCast
|
||||||
|
onready var orientation: RayCast2D = $Orientation
|
||||||
|
onready var feeler_raycast: RayCast2D = $FeelerRayCast
|
||||||
|
onready var tilemap: TileMap = $"../%TileMap"
|
||||||
|
onready var jump_timer: Timer
|
||||||
|
onready var target_lost_timer: Timer
|
||||||
|
onready var rng = RandomNumberGenerator.new()
|
||||||
|
|
||||||
|
export var score := 100
|
||||||
|
# Is given in blocks
|
||||||
|
export var vision_distance := 6.0
|
||||||
|
# Jump distance in blocks
|
||||||
|
export var default_jump_distance := 3.0
|
||||||
|
export var default_jump_angle := 70.0
|
||||||
|
export var jump_time_search := 0.7
|
||||||
|
export var jump_time_hunt := 0.3
|
||||||
|
export var jump_time_standard_deviation := 0.1
|
||||||
|
|
||||||
|
|
||||||
|
# Also in blocks
|
||||||
|
var movement_radius: float
|
||||||
|
var anchor: Node2D
|
||||||
|
var is_bound := false
|
||||||
|
var was_restricted := false
|
||||||
|
var has_reversed := false
|
||||||
|
|
||||||
|
var target: Object = null
|
||||||
|
|
||||||
|
var start_x := 0.0
|
||||||
|
var in_air := false
|
||||||
|
var is_hurt := false
|
||||||
|
var stored_x_vel = 0.0
|
||||||
|
|
||||||
|
var current_delta = 0.0
|
||||||
|
|
||||||
|
var reversing_possible_searching := true
|
||||||
|
|
||||||
|
# TODO Make parameters tunable!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1111!!
|
||||||
|
func _ready():
|
||||||
|
default_jump_distance = default_jump_distance * tilemap.cell_size.x
|
||||||
|
jump_timer = Timer.new()
|
||||||
|
jump_timer.set_one_shot(true)
|
||||||
|
jump_timer.connect("timeout", self, "jump")
|
||||||
|
target_lost_timer = Timer.new()
|
||||||
|
target_lost_timer.set_one_shot(true)
|
||||||
|
target_lost_timer.connect("timeout", self, "lose_target")
|
||||||
|
add_child(jump_timer)
|
||||||
|
add_child(target_lost_timer)
|
||||||
|
|
||||||
|
|
||||||
|
func bind_to_anchor(anchor_node: Node2D, radius: float ) -> void:
|
||||||
|
anchor = anchor_node
|
||||||
|
movement_radius = radius * 24
|
||||||
|
is_bound = true
|
||||||
|
|
||||||
|
|
||||||
|
func _on_StompDetector_body_entered(body: Node) -> void:
|
||||||
|
if body.global_position.y > get_node("StompDetector").global_position.y:
|
||||||
|
return
|
||||||
|
if body.is_in_group("player"):
|
||||||
|
remove_from_group("harmful")
|
||||||
|
is_hurt = true
|
||||||
|
|
||||||
|
|
||||||
|
func execute_movement(delta: float) -> void:
|
||||||
|
# Navigation2DServer.map_get_path()
|
||||||
|
current_delta = delta
|
||||||
|
velocity.y += _gravity * delta
|
||||||
|
if(is_bound):
|
||||||
|
var next_position = global_position + velocity * current_delta
|
||||||
|
var current_distance = global_position.distance_to(anchor.global_position)
|
||||||
|
var new_distance = next_position.distance_to(anchor.global_position)
|
||||||
|
# TODO Fix this in respects to x and y distances and movement dampening
|
||||||
|
# Maybe use mathemathematics or something idfc
|
||||||
|
if(current_distance >= movement_radius && new_distance > current_distance):
|
||||||
|
velocity.x = velocity.x * 0.8
|
||||||
|
velocity.y = velocity.y * 0.8
|
||||||
|
was_restricted = true
|
||||||
|
velocity = move_and_slide(velocity, FLOOR_NORMAL, false, 4, 0.785398,false)
|
||||||
|
if(is_on_floor()):
|
||||||
|
velocity = Vector2(0,0)
|
||||||
|
# Reverse direction when hitting limit
|
||||||
|
|
||||||
|
|
||||||
|
func die() -> void:
|
||||||
|
GlobalState.score += score
|
||||||
|
queue_free()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_EnemySkin_area_entered(area:Area2D) -> void:
|
||||||
|
if area.is_in_group("harmful"):
|
||||||
|
get_node("EnemyBody").disabled = true
|
||||||
|
die()
|
||||||
|
|
||||||
|
|
||||||
|
func searching() -> Vector2:
|
||||||
|
detect_player()
|
||||||
|
|
||||||
|
if(is_on_floor()):
|
||||||
|
if(jump_timer.is_stopped()):
|
||||||
|
jump_timer.start(rng.randfn(jump_time_search, jump_time_standard_deviation))
|
||||||
|
if(in_air):
|
||||||
|
in_air = false
|
||||||
|
else:
|
||||||
|
if(!in_air):
|
||||||
|
start_x = global_position.x
|
||||||
|
reversing_possible_searching = true
|
||||||
|
jump_timer.stop()
|
||||||
|
in_air = true
|
||||||
|
|
||||||
|
return velocity
|
||||||
|
|
||||||
|
|
||||||
|
func hunting() -> Vector2:
|
||||||
|
detect_player()
|
||||||
|
|
||||||
|
if(is_on_floor()):
|
||||||
|
if(jump_timer.is_stopped()):
|
||||||
|
jump_timer.start(rng.randfn(jump_time_hunt, jump_time_standard_deviation))
|
||||||
|
if(in_air):
|
||||||
|
in_air = false
|
||||||
|
else:
|
||||||
|
if(!in_air):
|
||||||
|
start_x = global_position.x
|
||||||
|
reversing_possible_searching = true
|
||||||
|
jump_timer.stop()
|
||||||
|
in_air = true
|
||||||
|
|
||||||
|
return velocity
|
||||||
|
|
||||||
|
|
||||||
|
func detect_player() -> void:
|
||||||
|
var player
|
||||||
|
if(players.empty()):
|
||||||
|
print("no player found")
|
||||||
|
return
|
||||||
|
player = players[0]
|
||||||
|
vision_raycast.cast_to = (player.global_position - global_position).normalized() * 24 * vision_distance
|
||||||
|
var ray_angle_to_facing = vision_raycast.cast_to.angle_to(orientation.cast_to)
|
||||||
|
vision_raycast.force_raycast_update()
|
||||||
|
var collider = vision_raycast.get_collider()
|
||||||
|
if(target == null && abs(ray_angle_to_facing) < PI/4 && collider != null && collider.is_in_group("player")):
|
||||||
|
target_lost_timer.stop()
|
||||||
|
target = collider
|
||||||
|
print("target found")
|
||||||
|
elif(target != null && target_lost_timer.is_stopped()):
|
||||||
|
target_lost_timer.start(3.0)
|
||||||
|
|
||||||
|
|
||||||
|
func sleeping() -> Vector2:
|
||||||
|
jump_timer.stop()
|
||||||
|
detect_player()
|
||||||
|
return velocity
|
||||||
|
|
||||||
|
|
||||||
|
func lose_target() -> void:
|
||||||
|
print("target lost")
|
||||||
|
target = null
|
||||||
|
|
||||||
|
|
||||||
|
func jump():
|
||||||
|
# print("jump calculation initiated")
|
||||||
|
# Can only reverse once per jump calculation
|
||||||
|
has_reversed = false
|
||||||
|
var zero_vector = Vector2(0,0)
|
||||||
|
var v: Vector2 = velocity_for_jump_distance(default_jump_distance, deg2rad(default_jump_angle))
|
||||||
|
v = correct_jump_direction(v)
|
||||||
|
|
||||||
|
if(is_bound):
|
||||||
|
var next_position = global_position + v * current_delta
|
||||||
|
var current_distance = global_position.distance_to(anchor.global_position)
|
||||||
|
var new_distance = next_position.distance_to(anchor.global_position)
|
||||||
|
# print(current_distance)
|
||||||
|
# print(new_distance)
|
||||||
|
if((new_distance >= movement_radius && new_distance > current_distance) || (new_distance > current_distance && was_restricted)):
|
||||||
|
if can_reverse_facing_direction():
|
||||||
|
reverse_facing_direction()
|
||||||
|
was_restricted = false
|
||||||
|
|
||||||
|
if (get_facing_direction() < 0 && $Left_Wallcast.is_colliding()):
|
||||||
|
v = zero_vector
|
||||||
|
if (get_facing_direction() > 0 && $Right_Wallcast.is_colliding()):
|
||||||
|
v = zero_vector
|
||||||
|
if ($Right_Wallcast.is_colliding() && $Left_Wallcast.is_colliding()):
|
||||||
|
print("help this is a really tight space :(")
|
||||||
|
return velocity
|
||||||
|
|
||||||
|
v = correct_jump_direction(v)
|
||||||
|
if(v != zero_vector):
|
||||||
|
v = consider_jump_headspace(v)
|
||||||
|
if(v != zero_vector):
|
||||||
|
v = consider_jump_landing_space(v)
|
||||||
|
if(v == zero_vector):
|
||||||
|
# TODO fix that you could call jump from jumping on top
|
||||||
|
# and let it fail if the top is dangerous for jump height or not safe
|
||||||
|
v = consider_jumping_on_top()
|
||||||
|
if(v == zero_vector && can_reverse_facing_direction()):
|
||||||
|
reverse_facing_direction()
|
||||||
|
jump()
|
||||||
|
velocity = v
|
||||||
|
|
||||||
|
|
||||||
|
func correct_jump_direction(v: Vector2) -> Vector2:
|
||||||
|
if sign(v.x) != get_facing_direction():
|
||||||
|
v.x *= -1
|
||||||
|
return v
|
||||||
|
|
||||||
|
|
||||||
|
# Cast a ray to the highest point of the jump
|
||||||
|
# Check the highest point for collision
|
||||||
|
# Calculate safe jump height and then a safe jump velocity
|
||||||
|
func consider_jump_headspace(v: Vector2) -> Vector2:
|
||||||
|
var height = calculate_jump_height(v)
|
||||||
|
var distance = calculate_jump_distance(v)
|
||||||
|
# Half distance is an estimate of the jumps apex()
|
||||||
|
var height_collider = check_feeler(Vector2(get_facing_direction()*(distance/2), (-height)), Vector2(0,-9))
|
||||||
|
if(height_collider != null):
|
||||||
|
# check half jump height
|
||||||
|
var half_height_v = jump_height_to_velocity(height/3, v)
|
||||||
|
var half_height = calculate_jump_height(half_height_v)
|
||||||
|
height_collider = check_feeler(Vector2(get_facing_direction()*(distance/2), (-half_height)), Vector2(0,-9))
|
||||||
|
if(height_collider != null && can_reverse_facing_direction()):
|
||||||
|
print("no safe height for frog jump")
|
||||||
|
return Vector2(0,0)
|
||||||
|
else:
|
||||||
|
var collision_point = feeler_raycast.get_collision_point()
|
||||||
|
#TODO Consider sprite size for height
|
||||||
|
var target_height = collision_point.y - (feeler_raycast.global_position.y - 9)
|
||||||
|
v = jump_height_to_velocity(abs(target_height), v)
|
||||||
|
return v
|
||||||
|
|
||||||
|
|
||||||
|
# Check the block in jump distance for danger or height
|
||||||
|
# If danger check neighboring blocks: if still danger, then jump closer (or jump over)
|
||||||
|
# If height move to distance which allows 1 block high jump
|
||||||
|
func consider_jump_landing_space(v: Vector2) -> Vector2:
|
||||||
|
var jump_distance = calculate_jump_distance(v)
|
||||||
|
var jump_height = calculate_jump_height(v)
|
||||||
|
var collider = check_feeler(Vector2(jump_distance * get_facing_direction(), - jump_height/2))
|
||||||
|
# TODO Unpacked loop, make function or something?
|
||||||
|
# Shortens the jump in steps to make it more safe
|
||||||
|
if(!is_jump_path_safe(v, global_position) || collider != null):
|
||||||
|
jump_distance = calculate_jump_distance(v) - 24
|
||||||
|
v = change_jump_distance(jump_distance, v)
|
||||||
|
jump_height = calculate_jump_height(v)
|
||||||
|
v = correct_jump_direction(v)
|
||||||
|
collider = check_feeler(Vector2(jump_distance * get_facing_direction(), - jump_height/2))
|
||||||
|
if(!is_jump_path_safe(v, global_position) || collider != null):
|
||||||
|
jump_distance = calculate_jump_distance(v) - 12
|
||||||
|
v = change_jump_distance(jump_distance, v)
|
||||||
|
jump_height = calculate_jump_height(v)
|
||||||
|
v = correct_jump_direction(v)
|
||||||
|
collider = check_feeler(Vector2(jump_distance * get_facing_direction(), - jump_height/2))
|
||||||
|
if((!is_jump_path_safe(v, global_position) || collider != null) && can_reverse_facing_direction()):
|
||||||
|
return Vector2(0,0)
|
||||||
|
return v
|
||||||
|
|
||||||
|
|
||||||
|
# Tries to shorten the jump, so that it lands in a tiles center
|
||||||
|
func jump_to_tile_center(v: Vector2) -> Vector2:
|
||||||
|
var distance = stepify(calculate_jump_distance(v), 0.01)
|
||||||
|
if !is_equal_approx(fmod(abs(global_position.x + distance * get_facing_direction()), 24), 12):
|
||||||
|
# print(distance)
|
||||||
|
# print(global_position.x + distance)
|
||||||
|
# print(fmod((global_position.x + distance), 24))
|
||||||
|
var new_distance = distance
|
||||||
|
if(get_facing_direction() < 0):
|
||||||
|
new_distance = fmod((global_position.x + distance), 24) - 12 + distance
|
||||||
|
else:
|
||||||
|
new_distance = distance + 12 - fmod((global_position.x + distance), 24)
|
||||||
|
# print("centering distance")
|
||||||
|
# print(new_distance)
|
||||||
|
v = change_jump_distance(abs(new_distance), v)
|
||||||
|
v = correct_jump_direction(v)
|
||||||
|
return v
|
||||||
|
|
||||||
|
|
||||||
|
# TODO Depends on Frog Shape and Tile Shape
|
||||||
|
func is_jump_path_safe(v: Vector2, pos: Vector2) -> bool:
|
||||||
|
var v0 = v.length()
|
||||||
|
var angle = v.angle()
|
||||||
|
var jump_distance = calculate_jump_distance(v)
|
||||||
|
var harmful_nodes = get_tree().get_nodes_in_group("harmful")
|
||||||
|
for node in harmful_nodes:
|
||||||
|
var node_pos = node.global_position
|
||||||
|
if abs(node_pos.x - pos.x) > abs(jump_distance) * 3 || abs(node_pos.x - pos.x) < 1:
|
||||||
|
continue
|
||||||
|
var node_y = node_pos.y - 12
|
||||||
|
var initial_throw_height = node_y - (global_position.y + 9)
|
||||||
|
var term1 = (pow(v0, 2) * sin(2 * angle)) / (2 * _gravity)
|
||||||
|
var term2 = ((v0 * cos(angle))/_gravity) * sqrt(pow(v0, 2) * pow(sin(angle), 2) + 2 * _gravity * initial_throw_height)
|
||||||
|
var distance = abs(term1) + abs(term2)
|
||||||
|
# print("distance to next spike")
|
||||||
|
# print(pos.x + sign(v.x) * distance - node_pos.x)
|
||||||
|
var safe_distance = 12
|
||||||
|
if (sign(initial_throw_height) < 0):
|
||||||
|
safe_distance = 24
|
||||||
|
if(abs(pos.x + sign(v.x) * distance - node_pos.x) < safe_distance):
|
||||||
|
return false
|
||||||
|
return true
|
||||||
|
|
||||||
|
|
||||||
|
func calculate_jump_height(v: Vector2) -> float:
|
||||||
|
return abs((pow(v.length(), 2) * pow(sin(v.angle()), 2))/(2*_gravity))
|
||||||
|
|
||||||
|
|
||||||
|
func consider_jumping_on_top() -> Vector2:
|
||||||
|
var collider = check_feeler(Vector2(36 * get_facing_direction(),0))
|
||||||
|
var facing = 0 if get_facing_direction() >= 0 else - 1
|
||||||
|
if (collider == null):
|
||||||
|
return Vector2(0,0)
|
||||||
|
var local_position = tilemap.to_local(feeler_raycast.get_collision_point())
|
||||||
|
var map_position = tilemap.world_to_map(local_position)
|
||||||
|
var tile_position = Vector2(map_position.x + facing, map_position.y)
|
||||||
|
# print(tile_position)
|
||||||
|
# TODO Here the climb height of frog is limited to one constantly
|
||||||
|
if (tilemap.get_cell(tile_position.x, tile_position.y - 1) != -1):
|
||||||
|
# print("wall is more than one high")
|
||||||
|
return Vector2(0,0)
|
||||||
|
# print("wall is only one high")
|
||||||
|
var tile_upper_left_corner = tilemap.to_global(tilemap.map_to_world(tile_position))
|
||||||
|
var tile_upper_right_corner = Vector2(tile_upper_left_corner.x + tilemap.cell_size.x, tile_upper_left_corner.y)
|
||||||
|
|
||||||
|
var jump_angle = 0
|
||||||
|
if(facing < 0):
|
||||||
|
var frog_bottom_left_corner = Vector2($EnemyBody.global_position.x - $EnemyBody.shape.extents.x,
|
||||||
|
$EnemyBody.global_position.y + $EnemyBody.shape.extents.y)
|
||||||
|
jump_angle = frog_bottom_left_corner.angle_to_point(tile_upper_right_corner)
|
||||||
|
else:
|
||||||
|
var frog_bottom_right_corner = Vector2($EnemyBody.global_position.x + $EnemyBody.shape.extents.x,
|
||||||
|
$EnemyBody.global_position.y + $EnemyBody.shape.extents.y)
|
||||||
|
jump_angle = frog_bottom_right_corner.angle_to_point(tile_upper_left_corner) - PI
|
||||||
|
# print(rad2deg(jump_angle))
|
||||||
|
|
||||||
|
# if(abs(rad2deg(jump_angle)) < default_jump_angle):
|
||||||
|
# return correct_jump_direction(velocity_for_jump_distance(default_jump_distance/2, abs(deg2rad(default_jump_angle))))
|
||||||
|
if(abs(rad2deg(jump_angle)) < 78):
|
||||||
|
return correct_jump_direction(velocity_for_jump_distance(default_jump_distance/2, abs(deg2rad(80))))
|
||||||
|
else:
|
||||||
|
return velocity_for_jump_distance(8, abs(deg2rad(45))) * -1 * facing
|
||||||
|
|
||||||
|
return Vector2(0,0)
|
||||||
|
# Check if there is another obstacle above the block or do a regular jump with adjusted parameters instead(for checking)
|
||||||
|
# Cast from bottom corner to upper tile corner
|
||||||
|
# Check the angle of the raycast
|
||||||
|
# Return small jump backwards if the angle is too steep
|
||||||
|
# Make the angle 1 deg steeper
|
||||||
|
# Return a jump along the angled raycast
|
||||||
|
|
||||||
|
|
||||||
|
# Only works for jumps on straight ground
|
||||||
|
func calculate_jump_distance(v: Vector2) -> float:
|
||||||
|
return abs((pow(v.length(), 2) * sin(-1 * 2 * v.angle()))/(_gravity))
|
||||||
|
|
||||||
|
|
||||||
|
func jump_height_to_velocity(target_height: float, v: Vector2) -> Vector2:
|
||||||
|
var initial_height = calculate_jump_height(v)
|
||||||
|
return v.normalized() * sqrt(pow(v.length(),2)/(initial_height/target_height))
|
||||||
|
|
||||||
|
|
||||||
|
# Changes a Vector for a jump to the targeted distance, keeping the angle
|
||||||
|
func change_jump_distance(target_distance: float, v: Vector2) -> Vector2:
|
||||||
|
var initial_distance = calculate_jump_distance(v)
|
||||||
|
return v.normalized() * sqrt(pow(v.length(),2)/(initial_distance/target_distance))
|
||||||
|
|
||||||
|
# Takes an angle and a distance to calculate a jump launching at that angle and covering the distance
|
||||||
|
func velocity_for_jump_distance(distance: float = 3*24, angle: float = deg2rad(65)) -> Vector2:
|
||||||
|
var abs_velocity = sqrt((distance * _gravity)/sin(2*angle))
|
||||||
|
return Vector2(abs_velocity,0).rotated(-1*angle)
|
||||||
|
|
||||||
|
|
||||||
|
func can_reverse_facing_direction() -> bool:
|
||||||
|
if(is_on_floor() && !has_reversed):
|
||||||
|
return true
|
||||||
|
return false
|
||||||
|
|
||||||
|
|
||||||
|
# Checks the feeler ray for collisions and returns collision or null
|
||||||
|
func check_feeler(v: Vector2, _offset = Vector2(0,0)) -> Object:
|
||||||
|
var prev_position = feeler_raycast.position
|
||||||
|
feeler_raycast.position += _offset
|
||||||
|
feeler_raycast.cast_to = v
|
||||||
|
feeler_raycast.force_raycast_update()
|
||||||
|
feeler_raycast.position = prev_position
|
||||||
|
return feeler_raycast.get_collider()
|
||||||
|
|
||||||
|
|
||||||
|
func reverse_facing_direction() -> void:
|
||||||
|
has_reversed = true
|
||||||
|
print("reversing direction")
|
||||||
|
orientation.cast_to.x *= -1
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
func get_facing_direction() -> float:
|
||||||
|
return orientation.cast_to.x
|
||||||
97
src/Actors/Enemies/Beings/Flyer.tscn
Normal file
97
src/Actors/Enemies/Beings/Flyer.tscn
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
[gd_scene load_steps=8 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://src/Actors/Enemies/Beings/WhatAreFrog.gd" type="Script" id=1]
|
||||||
|
[ext_resource path="res://src/Actors/Enemies/Beings/FlyerStateMachine.gd" type="Script" id=2]
|
||||||
|
[ext_resource path="res://assets/meta/new_dynamicfont.tres" type="DynamicFont" id=3]
|
||||||
|
[ext_resource path="res://assets/enemy/enemy.png" type="Texture" id=4]
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id=1]
|
||||||
|
extents = Vector2( 12, 7 )
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id=2]
|
||||||
|
extents = Vector2( 15, 5.12039 )
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id=3]
|
||||||
|
extents = Vector2( 18.2143, 14.3338 )
|
||||||
|
|
||||||
|
[node name="Flyer" type="KinematicBody2D" groups=["harmful"]]
|
||||||
|
collision_layer = 2
|
||||||
|
collision_mask = 9
|
||||||
|
collision/safe_margin = 0.001
|
||||||
|
script = ExtResource( 1 )
|
||||||
|
|
||||||
|
[node name="Statemachine" type="Node2D" parent="."]
|
||||||
|
script = ExtResource( 2 )
|
||||||
|
|
||||||
|
[node name="StateLabel" type="Label" parent="."]
|
||||||
|
show_behind_parent = true
|
||||||
|
margin_left = -36.0
|
||||||
|
margin_top = -30.0
|
||||||
|
margin_right = 37.0
|
||||||
|
margin_bottom = -16.0
|
||||||
|
custom_colors/font_color = Color( 1, 1, 1, 1 )
|
||||||
|
custom_colors/font_outline_modulate = Color( 0, 0, 0, 1 )
|
||||||
|
custom_fonts/font = ExtResource( 3 )
|
||||||
|
text = "Ihre Werbung"
|
||||||
|
align = 1
|
||||||
|
valign = 1
|
||||||
|
|
||||||
|
[node name="FlyerSprite" type="Sprite" parent="."]
|
||||||
|
position = Vector2( 0, -1.90735e-06 )
|
||||||
|
scale = Vector2( 0.201, 0.193 )
|
||||||
|
texture = ExtResource( 4 )
|
||||||
|
|
||||||
|
[node name="VisibilityEnabler2D" type="VisibilityEnabler2D" parent="."]
|
||||||
|
position = Vector2( 954, 0 )
|
||||||
|
scale = Vector2( 10.84, 0.899 )
|
||||||
|
rect = Rect2( -89, -10, 2, 20 )
|
||||||
|
process_parent = true
|
||||||
|
physics_process_parent = true
|
||||||
|
|
||||||
|
[node name="FeelerRayCast" type="RayCast2D" parent="."]
|
||||||
|
enabled = true
|
||||||
|
cast_to = Vector2( 0, -1 )
|
||||||
|
collision_mask = 56
|
||||||
|
collide_with_areas = true
|
||||||
|
|
||||||
|
[node name="Orientation" type="RayCast2D" parent="."]
|
||||||
|
cast_to = Vector2( -1, 0 )
|
||||||
|
collision_mask = 0
|
||||||
|
collide_with_bodies = false
|
||||||
|
|
||||||
|
[node name="EnemyBody" type="CollisionShape2D" parent="." groups=["harmful"]]
|
||||||
|
position = Vector2( 0, 4.5 )
|
||||||
|
shape = SubResource( 1 )
|
||||||
|
|
||||||
|
[node name="cshape" type="Node2D" parent="."]
|
||||||
|
position = Vector2( 0, -3.8147e-06 )
|
||||||
|
scale = Vector2( 0.1, 0.1 )
|
||||||
|
|
||||||
|
[node name="pjoint" type="PinJoint2D" parent="cshape"]
|
||||||
|
scale = Vector2( 0.3, 0.3 )
|
||||||
|
bias = 0.108
|
||||||
|
softness = 0.1
|
||||||
|
|
||||||
|
[node name="StompDetector" type="Area2D" parent="." groups=["weakpoint"]]
|
||||||
|
modulate = Color( 0, 0.0392157, 1, 1 )
|
||||||
|
position = Vector2( 0, -6.44095 )
|
||||||
|
scale = Vector2( 0.7, 0.7 )
|
||||||
|
collision_layer = 2
|
||||||
|
input_pickable = false
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="StompDetector"]
|
||||||
|
position = Vector2( -4.76837e-07, 1.56134 )
|
||||||
|
shape = SubResource( 2 )
|
||||||
|
|
||||||
|
[node name="EnemySkin" type="Area2D" parent="." groups=["player"]]
|
||||||
|
process_priority = -1
|
||||||
|
scale = Vector2( 0.7, 0.7 )
|
||||||
|
collision_layer = 2
|
||||||
|
collision_mask = 126
|
||||||
|
|
||||||
|
[node name="CollisionPolygon2D" type="CollisionShape2D" parent="EnemySkin"]
|
||||||
|
position = Vector2( 0, 2.85714 )
|
||||||
|
shape = SubResource( 3 )
|
||||||
|
|
||||||
|
[connection signal="body_entered" from="StompDetector" to="." method="_on_StompDetector_body_entered"]
|
||||||
|
[connection signal="area_entered" from="EnemySkin" to="." method="_on_EnemySkin_area_entered"]
|
||||||
46
src/Actors/Enemies/Beings/FlyerStateMachine.gd
Normal file
46
src/Actors/Enemies/Beings/FlyerStateMachine.gd
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
extends StateMachine
|
||||||
|
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
add_state("searching")
|
||||||
|
add_state("hunting")
|
||||||
|
add_state("fleeing")
|
||||||
|
add_state("sleeping")
|
||||||
|
state = states.searching
|
||||||
|
set_state(states.searching)
|
||||||
|
print(self.state)
|
||||||
|
for state in states:
|
||||||
|
if state_matching_method_exists(state):
|
||||||
|
continue
|
||||||
|
else:
|
||||||
|
printerr("StateMachine -> State: " + state + " has no matching method in parent.")
|
||||||
|
push_error("StateMachine -> State: " + state + " has no matching method in parent.")
|
||||||
|
|
||||||
|
|
||||||
|
# Game logic consequences of state
|
||||||
|
func _state_logic(delta):
|
||||||
|
var state_action_ref = funcref(parent, self.state)
|
||||||
|
parent.velocity = state_action_ref.call_func()
|
||||||
|
parent.execute_movement(delta)
|
||||||
|
|
||||||
|
|
||||||
|
func _get_transition(_delta):
|
||||||
|
parent.get_node("StateLabel").text = self.state
|
||||||
|
var new_state
|
||||||
|
if parent.target == null:
|
||||||
|
new_state = states.searching
|
||||||
|
if parent.target != null:
|
||||||
|
new_state = states.hunting
|
||||||
|
if parent.is_hurt:
|
||||||
|
new_state = states.sleeping
|
||||||
|
if new_state != self.state:
|
||||||
|
return new_state
|
||||||
|
return null
|
||||||
|
|
||||||
|
|
||||||
|
func _enter_state(_new_state, _previous_state):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
func _exit_state(_previous_state, _new_state):
|
||||||
|
pass
|
||||||
@ -68,6 +68,7 @@ func _on_StompDetector_body_entered(body: Node) -> void:
|
|||||||
|
|
||||||
|
|
||||||
func execute_movement(delta: float) -> void:
|
func execute_movement(delta: float) -> void:
|
||||||
|
# Navigation2DServer.map_get_path()
|
||||||
current_delta = delta
|
current_delta = delta
|
||||||
velocity.y += _gravity * delta
|
velocity.y += _gravity * delta
|
||||||
if(is_bound):
|
if(is_bound):
|
||||||
@ -83,6 +84,7 @@ func execute_movement(delta: float) -> void:
|
|||||||
velocity = move_and_slide(velocity, FLOOR_NORMAL, false, 4, 0.785398,false)
|
velocity = move_and_slide(velocity, FLOOR_NORMAL, false, 4, 0.785398,false)
|
||||||
if(is_on_floor()):
|
if(is_on_floor()):
|
||||||
velocity = Vector2(0,0)
|
velocity = Vector2(0,0)
|
||||||
|
|
||||||
# Reverse direction when hitting limit
|
# Reverse direction when hitting limit
|
||||||
|
|
||||||
|
|
||||||
@ -174,8 +176,8 @@ func jump():
|
|||||||
var next_position = global_position + v * current_delta
|
var next_position = global_position + v * current_delta
|
||||||
var current_distance = global_position.distance_to(anchor.global_position)
|
var current_distance = global_position.distance_to(anchor.global_position)
|
||||||
var new_distance = next_position.distance_to(anchor.global_position)
|
var new_distance = next_position.distance_to(anchor.global_position)
|
||||||
print(current_distance)
|
# print(current_distance)
|
||||||
print(new_distance)
|
# print(new_distance)
|
||||||
if((new_distance >= movement_radius && new_distance > current_distance) || (new_distance > current_distance && was_restricted)):
|
if((new_distance >= movement_radius && new_distance > current_distance) || (new_distance > current_distance && was_restricted)):
|
||||||
if can_reverse_facing_direction():
|
if can_reverse_facing_direction():
|
||||||
reverse_facing_direction()
|
reverse_facing_direction()
|
||||||
@ -217,12 +219,12 @@ func consider_jump_headspace(v: Vector2) -> Vector2:
|
|||||||
var height = calculate_jump_height(v)
|
var height = calculate_jump_height(v)
|
||||||
var distance = calculate_jump_distance(v)
|
var distance = calculate_jump_distance(v)
|
||||||
# Half distance is an estimate of the jumps apex()
|
# Half distance is an estimate of the jumps apex()
|
||||||
var height_collider = check_feeler(Vector2(get_facing_direction()*(distance/2), (-height)), Vector2(0,-9))
|
var height_collider = check_feeler(Vector2(get_facing_direction()*(distance/2), (-height)), Vector2(0,-20))
|
||||||
if(height_collider != null):
|
if(height_collider != null):
|
||||||
# check half jump height
|
# check half jump height
|
||||||
var half_height_v = jump_height_to_velocity(height/3, v)
|
var half_height_v = jump_height_to_velocity(height/3, v)
|
||||||
var half_height = calculate_jump_height(half_height_v)
|
var half_height = calculate_jump_height(half_height_v)
|
||||||
height_collider = check_feeler(Vector2(get_facing_direction()*(distance/2), (-half_height)), Vector2(0,-9))
|
height_collider = check_feeler(Vector2(get_facing_direction()*(distance/2), (-half_height)), Vector2(0,-20))
|
||||||
if(height_collider != null && can_reverse_facing_direction()):
|
if(height_collider != null && can_reverse_facing_direction()):
|
||||||
print("no safe height for frog jump")
|
print("no safe height for frog jump")
|
||||||
return Vector2(0,0)
|
return Vector2(0,0)
|
||||||
@ -264,16 +266,16 @@ func consider_jump_landing_space(v: Vector2) -> Vector2:
|
|||||||
func jump_to_tile_center(v: Vector2) -> Vector2:
|
func jump_to_tile_center(v: Vector2) -> Vector2:
|
||||||
var distance = stepify(calculate_jump_distance(v), 0.01)
|
var distance = stepify(calculate_jump_distance(v), 0.01)
|
||||||
if !is_equal_approx(fmod(abs(global_position.x + distance * get_facing_direction()), 24), 12):
|
if !is_equal_approx(fmod(abs(global_position.x + distance * get_facing_direction()), 24), 12):
|
||||||
print(distance)
|
# print(distance)
|
||||||
print(global_position.x + distance)
|
# print(global_position.x + distance)
|
||||||
print(fmod((global_position.x + distance), 24))
|
# print(fmod((global_position.x + distance), 24))
|
||||||
var new_distance = distance
|
var new_distance = distance
|
||||||
if(get_facing_direction() < 0):
|
if(get_facing_direction() < 0):
|
||||||
new_distance = fmod((global_position.x + distance), 24) - 12 + distance
|
new_distance = fmod((global_position.x + distance), 24) - 12 + distance
|
||||||
else:
|
else:
|
||||||
new_distance = distance + 12 - fmod((global_position.x + distance), 24)
|
new_distance = distance + 12 - fmod((global_position.x + distance), 24)
|
||||||
print("centering distance")
|
# print("centering distance")
|
||||||
print(new_distance)
|
# print(new_distance)
|
||||||
v = change_jump_distance(abs(new_distance), v)
|
v = change_jump_distance(abs(new_distance), v)
|
||||||
v = correct_jump_direction(v)
|
v = correct_jump_direction(v)
|
||||||
return v
|
return v
|
||||||
@ -316,12 +318,12 @@ func consider_jumping_on_top() -> Vector2:
|
|||||||
var local_position = tilemap.to_local(feeler_raycast.get_collision_point())
|
var local_position = tilemap.to_local(feeler_raycast.get_collision_point())
|
||||||
var map_position = tilemap.world_to_map(local_position)
|
var map_position = tilemap.world_to_map(local_position)
|
||||||
var tile_position = Vector2(map_position.x + facing, map_position.y)
|
var tile_position = Vector2(map_position.x + facing, map_position.y)
|
||||||
print(tile_position)
|
# print(tile_position)
|
||||||
# TODO Here the climb height of frog is limited to one constantly
|
# TODO Here the climb height of frog is limited to one constantly
|
||||||
if (tilemap.get_cell(tile_position.x, tile_position.y - 1) != -1):
|
if (tilemap.get_cell(tile_position.x, tile_position.y - 1) != -1):
|
||||||
print("wall is more than one high")
|
# print("wall is more than one high")
|
||||||
return Vector2(0,0)
|
return Vector2(0,0)
|
||||||
print("wall is only one high")
|
# print("wall is only one high")
|
||||||
var tile_upper_left_corner = tilemap.to_global(tilemap.map_to_world(tile_position))
|
var tile_upper_left_corner = tilemap.to_global(tilemap.map_to_world(tile_position))
|
||||||
var tile_upper_right_corner = Vector2(tile_upper_left_corner.x + tilemap.cell_size.x, tile_upper_left_corner.y)
|
var tile_upper_right_corner = Vector2(tile_upper_left_corner.x + tilemap.cell_size.x, tile_upper_left_corner.y)
|
||||||
|
|
||||||
@ -334,7 +336,7 @@ func consider_jumping_on_top() -> Vector2:
|
|||||||
var frog_bottom_right_corner = Vector2($EnemyBody.global_position.x + $EnemyBody.shape.extents.x,
|
var frog_bottom_right_corner = Vector2($EnemyBody.global_position.x + $EnemyBody.shape.extents.x,
|
||||||
$EnemyBody.global_position.y + $EnemyBody.shape.extents.y)
|
$EnemyBody.global_position.y + $EnemyBody.shape.extents.y)
|
||||||
jump_angle = frog_bottom_right_corner.angle_to_point(tile_upper_left_corner) - PI
|
jump_angle = frog_bottom_right_corner.angle_to_point(tile_upper_left_corner) - PI
|
||||||
print(rad2deg(jump_angle))
|
# print(rad2deg(jump_angle))
|
||||||
|
|
||||||
# if(abs(rad2deg(jump_angle)) < default_jump_angle):
|
# if(abs(rad2deg(jump_angle)) < default_jump_angle):
|
||||||
# return correct_jump_direction(velocity_for_jump_distance(default_jump_distance/2, abs(deg2rad(default_jump_angle))))
|
# return correct_jump_direction(velocity_for_jump_distance(default_jump_distance/2, abs(deg2rad(default_jump_angle))))
|
||||||
|
|||||||
@ -1,18 +1,352 @@
|
|||||||
[gd_scene load_steps=8 format=2]
|
[gd_scene load_steps=37 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://assets/enemy/enemy.png" type="Texture" id=1]
|
[ext_resource path="res://assets/enemy/froshler.png" type="Texture" id=1]
|
||||||
[ext_resource path="res://src/Actors/Enemies/Beings/WhatAreFrog.gd" type="Script" id=2]
|
[ext_resource path="res://src/Actors/Enemies/Beings/WhatAreFrog.gd" type="Script" id=2]
|
||||||
[ext_resource path="res://src/Actors/Enemies/Beings/WhatAreFrogStateMachine.gd" type="Script" id=3]
|
[ext_resource path="res://src/Actors/Enemies/Beings/WhatAreFrogStateMachine.gd" type="Script" id=3]
|
||||||
[ext_resource path="res://assets/meta/new_dynamicfont.tres" type="DynamicFont" id=4]
|
[ext_resource path="res://assets/meta/new_dynamicfont.tres" type="DynamicFont" id=4]
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id=5]
|
||||||
|
length = 0.001
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/path = NodePath(".:frame")
|
||||||
|
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 ]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id=4]
|
||||||
|
resource_name = "idleHappy"
|
||||||
|
length = 1.62
|
||||||
|
loop = true
|
||||||
|
step = 0.01
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/path = NodePath(".:frame")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PoolRealArray( 0, 0.54 ),
|
||||||
|
"transitions": PoolRealArray( 1, 1 ),
|
||||||
|
"update": 1,
|
||||||
|
"values": [ 0, 1 ]
|
||||||
|
}
|
||||||
|
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 ) ]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id=6]
|
||||||
|
resource_name = "idleHappyLeft"
|
||||||
|
length = 1.62
|
||||||
|
loop = true
|
||||||
|
step = 0.01
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/path = NodePath(".:frame")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PoolRealArray( 0, 0.54 ),
|
||||||
|
"transitions": PoolRealArray( 1, 1 ),
|
||||||
|
"update": 1,
|
||||||
|
"values": [ 0, 1 ]
|
||||||
|
}
|
||||||
|
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": 1,
|
||||||
|
"values": [ Vector2( -1, 1 ) ]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id=12]
|
||||||
|
resource_name = "idleMean"
|
||||||
|
length = 1.62
|
||||||
|
loop = true
|
||||||
|
step = 0.01
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/path = NodePath(".:frame")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PoolRealArray( 0.01, 0.54 ),
|
||||||
|
"transitions": PoolRealArray( 1, 1 ),
|
||||||
|
"update": 1,
|
||||||
|
"values": [ 2, 3 ]
|
||||||
|
}
|
||||||
|
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 ) ]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id=13]
|
||||||
|
resource_name = "idleMeanLeft"
|
||||||
|
length = 1.62
|
||||||
|
loop = true
|
||||||
|
step = 0.01
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/path = NodePath(".:frame")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PoolRealArray( 0, 0.54 ),
|
||||||
|
"transitions": PoolRealArray( 1, 1 ),
|
||||||
|
"update": 1,
|
||||||
|
"values": [ 2, 3 ]
|
||||||
|
}
|
||||||
|
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 ) ]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id=14]
|
||||||
|
resource_name = "liftOff"
|
||||||
|
length = 0.042
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/path = NodePath(".:frame")
|
||||||
|
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": [ 4 ]
|
||||||
|
}
|
||||||
|
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": 1,
|
||||||
|
"values": [ Vector2( 1, 1 ) ]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id=15]
|
||||||
|
resource_name = "liftOffLeft"
|
||||||
|
length = 0.1
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/path = NodePath(".:frame")
|
||||||
|
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": [ 4 ]
|
||||||
|
}
|
||||||
|
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": 1,
|
||||||
|
"values": [ Vector2( -1, 1 ) ]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id=16]
|
||||||
|
resource_name = "midJumping"
|
||||||
|
length = 0.1
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/path = NodePath(".:frame")
|
||||||
|
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": [ 6 ]
|
||||||
|
}
|
||||||
|
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": 1,
|
||||||
|
"values": [ Vector2( 1, 1 ) ]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id=17]
|
||||||
|
resource_name = "midJumpingLeft"
|
||||||
|
length = 0.1
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/path = NodePath(".:frame")
|
||||||
|
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": [ 6 ]
|
||||||
|
}
|
||||||
|
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": 1,
|
||||||
|
"values": [ Vector2( -1, 1 ) ]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeAnimation" id=7]
|
||||||
|
animation = "idleHappyLeft"
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeAnimation" id=8]
|
||||||
|
animation = "idleHappy"
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeBlendSpace1D" id=9]
|
||||||
|
blend_point_0/node = SubResource( 7 )
|
||||||
|
blend_point_0/pos = -1.0
|
||||||
|
blend_point_1/node = SubResource( 8 )
|
||||||
|
blend_point_1/pos = 1.0
|
||||||
|
min_space = -2.0
|
||||||
|
max_space = 2.0
|
||||||
|
snap = 1.0
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeAnimation" id=18]
|
||||||
|
animation = "idleMeanLeft"
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeAnimation" id=19]
|
||||||
|
animation = "idleMean"
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeBlendSpace1D" id=20]
|
||||||
|
blend_point_0/node = SubResource( 18 )
|
||||||
|
blend_point_0/pos = -1.0
|
||||||
|
blend_point_1/node = SubResource( 19 )
|
||||||
|
blend_point_1/pos = 1.0
|
||||||
|
min_space = -2.0
|
||||||
|
max_space = 2.0
|
||||||
|
snap = 1.0
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeAnimation" id=21]
|
||||||
|
animation = "liftOffLeft"
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeAnimation" id=22]
|
||||||
|
animation = "liftOff"
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeBlendSpace1D" id=23]
|
||||||
|
blend_point_0/node = SubResource( 21 )
|
||||||
|
blend_point_0/pos = -1.0
|
||||||
|
blend_point_1/node = SubResource( 22 )
|
||||||
|
blend_point_1/pos = 1.0
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeAnimation" id=24]
|
||||||
|
animation = "midJumpingLeft"
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeAnimation" id=25]
|
||||||
|
animation = "midJumping"
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeBlendSpace1D" id=26]
|
||||||
|
blend_point_0/node = SubResource( 24 )
|
||||||
|
blend_point_0/pos = -1.0
|
||||||
|
blend_point_1/node = SubResource( 25 )
|
||||||
|
blend_point_1/pos = 1.0
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeStateMachineTransition" id=27]
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeStateMachineTransition" id=28]
|
||||||
|
switch_mode = 2
|
||||||
|
auto_advance = true
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeStateMachineTransition" id=29]
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeStateMachineTransition" id=30]
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeStateMachineTransition" id=31]
|
||||||
|
switch_mode = 2
|
||||||
|
auto_advance = true
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeStateMachineTransition" id=32]
|
||||||
|
switch_mode = 2
|
||||||
|
auto_advance = true
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeStateMachine" id=10]
|
||||||
|
states/idleHappy/node = SubResource( 9 )
|
||||||
|
states/idleHappy/position = Vector2( -54, 98 )
|
||||||
|
states/idleMean/node = SubResource( 20 )
|
||||||
|
states/idleMean/position = Vector2( 451, 98 )
|
||||||
|
states/liftOff/node = SubResource( 23 )
|
||||||
|
states/liftOff/position = Vector2( 184, -12 )
|
||||||
|
states/midJumping/node = SubResource( 26 )
|
||||||
|
states/midJumping/position = Vector2( 184, -141 )
|
||||||
|
transitions = [ "idleHappy", "liftOff", SubResource( 27 ), "liftOff", "midJumping", SubResource( 28 ), "idleMean", "liftOff", SubResource( 29 ), "midJumping", "liftOff", SubResource( 30 ), "liftOff", "idleMean", SubResource( 31 ), "liftOff", "idleHappy", SubResource( 32 ) ]
|
||||||
|
start_node = "idleHappy"
|
||||||
|
graph_offset = Vector2( -317, -204 )
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeStateMachinePlayback" id=11]
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id=1]
|
[sub_resource type="RectangleShape2D" id=1]
|
||||||
extents = Vector2( 11, 4.5 )
|
extents = Vector2( 12, 7 )
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id=2]
|
[sub_resource type="RectangleShape2D" id=2]
|
||||||
extents = Vector2( 13, 5.12039 )
|
extents = Vector2( 15, 5.12039 )
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id=3]
|
[sub_resource type="RectangleShape2D" id=3]
|
||||||
extents = Vector2( 15.534, 10.0962 )
|
extents = Vector2( 18.2143, 14.3338 )
|
||||||
|
|
||||||
[node name="WhatAreFrog" type="KinematicBody2D" groups=["harmful"]]
|
[node name="WhatAreFrog" type="KinematicBody2D" groups=["harmful"]]
|
||||||
collision_layer = 2
|
collision_layer = 2
|
||||||
@ -24,6 +358,7 @@ script = ExtResource( 2 )
|
|||||||
script = ExtResource( 3 )
|
script = ExtResource( 3 )
|
||||||
|
|
||||||
[node name="StateLabel" type="Label" parent="."]
|
[node name="StateLabel" type="Label" parent="."]
|
||||||
|
visible = false
|
||||||
show_behind_parent = true
|
show_behind_parent = true
|
||||||
margin_left = -36.0
|
margin_left = -36.0
|
||||||
margin_top = -30.0
|
margin_top = -30.0
|
||||||
@ -38,9 +373,32 @@ valign = 1
|
|||||||
|
|
||||||
[node name="FrogSprite" type="Sprite" parent="."]
|
[node name="FrogSprite" type="Sprite" parent="."]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
position = Vector2( 0, -1.90735e-06 )
|
position = Vector2( 0, -7 )
|
||||||
scale = Vector2( 0.201, 0.193 )
|
|
||||||
texture = ExtResource( 1 )
|
texture = ExtResource( 1 )
|
||||||
|
hframes = 2
|
||||||
|
vframes = 4
|
||||||
|
|
||||||
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="FrogSprite"]
|
||||||
|
anims/RESET = SubResource( 5 )
|
||||||
|
anims/idleHappy = SubResource( 4 )
|
||||||
|
anims/idleHappyLeft = SubResource( 6 )
|
||||||
|
anims/idleMean = SubResource( 12 )
|
||||||
|
anims/idleMeanLeft = SubResource( 13 )
|
||||||
|
anims/liftOff = SubResource( 14 )
|
||||||
|
anims/liftOffLeft = SubResource( 15 )
|
||||||
|
anims/midJumping = SubResource( 16 )
|
||||||
|
anims/midJumpingLeft = SubResource( 17 )
|
||||||
|
|
||||||
|
[node name="AnimationTree" type="AnimationTree" parent="FrogSprite"]
|
||||||
|
tree_root = SubResource( 10 )
|
||||||
|
anim_player = NodePath("../AnimationPlayer")
|
||||||
|
active = true
|
||||||
|
root_motion_track = NodePath(".:frame")
|
||||||
|
parameters/playback = SubResource( 11 )
|
||||||
|
parameters/idleHappy/blend_position = 1.0
|
||||||
|
parameters/idleMean/blend_position = 1.0
|
||||||
|
parameters/liftOff/blend_position = 1.0
|
||||||
|
parameters/midJumping/blend_position = 1.0
|
||||||
|
|
||||||
[node name="VisibilityEnabler2D" type="VisibilityEnabler2D" parent="."]
|
[node name="VisibilityEnabler2D" type="VisibilityEnabler2D" parent="."]
|
||||||
position = Vector2( 954, 0 )
|
position = Vector2( 954, 0 )
|
||||||
@ -81,7 +439,7 @@ collision_mask = 9
|
|||||||
collide_with_areas = true
|
collide_with_areas = true
|
||||||
|
|
||||||
[node name="EnemyBody" type="CollisionShape2D" parent="." groups=["harmful"]]
|
[node name="EnemyBody" type="CollisionShape2D" parent="." groups=["harmful"]]
|
||||||
position = Vector2( 0, 4.5 )
|
position = Vector2( 0, 2 )
|
||||||
shape = SubResource( 1 )
|
shape = SubResource( 1 )
|
||||||
|
|
||||||
[node name="cshape" type="Node2D" parent="."]
|
[node name="cshape" type="Node2D" parent="."]
|
||||||
@ -95,13 +453,14 @@ softness = 0.1
|
|||||||
|
|
||||||
[node name="StompDetector" type="Area2D" parent="." groups=["weakpoint"]]
|
[node name="StompDetector" type="Area2D" parent="." groups=["weakpoint"]]
|
||||||
modulate = Color( 0, 0.0392157, 1, 1 )
|
modulate = Color( 0, 0.0392157, 1, 1 )
|
||||||
position = Vector2( 0, -6.44095 )
|
position = Vector2( 0, -10 )
|
||||||
scale = Vector2( 0.7, 0.7 )
|
scale = Vector2( 0.7, 0.7 )
|
||||||
collision_layer = 2
|
collision_layer = 2
|
||||||
input_pickable = false
|
input_pickable = false
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="StompDetector"]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="StompDetector"]
|
||||||
position = Vector2( -4.76837e-07, 1.56134 )
|
position = Vector2( 0.714287, 1.56134 )
|
||||||
|
scale = Vector2( 1, 1 )
|
||||||
shape = SubResource( 2 )
|
shape = SubResource( 2 )
|
||||||
|
|
||||||
[node name="EnemySkin" type="Area2D" parent="." groups=["player"]]
|
[node name="EnemySkin" type="Area2D" parent="." groups=["player"]]
|
||||||
@ -111,7 +470,8 @@ collision_layer = 2
|
|||||||
collision_mask = 126
|
collision_mask = 126
|
||||||
|
|
||||||
[node name="CollisionPolygon2D" type="CollisionShape2D" parent="EnemySkin"]
|
[node name="CollisionPolygon2D" type="CollisionShape2D" parent="EnemySkin"]
|
||||||
position = Vector2( 0, 2.85714 )
|
position = Vector2( -0.357144, -1.42857 )
|
||||||
|
scale = Vector2( 1, 1 )
|
||||||
shape = SubResource( 3 )
|
shape = SubResource( 3 )
|
||||||
|
|
||||||
[connection signal="body_entered" from="StompDetector" to="." method="_on_StompDetector_body_entered"]
|
[connection signal="body_entered" from="StompDetector" to="." method="_on_StompDetector_body_entered"]
|
||||||
|
|||||||
@ -1,10 +1,12 @@
|
|||||||
extends StateMachine
|
extends StateMachine
|
||||||
|
|
||||||
|
onready var anim_tree = $"../FrogSprite/AnimationTree"
|
||||||
|
onready var anim_state_playback = $"../FrogSprite/AnimationTree".get("parameters/playback")
|
||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
add_state("searching")
|
add_state("searching")
|
||||||
add_state("hunting")
|
add_state("hunting")
|
||||||
add_state("fleeing")
|
|
||||||
add_state("sleeping")
|
add_state("sleeping")
|
||||||
state = states.searching
|
state = states.searching
|
||||||
set_state(states.searching)
|
set_state(states.searching)
|
||||||
@ -25,13 +27,8 @@ func _state_logic(delta):
|
|||||||
|
|
||||||
|
|
||||||
func _get_transition(_delta):
|
func _get_transition(_delta):
|
||||||
parent.get_node("StateLabel").text = (
|
parent.get_node("StateLabel").text = self.state
|
||||||
self.state
|
_animation_logic()
|
||||||
# + " x vel:"
|
|
||||||
# + String(round(parent.velocity.x))
|
|
||||||
# + " y vel/10:"
|
|
||||||
# + String(round(parent.velocity.y / 10))
|
|
||||||
)
|
|
||||||
var new_state
|
var new_state
|
||||||
if parent.target == null:
|
if parent.target == null:
|
||||||
new_state = states.searching
|
new_state = states.searching
|
||||||
@ -50,3 +47,21 @@ func _enter_state(_new_state, _previous_state):
|
|||||||
|
|
||||||
func _exit_state(_previous_state, _new_state):
|
func _exit_state(_previous_state, _new_state):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
func _animation_logic():
|
||||||
|
_set_blendspaces_direction()
|
||||||
|
if parent.is_on_floor():
|
||||||
|
if (parent.is_bound):
|
||||||
|
anim_state_playback.travel("idleMean")
|
||||||
|
else:
|
||||||
|
anim_state_playback.travel("idleHappy")
|
||||||
|
else:
|
||||||
|
anim_state_playback.travel("midJumping")
|
||||||
|
|
||||||
|
|
||||||
|
func _set_blendspaces_direction():
|
||||||
|
var value = parent.get_facing_direction()
|
||||||
|
anim_tree.set("parameters/idleHappy/blend_position", value)
|
||||||
|
anim_tree.set("parameters/idleMean/blend_position", value)
|
||||||
|
anim_tree.set("parameters/liftOff/blend_position", value)
|
||||||
|
anim_tree.set("parameters/midJumping/blend_position", value)
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
[gd_resource type="TileSet" load_steps=16 format=2]
|
[gd_resource type="TileSet" load_steps=24 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://assets/environment/blocks/Slope-45.png" type="Texture" id=1]
|
[ext_resource path="res://assets/environment/blocks/Slope-45.png" type="Texture" id=1]
|
||||||
[ext_resource path="res://assets/environment/blocks/Alien-Ship-Ground-Inner.png" type="Texture" id=2]
|
[ext_resource path="res://assets/environment/blocks/Alien-Ship-Ground-Inner.png" type="Texture" id=2]
|
||||||
@ -8,13 +8,26 @@
|
|||||||
[ext_resource path="res://assets/environment/blocks/Slope-22,5.png" type="Texture" id=6]
|
[ext_resource path="res://assets/environment/blocks/Slope-22,5.png" type="Texture" id=6]
|
||||||
[ext_resource path="res://assets/environment/blocks/alienShipSeethroughPipeEdgeOuter/alienShipSeethroughPipeEdgeOuter.tres" type="Texture" id=7]
|
[ext_resource path="res://assets/environment/blocks/alienShipSeethroughPipeEdgeOuter/alienShipSeethroughPipeEdgeOuter.tres" type="Texture" id=7]
|
||||||
[ext_resource path="res://assets/environment/blocks/Alien-Ship-Ground-Edge-Outer.png" type="Texture" id=8]
|
[ext_resource path="res://assets/environment/blocks/Alien-Ship-Ground-Edge-Outer.png" type="Texture" id=8]
|
||||||
|
[ext_resource path="res://assets/environment/blocks/Empty-Navigation-Tile.png" type="Texture" id=9]
|
||||||
|
|
||||||
|
[sub_resource type="OccluderPolygon2D" id=16]
|
||||||
|
polygon = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 )
|
||||||
|
|
||||||
[sub_resource type="ConvexPolygonShape2D" id=7]
|
[sub_resource type="ConvexPolygonShape2D" id=7]
|
||||||
points = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 )
|
points = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 )
|
||||||
|
|
||||||
|
[sub_resource type="OccluderPolygon2D" id=18]
|
||||||
|
polygon = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 )
|
||||||
|
|
||||||
|
[sub_resource type="OccluderPolygon2D" id=20]
|
||||||
|
polygon = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 )
|
||||||
|
|
||||||
[sub_resource type="ConvexPolygonShape2D" id=8]
|
[sub_resource type="ConvexPolygonShape2D" id=8]
|
||||||
points = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 )
|
points = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 )
|
||||||
|
|
||||||
|
[sub_resource type="OccluderPolygon2D" id=22]
|
||||||
|
polygon = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 )
|
||||||
|
|
||||||
[sub_resource type="ConvexPolygonShape2D" id=9]
|
[sub_resource type="ConvexPolygonShape2D" id=9]
|
||||||
points = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 )
|
points = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 )
|
||||||
|
|
||||||
@ -24,12 +37,23 @@ points = PoolVector2Array( 24, 0, 24, 0, 24, 24, 0, 24 )
|
|||||||
[sub_resource type="ConvexPolygonShape2D" id=12]
|
[sub_resource type="ConvexPolygonShape2D" id=12]
|
||||||
points = PoolVector2Array( 24, 12, 48, 0, 48, 24, 0, 24 )
|
points = PoolVector2Array( 24, 12, 48, 0, 48, 24, 0, 24 )
|
||||||
|
|
||||||
|
[sub_resource type="OccluderPolygon2D" id=24]
|
||||||
|
polygon = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 )
|
||||||
|
|
||||||
[sub_resource type="ConvexPolygonShape2D" id=13]
|
[sub_resource type="ConvexPolygonShape2D" id=13]
|
||||||
points = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 )
|
points = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 )
|
||||||
|
|
||||||
|
[sub_resource type="OccluderPolygon2D" id=26]
|
||||||
|
polygon = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 )
|
||||||
|
|
||||||
[sub_resource type="ConvexPolygonShape2D" id=14]
|
[sub_resource type="ConvexPolygonShape2D" id=14]
|
||||||
points = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 )
|
points = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 )
|
||||||
|
|
||||||
|
[sub_resource type="NavigationPolygon" id=27]
|
||||||
|
vertices = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 )
|
||||||
|
polygons = [ PoolIntArray( 0, 1, 2, 3 ) ]
|
||||||
|
outlines = [ PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 ) ]
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
0/name = "alienShip1EdgePartTile.tres 0"
|
0/name = "alienShip1EdgePartTile.tres 0"
|
||||||
0/texture = ExtResource( 3 )
|
0/texture = ExtResource( 3 )
|
||||||
@ -38,6 +62,7 @@ points = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 )
|
|||||||
0/region = Rect2( 0, 0, 24, 24 )
|
0/region = Rect2( 0, 0, 24, 24 )
|
||||||
0/tile_mode = 0
|
0/tile_mode = 0
|
||||||
0/occluder_offset = Vector2( 0, 0 )
|
0/occluder_offset = Vector2( 0, 0 )
|
||||||
|
0/occluder = SubResource( 16 )
|
||||||
0/navigation_offset = Vector2( 0, 0 )
|
0/navigation_offset = Vector2( 0, 0 )
|
||||||
0/shape_offset = Vector2( 0, 0 )
|
0/shape_offset = Vector2( 0, 0 )
|
||||||
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
@ -59,6 +84,7 @@ points = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 )
|
|||||||
1/region = Rect2( 0, 0, 24, 24 )
|
1/region = Rect2( 0, 0, 24, 24 )
|
||||||
1/tile_mode = 0
|
1/tile_mode = 0
|
||||||
1/occluder_offset = Vector2( 0, 0 )
|
1/occluder_offset = Vector2( 0, 0 )
|
||||||
|
1/occluder = SubResource( 18 )
|
||||||
1/navigation_offset = Vector2( 0, 0 )
|
1/navigation_offset = Vector2( 0, 0 )
|
||||||
1/shape_offset = Vector2( 0, 0 )
|
1/shape_offset = Vector2( 0, 0 )
|
||||||
1/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
1/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
@ -73,6 +99,7 @@ points = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 )
|
|||||||
2/region = Rect2( 0, 0, 24, 24 )
|
2/region = Rect2( 0, 0, 24, 24 )
|
||||||
2/tile_mode = 0
|
2/tile_mode = 0
|
||||||
2/occluder_offset = Vector2( 0, 0 )
|
2/occluder_offset = Vector2( 0, 0 )
|
||||||
|
2/occluder = SubResource( 20 )
|
||||||
2/navigation_offset = Vector2( 0, 0 )
|
2/navigation_offset = Vector2( 0, 0 )
|
||||||
2/shape_offset = Vector2( 0, 0 )
|
2/shape_offset = Vector2( 0, 0 )
|
||||||
2/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
2/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
@ -94,6 +121,7 @@ points = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 )
|
|||||||
3/region = Rect2( 0, 0, 24, 24 )
|
3/region = Rect2( 0, 0, 24, 24 )
|
||||||
3/tile_mode = 0
|
3/tile_mode = 0
|
||||||
3/occluder_offset = Vector2( 0, 0 )
|
3/occluder_offset = Vector2( 0, 0 )
|
||||||
|
3/occluder = SubResource( 22 )
|
||||||
3/navigation_offset = Vector2( 0, 0 )
|
3/navigation_offset = Vector2( 0, 0 )
|
||||||
3/shape_offset = Vector2( 0, 0 )
|
3/shape_offset = Vector2( 0, 0 )
|
||||||
3/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
3/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
@ -157,6 +185,7 @@ points = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 )
|
|||||||
7/region = Rect2( 0, 0, 24, 24 )
|
7/region = Rect2( 0, 0, 24, 24 )
|
||||||
7/tile_mode = 0
|
7/tile_mode = 0
|
||||||
7/occluder_offset = Vector2( 0, 0 )
|
7/occluder_offset = Vector2( 0, 0 )
|
||||||
|
7/occluder = SubResource( 24 )
|
||||||
7/navigation_offset = Vector2( 0, 0 )
|
7/navigation_offset = Vector2( 0, 0 )
|
||||||
7/shape_offset = Vector2( 0, 0 )
|
7/shape_offset = Vector2( 0, 0 )
|
||||||
7/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
7/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
@ -178,6 +207,7 @@ points = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 )
|
|||||||
8/region = Rect2( 0, 0, 24, 24 )
|
8/region = Rect2( 0, 0, 24, 24 )
|
||||||
8/tile_mode = 0
|
8/tile_mode = 0
|
||||||
8/occluder_offset = Vector2( 0, 0 )
|
8/occluder_offset = Vector2( 0, 0 )
|
||||||
|
8/occluder = SubResource( 26 )
|
||||||
8/navigation_offset = Vector2( 0, 0 )
|
8/navigation_offset = Vector2( 0, 0 )
|
||||||
8/shape_offset = Vector2( 0, 0 )
|
8/shape_offset = Vector2( 0, 0 )
|
||||||
8/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
8/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
@ -192,3 +222,18 @@ points = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 )
|
|||||||
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
|
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
} ]
|
} ]
|
||||||
8/z_index = 0
|
8/z_index = 0
|
||||||
|
9/name = "Empty-Navigation-Tile.png 9"
|
||||||
|
9/texture = ExtResource( 9 )
|
||||||
|
9/tex_offset = Vector2( 0, 0 )
|
||||||
|
9/modulate = Color( 1, 1, 1, 1 )
|
||||||
|
9/region = Rect2( 0, 0, 24, 24 )
|
||||||
|
9/tile_mode = 0
|
||||||
|
9/occluder_offset = Vector2( 0, 0 )
|
||||||
|
9/navigation_offset = Vector2( 0, 0 )
|
||||||
|
9/navigation = SubResource( 27 )
|
||||||
|
9/shape_offset = Vector2( 0, 0 )
|
||||||
|
9/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
|
9/shape_one_way = false
|
||||||
|
9/shape_one_way_margin = 0.0
|
||||||
|
9/shapes = [ ]
|
||||||
|
9/z_index = 0
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -80,10 +80,10 @@ wait_time = 20.0
|
|||||||
[node name="BlobbyCam" parent="." instance=ExtResource( 12 )]
|
[node name="BlobbyCam" parent="." instance=ExtResource( 12 )]
|
||||||
|
|
||||||
[node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"]
|
[node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"]
|
||||||
frame = 0
|
frame = 9
|
||||||
|
|
||||||
[node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"]
|
[node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"]
|
||||||
frame = 5
|
frame = 0
|
||||||
|
|
||||||
[node name="Blobby" parent="." instance=ExtResource( 2 )]
|
[node name="Blobby" parent="." instance=ExtResource( 2 )]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|||||||
@ -127,10 +127,11 @@ shape = SubResource( 3 )
|
|||||||
position = Vector2( 0, 1.5 )
|
position = Vector2( 0, 1.5 )
|
||||||
z_index = -1
|
z_index = -1
|
||||||
frames = SubResource( 5 )
|
frames = SubResource( 5 )
|
||||||
frame = 21
|
frame = 10
|
||||||
playing = true
|
playing = true
|
||||||
|
|
||||||
[node name="TileMap" type="TileMap" parent="."]
|
[node name="TileMap" type="TileMap" parent="."]
|
||||||
|
unique_name_in_owner = true
|
||||||
tile_set = ExtResource( 2 )
|
tile_set = ExtResource( 2 )
|
||||||
cell_size = Vector2( 24, 24 )
|
cell_size = Vector2( 24, 24 )
|
||||||
cell_quadrant_size = 3
|
cell_quadrant_size = 3
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -28,6 +28,7 @@ margin_right = 3.15375
|
|||||||
margin_bottom = 0.456848
|
margin_bottom = 0.456848
|
||||||
|
|
||||||
[node name="TileMap" type="TileMap" parent="."]
|
[node name="TileMap" type="TileMap" parent="."]
|
||||||
|
unique_name_in_owner = true
|
||||||
position = Vector2( -16, 10 )
|
position = Vector2( -16, 10 )
|
||||||
tile_set = ExtResource( 1 )
|
tile_set = ExtResource( 1 )
|
||||||
cell_size = Vector2( 24, 24 )
|
cell_size = Vector2( 24, 24 )
|
||||||
@ -212,10 +213,10 @@ position = Vector2( 210, -15 )
|
|||||||
[node name="BlobbyCam" parent="." instance=ExtResource( 11 )]
|
[node name="BlobbyCam" parent="." instance=ExtResource( 11 )]
|
||||||
|
|
||||||
[node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"]
|
[node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"]
|
||||||
frame = 10
|
frame = 0
|
||||||
|
|
||||||
[node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"]
|
[node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"]
|
||||||
frame = 1
|
frame = 5
|
||||||
|
|
||||||
[node name="Blobby" parent="." instance=ExtResource( 10 )]
|
[node name="Blobby" parent="." instance=ExtResource( 10 )]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user