fix: "better" shader for orb border
This commit is contained in:
parent
fcd22e44f7
commit
fbb7404416
@ -4041,6 +4041,8 @@ particles_anim_v_frames = 1
|
|||||||
particles_anim_loop = false
|
particles_anim_loop = false
|
||||||
|
|
||||||
[sub_resource type="ParticlesMaterial" id=200]
|
[sub_resource type="ParticlesMaterial" id=200]
|
||||||
|
emission_shape = 1
|
||||||
|
emission_sphere_radius = 1.0
|
||||||
flag_disable_z = true
|
flag_disable_z = true
|
||||||
direction = Vector3( 10, 2, 0 )
|
direction = Vector3( 10, 2, 0 )
|
||||||
spread = 1.0
|
spread = 1.0
|
||||||
@ -4216,7 +4218,7 @@ texture = SubResource( 62 )
|
|||||||
offset = Vector2( 1, 0 )
|
offset = Vector2( 1, 0 )
|
||||||
hframes = 6
|
hframes = 6
|
||||||
vframes = 6
|
vframes = 6
|
||||||
frame = 5
|
frame = 10
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_editor_description_": "YXNlcHJpdGVfd2l6YXJkX2NvbmZpZwpwbGF5ZXJ8PUJsb2JieVNwcml0ZS9CbG9iYnltYXRpb25QbGF5ZXIKc291cmNlfD1yZXM6Ly9hc3NldHMvYmxvYmJ5L2Jsb2JieS1zcHJpdGVzaGVldHQuYXNlcHJpdGUKbGF5ZXJ8PUJsb2JieQpvcF9leHB8PUZhbHNlCm9fZm9sZGVyfD0Kb19uYW1lfD0Kb25seV92aXNpYmxlfD1GYWxzZQpvX2V4X3B8PQo="
|
"_editor_description_": "YXNlcHJpdGVfd2l6YXJkX2NvbmZpZwpwbGF5ZXJ8PUJsb2JieVNwcml0ZS9CbG9iYnltYXRpb25QbGF5ZXIKc291cmNlfD1yZXM6Ly9hc3NldHMvYmxvYmJ5L2Jsb2JieS1zcHJpdGVzaGVldHQuYXNlcHJpdGUKbGF5ZXJ8PUJsb2JieQpvcF9leHB8PUZhbHNlCm9fZm9sZGVyfD0Kb19uYW1lfD0Kb25seV92aXNpYmxlfD1GYWxzZQpvX2V4X3B8PQo="
|
||||||
}
|
}
|
||||||
|
|||||||
@ -212,6 +212,7 @@ func _enter_state(new_state, old_state):
|
|||||||
if(new_state == "jump"):
|
if(new_state == "jump"):
|
||||||
jump_point_particles.position.x = 0 if facing == 1 else 24
|
jump_point_particles.position.x = 0 if facing == 1 else 24
|
||||||
jump_point_particles.emitting = true
|
jump_point_particles.emitting = true
|
||||||
|
jump_point_particles.restart()
|
||||||
|
|
||||||
|
|
||||||
if !["run", "walk", "idle", "duck"].has(old_state) && parent.is_on_floor():
|
if !["run", "walk", "idle", "duck"].has(old_state) && parent.is_on_floor():
|
||||||
|
|||||||
@ -279,7 +279,6 @@ func jump():
|
|||||||
v = zero_vector
|
v = zero_vector
|
||||||
if ($Right_Wallcast.is_colliding() && $Left_Wallcast.is_colliding()):
|
if ($Right_Wallcast.is_colliding() && $Left_Wallcast.is_colliding()):
|
||||||
print("help this is a really tight space :(")
|
print("help this is a really tight space :(")
|
||||||
return velocity
|
|
||||||
|
|
||||||
v = correct_jump_direction(v)
|
v = correct_jump_direction(v)
|
||||||
if(v != zero_vector):
|
if(v != zero_vector):
|
||||||
|
|||||||
@ -47,9 +47,31 @@ margin_bottom = 0.456848
|
|||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
position = Vector2( 63, 336 )
|
position = Vector2( 63, 336 )
|
||||||
|
|
||||||
|
[node name="CollisionPolygon2D" parent="Blobby/BlobbySkin" index="0"]
|
||||||
|
position = Vector2( 0.0286326, -10.0053 )
|
||||||
|
|
||||||
|
[node name="BlobbySprite" parent="Blobby" index="3"]
|
||||||
|
scale = Vector2( -1, 1 )
|
||||||
|
frame = 5
|
||||||
|
|
||||||
[node name="AnimationTree" parent="Blobby/BlobbySprite" index="0"]
|
[node name="AnimationTree" parent="Blobby/BlobbySprite" index="0"]
|
||||||
parameters/playback = SubResource( 4 )
|
parameters/playback = SubResource( 4 )
|
||||||
|
|
||||||
|
[node name="BlobbyBody" parent="Blobby" index="8"]
|
||||||
|
position = Vector2( 0.0392303, -10.002 )
|
||||||
|
|
||||||
|
[node name="Left_Wallcast1" parent="Blobby/WallRaycasts/LeftWallRaycast" index="0"]
|
||||||
|
position = Vector2( -11.9763, -5 )
|
||||||
|
|
||||||
|
[node name="Left_Wallcast2" parent="Blobby/WallRaycasts/LeftWallRaycast" index="1"]
|
||||||
|
position = Vector2( -11.9763, 5 )
|
||||||
|
|
||||||
|
[node name="Right_Wallcast1" parent="Blobby/WallRaycasts/RightWallRaycast" index="0"]
|
||||||
|
position = Vector2( 12.0551, -5 )
|
||||||
|
|
||||||
|
[node name="Right_Wallcast2" parent="Blobby/WallRaycasts/RightWallRaycast" index="1"]
|
||||||
|
position = Vector2( 12.0551, 5 )
|
||||||
|
|
||||||
[node name="JumpBufferTimer" parent="Blobby/BlobbyStateMachine" index="0"]
|
[node name="JumpBufferTimer" parent="Blobby/BlobbyStateMachine" index="0"]
|
||||||
process_mode = 0
|
process_mode = 0
|
||||||
wait_time = 0.605
|
wait_time = 0.605
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=320 format=2]
|
[gd_scene load_steps=322 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://assets/neutral object/whitegold orbicle/0020 (Klein)-fs8.png" type="Texture" id=1]
|
[ext_resource path="res://assets/neutral object/whitegold orbicle/0020 (Klein)-fs8.png" type="Texture" id=1]
|
||||||
[ext_resource path="res://src/NeutralObjects/Coin.gd" type="Script" id=2]
|
[ext_resource path="res://src/NeutralObjects/Coin.gd" type="Script" id=2]
|
||||||
@ -377,6 +377,49 @@ tracks/1/keys = {
|
|||||||
"update": 0,
|
"update": 0,
|
||||||
"values": [ Vector2( 0, 3 ), Vector2( 0, -4 ) ]
|
"values": [ Vector2( 0, 3 ), Vector2( 0, -4 ) ]
|
||||||
}
|
}
|
||||||
|
tracks/2/type = "value"
|
||||||
|
tracks/2/path = NodePath("AnimatedSprite:rotation_degrees")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PoolRealArray( 0, 1.2 ),
|
||||||
|
"transitions": PoolRealArray( 1, 1 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ -13.5, 13.5 ]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Shader" id=5]
|
||||||
|
code = "shader_type canvas_item;
|
||||||
|
|
||||||
|
uniform float thickness: hint_range(0.0,1.0) = 0.02;
|
||||||
|
|
||||||
|
void fragment() {
|
||||||
|
vec4 col = texture(TEXTURE, UV);
|
||||||
|
if ( col.a > 0.1 &&
|
||||||
|
(texture(TEXTURE, UV + vec2(thickness,0.) ).a < 0.1
|
||||||
|
|| texture(TEXTURE, UV - vec2(thickness,0.) ).a < 0.1
|
||||||
|
||texture(TEXTURE, UV + vec2(0.,thickness) ).a < 0.1
|
||||||
|
||texture(TEXTURE, UV - vec2(0.,thickness) ).a < 0.1)){
|
||||||
|
COLOR = col - texture(TEXTURE, UV, 1000.);
|
||||||
|
}
|
||||||
|
else if(( col.a < 0.1 &&
|
||||||
|
(texture(TEXTURE, UV + vec2(thickness,0.) ).a > 0.1
|
||||||
|
|| texture(TEXTURE, UV - vec2(thickness,0.) ).a > 0.3
|
||||||
|
||texture(TEXTURE, UV + vec2(0.,thickness) ).a > 0.3
|
||||||
|
||texture(TEXTURE, UV - vec2(0.,thickness) ).a > 0.3))){
|
||||||
|
COLOR = vec4(1.,1.,1.,1.);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
COLOR = texture(TEXTURE, UV);
|
||||||
|
}
|
||||||
|
|
||||||
|
}"
|
||||||
|
|
||||||
|
[sub_resource type="ShaderMaterial" id=6]
|
||||||
|
shader = SubResource( 5 )
|
||||||
|
shader_param/thickness = 0.029
|
||||||
|
|
||||||
[sub_resource type="SpriteFrames" id=4]
|
[sub_resource type="SpriteFrames" id=4]
|
||||||
animations = [ {
|
animations = [ {
|
||||||
@ -394,7 +437,7 @@ monitorable = false
|
|||||||
script = ExtResource( 2 )
|
script = ExtResource( 2 )
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
position = Vector2( 0, -2.52127 )
|
position = Vector2( 0, 3 )
|
||||||
shape = SubResource( 1 )
|
shape = SubResource( 1 )
|
||||||
|
|
||||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||||
@ -403,11 +446,13 @@ anims/fade_out = SubResource( 2 )
|
|||||||
anims/oscilating = SubResource( 3 )
|
anims/oscilating = SubResource( 3 )
|
||||||
|
|
||||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||||
position = Vector2( 0, -2.52127 )
|
material = SubResource( 6 )
|
||||||
scale = Vector2( 0.149428, 0.151196 )
|
position = Vector2( 0, 3 )
|
||||||
|
rotation = -0.235619
|
||||||
|
scale = Vector2( 0.2, 0.2 )
|
||||||
frames = SubResource( 4 )
|
frames = SubResource( 4 )
|
||||||
animation = "rotate"
|
animation = "rotate"
|
||||||
frame = 308
|
frame = 128
|
||||||
playing = true
|
playing = true
|
||||||
|
|
||||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||||
|
|||||||
@ -50,5 +50,5 @@ animations = [ {
|
|||||||
position = Vector2( 0, 1.5 )
|
position = Vector2( 0, 1.5 )
|
||||||
z_index = -1
|
z_index = -1
|
||||||
frames = SubResource( 1 )
|
frames = SubResource( 1 )
|
||||||
frame = 11
|
frame = 5
|
||||||
playing = true
|
playing = true
|
||||||
|
|||||||
@ -19,7 +19,7 @@ script = ExtResource( 2 )
|
|||||||
texture = ExtResource( 1 )
|
texture = ExtResource( 1 )
|
||||||
|
|
||||||
[node name="SpringSkin" type="Area2D" parent="."]
|
[node name="SpringSkin" type="Area2D" parent="."]
|
||||||
collision_layer = 16
|
collision_layer = 32
|
||||||
collision_mask = 3
|
collision_mask = 3
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="SpringSkin"]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="SpringSkin"]
|
||||||
@ -27,7 +27,7 @@ position = Vector2( -0.0412841, -1.27843 )
|
|||||||
shape = SubResource( 2 )
|
shape = SubResource( 2 )
|
||||||
|
|
||||||
[node name="SpringBody" type="KinematicBody2D" parent="."]
|
[node name="SpringBody" type="KinematicBody2D" parent="."]
|
||||||
collision_layer = 16
|
collision_layer = 32
|
||||||
collision_mask = 43
|
collision_mask = 43
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="SpringBody"]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="SpringBody"]
|
||||||
@ -37,7 +37,7 @@ one_way_collision = true
|
|||||||
|
|
||||||
[node name="EnteringVelocityDetector" type="Area2D" parent="."]
|
[node name="EnteringVelocityDetector" type="Area2D" parent="."]
|
||||||
position = Vector2( 0, -3.04889 )
|
position = Vector2( 0, -3.04889 )
|
||||||
collision_layer = 16
|
collision_layer = 32
|
||||||
collision_mask = 43
|
collision_mask = 43
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="EnteringVelocityDetector"]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="EnteringVelocityDetector"]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user