new exit graphics
This commit is contained in:
parent
caa33c0592
commit
e256cc15cb
6 changed files with 151 additions and 134 deletions
Binary file not shown.
Before Width: | Height: | Size: 260 B After Width: | Height: | Size: 4.9 KiB |
BIN
graphics/exit/exit_back.png
Normal file
BIN
graphics/exit/exit_back.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.4 KiB |
35
graphics/exit/exit_back.png.import
Normal file
35
graphics/exit/exit_back.png.import
Normal file
|
@ -0,0 +1,35 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/exit_back.png-cd39ec899573a453a62e1f55eaf2a249.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://graphics/exit/exit_back.png"
|
||||
dest_files=[ "res://.import/exit_back.png-cd39ec899573a453a62e1f55eaf2a249.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=false
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
|
@ -1,21 +1,27 @@
|
|||
extends Node2D
|
||||
|
||||
export var cost = 0
|
||||
onready var label = $Label
|
||||
onready var anims = $AnimationPlayer
|
||||
onready var map = get_owner()
|
||||
export var cost: int = 0
|
||||
|
||||
var open: bool = false
|
||||
|
||||
onready var label: Label = $Label
|
||||
onready var detect_shape: CollisionShape2D = $DetectPlayer/CollisionShape2D
|
||||
onready var sprite: Sprite = $Sprite
|
||||
onready var closed_collision: CollisionShape2D = $"%ClosedCollision"
|
||||
|
||||
func _ready():
|
||||
anims.play("closed")
|
||||
label.text = "¶" + str(cost)
|
||||
|
||||
|
||||
func _physics_process(delta):
|
||||
if Game.keys >= cost:
|
||||
anims.play("open")
|
||||
if Game.keys >= cost and not open:
|
||||
open = true
|
||||
detect_shape.disabled = false
|
||||
closed_collision.disabled = true
|
||||
label.visible = false
|
||||
var tween = create_tween()
|
||||
tween.tween_property(sprite, "frame", 3, 0.25)
|
||||
|
||||
func _on_Area2D_area_entered(area):
|
||||
if area.is_in_group("player_hitbox"):
|
||||
Game.tally_scores()
|
||||
SceneManager.change_scene(preload("res://menus/results.tscn").instance())
|
||||
# Game.change_map(load("res://maps/level_select.tscn"))
|
||||
|
|
|
@ -1,152 +1,112 @@
|
|||
[gd_scene load_steps=10 format=2]
|
||||
[gd_scene load_steps=14 format=2]
|
||||
|
||||
[ext_resource path="res://ui/theme.tres" type="Theme" id=1]
|
||||
[ext_resource path="res://objects/environment/exit/exit.gd" type="Script" id=2]
|
||||
[ext_resource path="res://graphics/exit/exit.png" type="Texture" id=3]
|
||||
[ext_resource path="res://shaders/1px_border.gdshader" type="Shader" id=4]
|
||||
[ext_resource path="res://shaders/beam_of_sin.gdshader" type="Shader" id=4]
|
||||
[ext_resource path="res://ui/2ndpuberty_outline.tres" type="Material" id=5]
|
||||
[ext_resource path="res://graphics/exit/exit_back.png" type="Texture" id=6]
|
||||
[ext_resource path="res://shaders/can_stain.tres" type="Material" id=7]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id=1]
|
||||
[sub_resource type="ShaderMaterial" id=4]
|
||||
shader = ExtResource( 4 )
|
||||
shader_param/border_color = Color( 0, 0, 0, 1 )
|
||||
shader_param/border_corners = true
|
||||
shader_param/speed = 5.0
|
||||
shader_param/cycle_offset = 0.0
|
||||
shader_param/wave_length = 8.0
|
||||
shader_param/thickness = 0.1
|
||||
|
||||
[sub_resource type="ShaderMaterial" id=5]
|
||||
shader = ExtResource( 4 )
|
||||
shader_param/speed = -6.0
|
||||
shader_param/cycle_offset = 3.0
|
||||
shader_param/wave_length = 5.0
|
||||
shader_param/thickness = 0.1
|
||||
|
||||
[sub_resource type="Gradient" id=6]
|
||||
interpolation_mode = 1
|
||||
offsets = PoolRealArray( 0, 0.5 )
|
||||
colors = PoolColorArray( 0.345098, 0.74902, 0.878431, 1, 0.396078, 1, 1, 1 )
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=2]
|
||||
extents = Vector2( 8, 7.5 )
|
||||
extents = Vector2( 1, 1 )
|
||||
|
||||
[sub_resource type="Animation" id=3]
|
||||
resource_name = "closed"
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("Sprite:region_rect")
|
||||
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": [ Rect2( 0, 0, 16, 24 ) ]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/path = NodePath("Area2D/CollisionShape2D:disabled")
|
||||
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": [ true ]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/path = NodePath("Label:visible")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/keys = {
|
||||
"times": PoolRealArray( 0 ),
|
||||
"transitions": PoolRealArray( 1 ),
|
||||
"update": 1,
|
||||
"values": [ true ]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/path = NodePath("Sprite:modulate")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/keys = {
|
||||
"times": PoolRealArray( 0 ),
|
||||
"transitions": PoolRealArray( 1 ),
|
||||
"update": 0,
|
||||
"values": [ Color( 1, 1, 1, 1 ) ]
|
||||
}
|
||||
[sub_resource type="RectangleShape2D" id=7]
|
||||
extents = Vector2( 7, 7.5 )
|
||||
|
||||
[sub_resource type="Animation" id=4]
|
||||
resource_name = "open"
|
||||
length = 0.8
|
||||
loop = true
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("Sprite:region_rect")
|
||||
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": [ Rect2( 16, 0, 16, 24 ) ]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/path = NodePath("Area2D/CollisionShape2D:disabled")
|
||||
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": [ false ]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/path = NodePath("Label:visible")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/keys = {
|
||||
"times": PoolRealArray( 0 ),
|
||||
"transitions": PoolRealArray( 1 ),
|
||||
"update": 1,
|
||||
"values": [ false ]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/path = NodePath("Sprite:modulate")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/keys = {
|
||||
"times": PoolRealArray( 0, 0.4, 0.8 ),
|
||||
"transitions": PoolRealArray( 1, 1, 1 ),
|
||||
"update": 0,
|
||||
"values": [ Color( 1, 0, 0, 1 ), Color( 0, 1, 0.203922, 1 ), Color( 1, 0, 0, 1 ) ]
|
||||
}
|
||||
[sub_resource type="RectangleShape2D" id=8]
|
||||
extents = Vector2( 8, 4.5 )
|
||||
|
||||
[node name="Exit" type="Node2D"]
|
||||
z_index = 50
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Background" type="Sprite" parent="."]
|
||||
position = Vector2( 0, 5 )
|
||||
z_index = -1
|
||||
texture = ExtResource( 6 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
material = ExtResource( 7 )
|
||||
texture = ExtResource( 3 )
|
||||
hframes = 4
|
||||
|
||||
[node name="Energy" type="Node2D" parent="Sprite"]
|
||||
show_behind_parent = true
|
||||
|
||||
[node name="Wave1" type="ColorRect" parent="Sprite/Energy"]
|
||||
material = SubResource( 4 )
|
||||
margin_left = -7.0
|
||||
margin_top = -3.0
|
||||
margin_right = 7.0
|
||||
margin_bottom = 12.0
|
||||
color = Color( 0.396078, 1, 1, 1 )
|
||||
|
||||
[node name="Wave2" type="ColorRect" parent="Sprite/Energy"]
|
||||
material = SubResource( 5 )
|
||||
margin_left = -7.0
|
||||
margin_top = -3.0
|
||||
margin_right = 7.0
|
||||
margin_bottom = 12.0
|
||||
color = Color( 0.345098, 0.74902, 0.878431, 1 )
|
||||
|
||||
[node name="Sparkles" type="CPUParticles2D" parent="Sprite/Energy"]
|
||||
position = Vector2( 0, 12 )
|
||||
amount = 16
|
||||
lifetime = 2.0
|
||||
emission_shape = 2
|
||||
emission_rect_extents = Vector2( 6, 0 )
|
||||
direction = Vector2( 0, -1 )
|
||||
spread = 0.0
|
||||
gravity = Vector2( 0, 0 )
|
||||
initial_velocity = 12.0
|
||||
damping = 4.0
|
||||
color_initial_ramp = SubResource( 6 )
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
material = ExtResource( 5 )
|
||||
margin_left = -10.0
|
||||
margin_top = -15.0
|
||||
margin_right = 30.0
|
||||
margin_bottom = 5.0
|
||||
margin_top = -12.0
|
||||
margin_right = 11.0
|
||||
margin_bottom = 8.0
|
||||
theme = ExtResource( 1 )
|
||||
text = "¶22"
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
material = SubResource( 1 )
|
||||
texture = ExtResource( 3 )
|
||||
region_enabled = true
|
||||
region_rect = Rect2( 0, 0, 16, 24 )
|
||||
|
||||
[node name="Area2D" type="Area2D" parent="."]
|
||||
[node name="DetectPlayer" type="Area2D" parent="."]
|
||||
z_index = -3
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
|
||||
position = Vector2( 0, 4.5 )
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="DetectPlayer"]
|
||||
position = Vector2( 0, 11 )
|
||||
shape = SubResource( 2 )
|
||||
disabled = true
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
anims/closed = SubResource( 3 )
|
||||
anims/open = SubResource( 4 )
|
||||
[node name="Collision" type="StaticBody2D" parent="." groups=["can_stain"]]
|
||||
|
||||
[connection signal="area_entered" from="Area2D" to="." method="_on_Area2D_area_entered"]
|
||||
[node name="ClosedCollision" type="CollisionShape2D" parent="Collision"]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2( 0, 4.5 )
|
||||
shape = SubResource( 7 )
|
||||
|
||||
[node name="TopShape" type="CollisionShape2D" parent="Collision"]
|
||||
position = Vector2( 0, -7.5 )
|
||||
shape = SubResource( 8 )
|
||||
|
||||
[connection signal="area_entered" from="DetectPlayer" to="." method="_on_Area2D_area_entered"]
|
||||
|
|
16
shaders/beam_of_sin.gdshader
Normal file
16
shaders/beam_of_sin.gdshader
Normal file
|
@ -0,0 +1,16 @@
|
|||
shader_type canvas_item;
|
||||
|
||||
uniform float speed = 1.0;
|
||||
uniform float cycle_offset = 0.0;
|
||||
uniform float wave_length = 1.0;
|
||||
uniform float thickness = 0.05;
|
||||
|
||||
float plot(vec2 st, float pct) {
|
||||
return step( pct - thickness, st.x) -
|
||||
step( pct + thickness, st.x);
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
float x = sin(UV.y * wave_length + TIME * speed + cycle_offset)*0.5+0.5;
|
||||
COLOR = COLOR * vec4(1.0, 1.0, 1.0, plot(UV * vec2(1.2, 1.0) + vec2(-0.1, 0.0), x));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue