Changed to GLES2

This commit is contained in:
Delta-key 2020-07-03 23:08:21 -03:00
parent 210ca93d6c
commit 2f84f4cf2e
3 changed files with 34 additions and 161 deletions

View file

@ -11,11 +11,7 @@
[ext_resource path="res://Resources/SFX/Dive2.wav" type="AudioStream" id=9]
[sub_resource type="Animation" id=1]
resource_name = "going_down"
length = 1.0
loop = false
step = 0.1
tracks/0/type = "value"
tracks/0/path = NodePath("sprite:frame")
tracks/0/interp = 1
@ -42,11 +38,7 @@ tracks/1/keys = {
}
[sub_resource type="Animation" id=2]
resource_name = "going_up"
length = 1.0
loop = false
step = 0.1
tracks/0/type = "value"
tracks/0/path = NodePath("sprite:frame")
tracks/0/interp = 1
@ -73,11 +65,8 @@ tracks/1/keys = {
}
[sub_resource type="Animation" id=3]
resource_name = "idle"
length = 1.0
loop = true
step = 0.1
tracks/0/type = "value"
tracks/0/path = NodePath("sprite:frame")
tracks/0/interp = 1
@ -104,7 +93,6 @@ tracks/1/keys = {
}
[sub_resource type="Animation" id=4]
resource_name = "walk"
length = 0.8
loop = true
@ -135,18 +123,13 @@ tracks/1/keys = {
}
[sub_resource type="RectangleShape2D" id=5]
custom_solver_bias = 0.0
extents = Vector2( 4, 7 )
[sub_resource type="CapsuleShape2D" id=6]
custom_solver_bias = 0.0
radius = 4.0
height = 8.0
[sub_resource type="GDScript" id=7]
script/source = "extends Node2D
const green=Color('afff00')#Color('84ad42')
const red=Color('c0461f')
@ -163,239 +146,127 @@ func _process(delta):
$dive_aim/polygon_2d.color=red if $dive_aim.get_overlapping_bodies().size()>0 else green
else:
$dive_aim/polygon_2d.color=red"
_sections_unfolded = [ "Resource" ]
[sub_resource type="RectangleShape2D" id=8]
custom_solver_bias = 0.0
extents = Vector2( 1, 1 )
[node name="player" type="KinematicBody2D"]
z_as_relative = false
input_pickable = false
collision_layer = 1
collision_mask = 1
collision/safe_margin = 0.08
script = ExtResource( 1 )
_sections_unfolded = [ "Collision", "Transform", "Z Index" ]
last_horizontal_direction = 1
flag_constant_spritetrail = false
color_spritetrail = Color( 1, 1, 1, 1 )
[node name="animation_player" type="AnimationPlayer" parent="." index="0"]
root_node = NodePath("..")
[node name="animation_player" type="AnimationPlayer" parent="."]
autoplay = "idle"
playback_process_mode = 1
playback_default_blend_time = 0.0
playback_speed = 1.0
anims/going_down = SubResource( 1 )
anims/going_up = SubResource( 2 )
anims/idle = SubResource( 3 )
anims/walk = SubResource( 4 )
blend_times = [ ]
[node name="twn_squishy" type="Tween" parent="." index="1"]
[node name="twn_squishy" type="Tween" parent="."]
repeat = false
playback_process_mode = 1
playback_speed = 1.0
playback/active = false
playback/repeat = false
playback/speed = 1.0
[node name="twn_dive" type="Tween" parent="."]
[node name="twn_dive" type="Tween" parent="." index="2"]
repeat = false
playback_process_mode = 1
playback_speed = 1.0
playback/active = false
playback/repeat = false
playback/speed = 1.0
[node name="twn_fadeout" type="Tween" parent="." index="3"]
repeat = false
playback_process_mode = 1
playback_speed = 1.0
playback/active = false
playback/repeat = false
playback/speed = 1.0
[node name="collision_shape_2d" type="CollisionShape2D" parent="." index="4"]
[node name="twn_fadeout" type="Tween" parent="."]
[node name="collision_shape_2d" type="CollisionShape2D" parent="."]
position = Vector2( 0, 1 )
shape = SubResource( 5 )
[node name="collision_shape_2d2" type="CollisionShape2D" parent="." index="5"]
[node name="collision_shape_2d2" type="CollisionShape2D" parent="."]
shape = SubResource( 6 )
disabled = true
[node name="eyes" type="Sprite" parent="." index="6"]
[node name="eyes" type="Sprite" parent="."]
visible = false
position = Vector2( 0, 1 )
z_index = 10
z_as_relative = false
_sections_unfolded = [ "Transform", "Z Index" ]
[node name="sprite2" type="Sprite" parent="eyes" index="0"]
[node name="sprite2" type="Sprite" parent="eyes"]
position = Vector2( -1, -5 )
scale = Vector2( 1, 2 )
texture = ExtResource( 2 )
centered = false
_sections_unfolded = [ "Material", "Offset", "Transform", "Z Index" ]
[node name="sprite3" type="Sprite" parent="eyes" index="1"]
[node name="sprite3" type="Sprite" parent="eyes"]
position = Vector2( 1, -5 )
scale = Vector2( 1, 2 )
texture = ExtResource( 2 )
centered = false
_sections_unfolded = [ "Material", "Offset", "Transform", "Z Index" ]
[node name="sprite" type="Sprite" parent="." index="7"]
[node name="sprite" type="Sprite" parent="."]
use_parent_material = true
texture = ExtResource( 3 )
hframes = 9
frame = 4
_sections_unfolded = [ "Animation", "Material", "Transform" ]
[node name="timers" type="Node2D" parent="." index="8"]
[node name="timers" type="Node2D" parent="."]
[node name="tmr_spritetrail" type="Timer" parent="timers" index="0"]
process_mode = 1
[node name="tmr_spritetrail" type="Timer" parent="timers"]
wait_time = 0.1
one_shot = true
autostart = false
[node name="tmr_invencibility" type="Timer" parent="timers" index="1"]
[node name="tmr_invencibility" type="Timer" parent="timers"]
process_mode = 1
wait_time = 1.0
one_shot = false
autostart = false
[node name="area_2d" type="Area2D" parent="." index="9"]
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"
[node name="collision_shape_2d" type="CollisionShape2D" parent="area_2d" index="0"]
[node name="area_2d" type="Area2D" parent="."]
[node name="collision_shape_2d" type="CollisionShape2D" parent="area_2d"]
shape = SubResource( 5 )
[node name="dive_aim" type="Node2D" parent="." index="10"]
[node name="dive_aim" type="Node2D" parent="."]
script = SubResource( 7 )
[node name="dive_aim" type="Area2D" parent="dive_aim" index="0"]
[node name="dive_aim" type="Area2D" parent="dive_aim"]
position = Vector2( 16, 0 )
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"
_sections_unfolded = [ "Collision", "Transform" ]
[node name="sprite" type="Sprite" parent="dive_aim/dive_aim" index="0"]
[node name="sprite" type="Sprite" parent="dive_aim/dive_aim"]
visible = false
scale = Vector2( 0.0625, 0.0625 )
texture = ExtResource( 4 )
_sections_unfolded = [ "Transform" ]
[node name="polygon_2d" type="Polygon2D" parent="dive_aim/dive_aim" index="1"]
[node name="polygon_2d" type="Polygon2D" parent="dive_aim/dive_aim"]
position = Vector2( -3, 0 )
polygon = PoolVector2Array( -5, -2, -7, 0, -5, 2, 3, 0 )
uv = PoolVector2Array( )
color = Color( 1, 1, 1, 1 )
vertex_colors = PoolColorArray( 0.3, 0.3, 0.3, 0.9, 0.3, 0.3, 0.3, 0.5, 0.3, 0.3, 0.3, 0.9 )
offset = Vector2( 0, 0 )
antialiased = false
texture = null
texture_offset = Vector2( 0, 0 )
texture_scale = Vector2( 1, 1 )
texture_rotation_degrees = 0.0
invert_enable = false
invert_border = 100.0
[node name="collision_polygon_2d" type="CollisionPolygon2D" parent="dive_aim/dive_aim" index="2"]
build_mode = 0
[node name="collision_polygon_2d" type="CollisionPolygon2D" parent="dive_aim/dive_aim"]
polygon = PoolVector2Array( 0, 0, -1, -1, -1, 1 )
[node name="collision_shape_2d" type="CollisionShape2D" parent="dive_aim/dive_aim" index="3"]
[node name="collision_shape_2d" type="CollisionShape2D" parent="dive_aim/dive_aim"]
position = Vector2( -1, 0 )
shape = SubResource( 8 )
disabled = true
_sections_unfolded = [ "Transform" ]
[node name="position_2d" type="Position2D" parent="dive_aim/dive_aim" index="4"]
[node name="position_2d" type="Position2D" parent="dive_aim/dive_aim"]
[node name="sounds" type="Node2D" parent="." index="11"]
[node name="snd_jump" type="AudioStreamPlayer" parent="sounds" index="0"]
[node name="sounds" type="Node2D" parent="."]
[node name="snd_jump" type="AudioStreamPlayer" parent="sounds"]
stream = ExtResource( 5 )
volume_db = 0.0
autoplay = false
mix_target = 0
bus = "sfx"
[node name="snd_land" type="AudioStreamPlayer" parent="sounds" index="1"]
[node name="snd_land" type="AudioStreamPlayer" parent="sounds"]
stream = ExtResource( 6 )
volume_db = 0.0
autoplay = false
mix_target = 0
bus = "sfx"
[node name="snd_dive" type="AudioStreamPlayer" parent="sounds" index="2"]
[node name="snd_dive" type="AudioStreamPlayer" parent="sounds"]
stream = ExtResource( 7 )
volume_db = -1.0
autoplay = false
mix_target = 0
bus = "sfx"
[node name="snd_dive1" type="AudioStreamPlayer" parent="sounds" index="3"]
[node name="snd_dive1" type="AudioStreamPlayer" parent="sounds"]
stream = ExtResource( 8 )
volume_db = -4.0
autoplay = false
mix_target = 0
bus = "sfx"
[node name="snd_dive_away" type="AudioStreamPlayer" parent="sounds" index="4"]
[node name="snd_dive_away" type="AudioStreamPlayer" parent="sounds"]
stream = ExtResource( 9 )
volume_db = -1.0
autoplay = false
mix_target = 0
bus = "sfx"
[node name="camera2D" type="Camera2D" parent="."]
anchor_mode = 0
[connection signal="tween_completed" from="twn_dive" to="." method="_on_twn_dive_tween_completed"]
[connection signal="tween_started" from="twn_dive" to="." method="_on_twn_dive_tween_started"]
[connection signal="timeout" from="timers/tmr_spritetrail" to="." method="_on_tmr_spritetrail_timeout"]
[connection signal="timeout" from="timers/tmr_invencibility" to="." method="_on_tmr_invencibility_timeout"]

View file

@ -27,7 +27,8 @@ var dictionary_paths = {
}
func _ready():
print_debug('Tilemap: Beginning autotile...')
# return
# print_debug('Tilemap: Beginning autotile...')
for x in range(gridSize.x - 1):
for y in range(-1,gridSize.y - 1):
if get_cell(x,y)!=-1:
@ -39,7 +40,7 @@ func _ready():
if tile_index==15:
if(randf()<0.1): tile_index+=randi()%12
set_cell(x, y, tile_index)
print_debug('Tilemap: Autotiling done!')
# print_debug('Tilemap: Autotiling done!')
"
[sub_resource type="DynamicFont" id=2]

View file

@ -124,5 +124,6 @@ name_casing=1
[rendering]
quality/driver/driver_name="GLES2"
environment/default_clear_color=Color( 0.09375, 0.09375, 0.09375, 1 )
environment/default_environment="res://default_env.tres"