arena exterior
Before Width: | Height: | Size: 831 B After Width: | Height: | Size: 852 B |
After Width: | Height: | Size: 15 KiB |
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cgyrw2wsjp8in"
|
||||||
|
path="res://.godot/imported/ray-x16.png-ad3e8efa9827ce77092ab638f940a445.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Assets/Sprites/Particles/ray-x16.png"
|
||||||
|
dest_files=["res://.godot/imported/ray-x16.png-ad3e8efa9827ce77092ab638f940a445.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
After Width: | Height: | Size: 13 KiB |
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cslrhlihsf3vw"
|
||||||
|
path="res://.godot/imported/ray-x4.png-840e98413d6613053b5b75fa6571bc17.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Assets/Sprites/Particles/ray-x4.png"
|
||||||
|
dest_files=["res://.godot/imported/ray-x4.png-840e98413d6613053b5b75fa6571bc17.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
After Width: | Height: | Size: 9.8 KiB |
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://coljkw1d3ahbu"
|
||||||
|
path="res://.godot/imported/ray-x8-end.png-8e62e247614be0131a0174a3f42bcf71.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Assets/Sprites/Particles/ray-x8-end.png"
|
||||||
|
dest_files=["res://.godot/imported/ray-x8-end.png-8e62e247614be0131a0174a3f42bcf71.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
After Width: | Height: | Size: 1.3 KiB |
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://dwbrymm3ud5xu"
|
||||||
|
path="res://.godot/imported/bookshelf.png-0e3d1dd998579e6906b5c0235fcb84ce.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Assets/Sprites/Props/bookshelf.png"
|
||||||
|
dest_files=["res://.godot/imported/bookshelf.png-0e3d1dd998579e6906b5c0235fcb84ce.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 3.9 KiB |
|
@ -0,0 +1,404 @@
|
||||||
|
[gd_scene load_steps=50 format=3 uid="uid://ckxelxak8dko7"]
|
||||||
|
|
||||||
|
[ext_resource type="Shader" path="res://Shaders/Flash.gdshader" id="1_1xpe6"]
|
||||||
|
[ext_resource type="Script" path="res://Characters/Enemy.cs" id="2_jq8f8"]
|
||||||
|
[ext_resource type="Script" path="res://State/Character/CharacterStateMachine.cs" id="3_n5adw"]
|
||||||
|
[ext_resource type="Script" path="res://State/Character/NPCIdleState.cs" id="4_g3et5"]
|
||||||
|
[ext_resource type="Script" path="res://State/Character/NPCMoveState.cs" id="5_1j55k"]
|
||||||
|
[ext_resource type="Script" path="res://State/Character/CharacterDashState.cs" id="6_4uva8"]
|
||||||
|
[ext_resource type="Script" path="res://State/Character/PlayerRollState.cs" id="7_kdm1e"]
|
||||||
|
[ext_resource type="Script" path="res://Utils/AnimationManager.cs" id="8_f33u2"]
|
||||||
|
[ext_resource type="AnimationLibrary" uid="uid://epe31b7x1nt1" path="res://Assets/Animations/player_hurt.res" id="9_0ywmi"]
|
||||||
|
[ext_resource type="Animation" uid="uid://8e8r3y1imvsx" path="res://Assets/Animations/stun.res" id="9_fkx1e"]
|
||||||
|
[ext_resource type="Material" uid="uid://bat28samf7ukd" path="res://Assets/Sprites/Particles/NPCDamageProcessMaterial.tres" id="10_hnmcd"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://c1a7lvb4uuwfy" path="res://Assets/Sprites/Particles/circle-16.png" id="10_qbgyb"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bd8l8kafb42dt" path="res://Assets/Sprites/Particles/circle.png" id="11_6bslo"]
|
||||||
|
[ext_resource type="Material" uid="uid://ra02tvwd5o5g" path="res://Assets/Sprites/Particles/PlayerDeathProcessMaterial.tres" id="11_85w4a"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://bbqdpexvknma2" path="res://Assets/Sounds/never-lucky.mp3" id="13_bovud"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://cruylv4pu2fo1" path="res://Assets/Sounds/footstep-tile.wav" id="14_2ql70"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bej8thq7ruyty" path="res://Assets/Sprites/Characters/forsen2.png" id="16_lr46v"]
|
||||||
|
[ext_resource type="Script" path="res://Items/Inventory.cs" id="17_q8tne"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://dvqap2uhcah63" path="res://Items/Weapons/Sword.tscn" id="18_dqppu"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://cjgxyhgcyvsv7" path="res://BoundingBoxes/Hurtbox.tscn" id="20_7qskd"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://k6kpdj1kv0jg" path="res://Assets/Sounds/splat.ogg" id="21_8714l"]
|
||||||
|
|
||||||
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_h78y7"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
shader = ExtResource("1_1xpe6")
|
||||||
|
shader_parameter/color = Vector4(1, 1, 1, 1)
|
||||||
|
shader_parameter/intensity = 0.0
|
||||||
|
shader_parameter/alpha_modulate = 1.0
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_imqdv"]
|
||||||
|
length = 0.001
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("../Sprites/Node2D/Character:frame")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 1,
|
||||||
|
"values": [0]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("../Sprites/Node2D/Character:rotation")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [0.0]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_mg66i"]
|
||||||
|
resource_name = "idle"
|
||||||
|
length = 0.5
|
||||||
|
loop_mode = 1
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("../Sprites/Node2D/Character:frame")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.3),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 1,
|
||||||
|
"values": [0, 1]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_iyr4r"]
|
||||||
|
resource_name = "move"
|
||||||
|
length = 0.6
|
||||||
|
loop_mode = 1
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("../Sprites/Node2D/Character:frame")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5),
|
||||||
|
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1),
|
||||||
|
"update": 1,
|
||||||
|
"values": [2, 3, 4, 5, 6, 7]
|
||||||
|
}
|
||||||
|
tracks/1/type = "method"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("..")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0.2, 0.5),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"values": [{
|
||||||
|
"args": [],
|
||||||
|
"method": &"Footstep"
|
||||||
|
}, {
|
||||||
|
"args": [],
|
||||||
|
"method": &"Footstep"
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_vobpw"]
|
||||||
|
resource_name = "roll"
|
||||||
|
length = 0.5
|
||||||
|
step = 0.05
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("../Sprites/Node2D/Character:rotation")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.5),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [0.0, 6.28319]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_tpnyg"]
|
||||||
|
resource_name = "stop"
|
||||||
|
length = 0.2
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("../Sprites/Node2D/Character:frame")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.2),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 1,
|
||||||
|
"values": [10, 0]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_0tohi"]
|
||||||
|
_data = {
|
||||||
|
"RESET": SubResource("Animation_imqdv"),
|
||||||
|
"idle": SubResource("Animation_mg66i"),
|
||||||
|
"move": SubResource("Animation_iyr4r"),
|
||||||
|
"roll": SubResource("Animation_vobpw"),
|
||||||
|
"stop": SubResource("Animation_tpnyg")
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_adxyh"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
length = 0.001
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("../Sprites/Node2D/Character:frame")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 1,
|
||||||
|
"values": [0]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_3w3u1"]
|
||||||
|
resource_name = "sword"
|
||||||
|
length = 0.3
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("../Sprites/Node2D/Character:frame")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.1, 0.2),
|
||||||
|
"transitions": PackedFloat32Array(1, 1, 1),
|
||||||
|
"update": 1,
|
||||||
|
"values": [12, 13, 14]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_73mj7"]
|
||||||
|
_data = {
|
||||||
|
"RESET": SubResource("Animation_adxyh"),
|
||||||
|
"sword": SubResource("Animation_3w3u1")
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_kks2p"]
|
||||||
|
_data = {
|
||||||
|
"stun": ExtResource("9_fkx1e")
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_kwett"]
|
||||||
|
animation = &"idle"
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_vqdng"]
|
||||||
|
animation = &"move"
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_4np0m"]
|
||||||
|
animation = &"roll"
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_suhx1"]
|
||||||
|
animation = &"stop"
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_sorqc"]
|
||||||
|
advance_mode = 2
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_ujrp0"]
|
||||||
|
advance_condition = &"move"
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_kjkm8"]
|
||||||
|
advance_condition = &"idle"
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_1ywlq"]
|
||||||
|
switch_mode = 2
|
||||||
|
advance_mode = 2
|
||||||
|
advance_condition = &"idle"
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_abs7t"]
|
||||||
|
advance_condition = &"roll"
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_qlka8"]
|
||||||
|
advance_condition = &"idle"
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_ql2f3"]
|
||||||
|
advance_condition = &"move"
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_g1yba"]
|
||||||
|
advance_condition = &"roll"
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_0ukul"]
|
||||||
|
states/End/position = Vector2(613, 100)
|
||||||
|
states/Start/position = Vector2(89, 100)
|
||||||
|
states/idle/node = SubResource("AnimationNodeAnimation_kwett")
|
||||||
|
states/idle/position = Vector2(259, 100)
|
||||||
|
states/move/node = SubResource("AnimationNodeAnimation_vqdng")
|
||||||
|
states/move/position = Vector2(259, 18)
|
||||||
|
states/roll/node = SubResource("AnimationNodeAnimation_4np0m")
|
||||||
|
states/roll/position = Vector2(89, 18)
|
||||||
|
states/stop/node = SubResource("AnimationNodeAnimation_suhx1")
|
||||||
|
states/stop/position = Vector2(438, 100)
|
||||||
|
transitions = ["Start", "idle", SubResource("AnimationNodeStateMachineTransition_sorqc"), "idle", "move", SubResource("AnimationNodeStateMachineTransition_ujrp0"), "move", "stop", SubResource("AnimationNodeStateMachineTransition_kjkm8"), "stop", "idle", SubResource("AnimationNodeStateMachineTransition_1ywlq"), "idle", "roll", SubResource("AnimationNodeStateMachineTransition_abs7t"), "roll", "idle", SubResource("AnimationNodeStateMachineTransition_qlka8"), "roll", "move", SubResource("AnimationNodeStateMachineTransition_ql2f3"), "move", "roll", SubResource("AnimationNodeStateMachineTransition_g1yba")]
|
||||||
|
graph_offset = Vector2(-335.315, -63.5708)
|
||||||
|
|
||||||
|
[sub_resource type="AnimationNodeStateMachinePlayback" id="AnimationNodeStateMachinePlayback_jy6hr"]
|
||||||
|
|
||||||
|
[sub_resource type="CanvasTexture" id="CanvasTexture_pited"]
|
||||||
|
diffuse_texture = ExtResource("10_qbgyb")
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_bfqew"]
|
||||||
|
size = Vector2(12, 8)
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_cjk6b"]
|
||||||
|
size = Vector2(8, 8)
|
||||||
|
|
||||||
|
[node name="Enemy" type="CharacterBody2D" node_paths=PackedStringArray("DefaultSelectedItem", "Sprite", "Inventory", "StateMachine", "Hurtbox")]
|
||||||
|
y_sort_enabled = true
|
||||||
|
texture_filter = 3
|
||||||
|
material = SubResource("ShaderMaterial_h78y7")
|
||||||
|
collision_layer = 6
|
||||||
|
collision_mask = 17
|
||||||
|
script = ExtResource("2_jq8f8")
|
||||||
|
DefaultSelectedItem = NodePath("Inventory/Sword")
|
||||||
|
Speed = 64.0
|
||||||
|
Sprite = NodePath("Sprites/Node2D/Character")
|
||||||
|
Inventory = NodePath("Inventory")
|
||||||
|
StateMachine = NodePath("StateMachine")
|
||||||
|
Hurtbox = NodePath("Hurtbox")
|
||||||
|
|
||||||
|
[node name="StateMachine" type="Node" parent="." node_paths=PackedStringArray("InitialState", "Character")]
|
||||||
|
script = ExtResource("3_n5adw")
|
||||||
|
InitialState = NodePath("Idle")
|
||||||
|
Character = NodePath("..")
|
||||||
|
|
||||||
|
[node name="Idle" type="Node" parent="StateMachine" node_paths=PackedStringArray("MoveState", "Character")]
|
||||||
|
script = ExtResource("4_g3et5")
|
||||||
|
MoveState = NodePath("../Move")
|
||||||
|
Character = NodePath("../..")
|
||||||
|
|
||||||
|
[node name="Move" type="Node" parent="StateMachine" node_paths=PackedStringArray("IdleState", "Character")]
|
||||||
|
script = ExtResource("5_1j55k")
|
||||||
|
IdleState = NodePath("../Idle")
|
||||||
|
Character = NodePath("../..")
|
||||||
|
|
||||||
|
[node name="Dash" type="Node" parent="StateMachine" node_paths=PackedStringArray("IdleState", "Character")]
|
||||||
|
script = ExtResource("6_4uva8")
|
||||||
|
IdleState = NodePath("../Idle")
|
||||||
|
TimeToDash = 0.1
|
||||||
|
VelocityModifier = 5.0
|
||||||
|
Character = NodePath("../..")
|
||||||
|
|
||||||
|
[node name="Roll" type="Node" parent="StateMachine" node_paths=PackedStringArray("IdleState", "Character")]
|
||||||
|
script = ExtResource("7_kdm1e")
|
||||||
|
IdleState = NodePath("../Idle")
|
||||||
|
Character = NodePath("../..")
|
||||||
|
|
||||||
|
[node name="Animations" type="Node" parent="."]
|
||||||
|
script = ExtResource("8_f33u2")
|
||||||
|
|
||||||
|
[node name="Movement" type="AnimationPlayer" parent="Animations"]
|
||||||
|
libraries = {
|
||||||
|
"": SubResource("AnimationLibrary_0tohi")
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Attack" type="AnimationPlayer" parent="Animations"]
|
||||||
|
libraries = {
|
||||||
|
"": SubResource("AnimationLibrary_73mj7")
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Hurt" type="AnimationPlayer" parent="Animations"]
|
||||||
|
root_node = NodePath("../..")
|
||||||
|
libraries = {
|
||||||
|
"": ExtResource("9_0ywmi")
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Stun" type="AnimationPlayer" parent="Animations"]
|
||||||
|
libraries = {
|
||||||
|
"": SubResource("AnimationLibrary_kks2p")
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="AnimationTree" type="AnimationTree" parent="Animations"]
|
||||||
|
tree_root = SubResource("AnimationNodeStateMachine_0ukul")
|
||||||
|
anim_player = NodePath("../Movement")
|
||||||
|
parameters/playback = SubResource("AnimationNodeStateMachinePlayback_jy6hr")
|
||||||
|
parameters/conditions/idle = false
|
||||||
|
parameters/conditions/move = false
|
||||||
|
parameters/conditions/roll = false
|
||||||
|
|
||||||
|
[node name="Effects" type="Node2D" parent="."]
|
||||||
|
|
||||||
|
[node name="HurtParticles" type="GPUParticles2D" parent="Effects"]
|
||||||
|
position = Vector2(0, -8)
|
||||||
|
emitting = false
|
||||||
|
process_material = ExtResource("10_hnmcd")
|
||||||
|
texture = ExtResource("11_6bslo")
|
||||||
|
lifetime = 0.4
|
||||||
|
one_shot = true
|
||||||
|
explosiveness = 1.0
|
||||||
|
|
||||||
|
[node name="DeathParticles" type="GPUParticles2D" parent="Effects"]
|
||||||
|
emitting = false
|
||||||
|
amount = 32
|
||||||
|
process_material = ExtResource("11_85w4a")
|
||||||
|
texture = SubResource("CanvasTexture_pited")
|
||||||
|
lifetime = 2.0
|
||||||
|
one_shot = true
|
||||||
|
preprocess = 0.1
|
||||||
|
explosiveness = 0.9
|
||||||
|
|
||||||
|
[node name="DeathCry" type="AudioStreamPlayer2D" parent="Effects"]
|
||||||
|
stream = ExtResource("13_bovud")
|
||||||
|
volume_db = 2.0
|
||||||
|
|
||||||
|
[node name="Footstep" type="AudioStreamPlayer2D" parent="Effects"]
|
||||||
|
stream = ExtResource("14_2ql70")
|
||||||
|
max_distance = 256.0
|
||||||
|
|
||||||
|
[node name="HurtSound" type="AudioStreamPlayer2D" parent="Effects"]
|
||||||
|
stream = ExtResource("21_8714l")
|
||||||
|
|
||||||
|
[node name="Sprites" type="Node2D" parent="."]
|
||||||
|
y_sort_enabled = true
|
||||||
|
use_parent_material = true
|
||||||
|
rotation = 6.28319
|
||||||
|
|
||||||
|
[node name="Node2D" type="Node2D" parent="Sprites"]
|
||||||
|
use_parent_material = true
|
||||||
|
|
||||||
|
[node name="Character" type="Sprite2D" parent="Sprites/Node2D"]
|
||||||
|
use_parent_material = true
|
||||||
|
position = Vector2(0, -8)
|
||||||
|
texture = ExtResource("16_lr46v")
|
||||||
|
offset = Vector2(0, -4)
|
||||||
|
hframes = 18
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
|
position = Vector2(0, -4)
|
||||||
|
shape = SubResource("RectangleShape2D_bfqew")
|
||||||
|
|
||||||
|
[node name="Inventory" type="Node2D" parent="."]
|
||||||
|
position = Vector2(0, -4)
|
||||||
|
script = ExtResource("17_q8tne")
|
||||||
|
InventoryMap = {
|
||||||
|
"equip_1": 0,
|
||||||
|
"equip_2": 1
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Sword" parent="Inventory" instance=ExtResource("18_dqppu")]
|
||||||
|
|
||||||
|
[node name="Hurtbox" parent="." instance=ExtResource("20_7qskd")]
|
||||||
|
visible = false
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" parent="Hurtbox" index="0"]
|
||||||
|
visible = false
|
||||||
|
position = Vector2(0, 4)
|
||||||
|
shape = SubResource("RectangleShape2D_cjk6b")
|
||||||
|
|
||||||
|
[node name="AudioListener2D" type="AudioListener2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
current = true
|
||||||
|
|
||||||
|
[editable path="Hurtbox"]
|
|
@ -0,0 +1,47 @@
|
||||||
|
[gd_scene load_steps=3 format=3 uid="uid://hm3ek8vqt1d4"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dwbrymm3ud5xu" path="res://Assets/Sprites/Props/bookshelf.png" id="1_cnrpk"]
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_wc4oe"]
|
||||||
|
size = Vector2(28, 8)
|
||||||
|
|
||||||
|
[node name="Bookshelf" type="StaticBody2D"]
|
||||||
|
y_sort_enabled = true
|
||||||
|
|
||||||
|
[node name="BottomLeft" type="Sprite2D" parent="."]
|
||||||
|
position = Vector2(-16, 0)
|
||||||
|
texture = ExtResource("1_cnrpk")
|
||||||
|
centered = false
|
||||||
|
offset = Vector2(0, -16)
|
||||||
|
hframes = 8
|
||||||
|
vframes = 2
|
||||||
|
frame = 8
|
||||||
|
|
||||||
|
[node name="BottomRight" type="Sprite2D" parent="."]
|
||||||
|
texture = ExtResource("1_cnrpk")
|
||||||
|
centered = false
|
||||||
|
offset = Vector2(0, -16)
|
||||||
|
hframes = 8
|
||||||
|
vframes = 2
|
||||||
|
frame = 9
|
||||||
|
|
||||||
|
[node name="TopLeft" type="Sprite2D" parent="."]
|
||||||
|
position = Vector2(-16, -16)
|
||||||
|
texture = ExtResource("1_cnrpk")
|
||||||
|
centered = false
|
||||||
|
offset = Vector2(0, -16)
|
||||||
|
hframes = 8
|
||||||
|
vframes = 2
|
||||||
|
|
||||||
|
[node name="TopRight" type="Sprite2D" parent="."]
|
||||||
|
position = Vector2(0, -16)
|
||||||
|
texture = ExtResource("1_cnrpk")
|
||||||
|
centered = false
|
||||||
|
offset = Vector2(0, -16)
|
||||||
|
hframes = 8
|
||||||
|
vframes = 2
|
||||||
|
frame = 1
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
|
position = Vector2(0, -4)
|
||||||
|
shape = SubResource("RectangleShape2D_wc4oe")
|
|
@ -0,0 +1,477 @@
|
||||||
|
[gd_resource type="TileSet" load_steps=4 format=3 uid="uid://l61kbx31ug4p"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://b0yiy7w8nxmas" path="res://Assets/Sprites/arena-tileset.png" id="1_kud44"]
|
||||||
|
|
||||||
|
[sub_resource type="CanvasTexture" id="CanvasTexture_3n6aa"]
|
||||||
|
diffuse_texture = ExtResource("1_kud44")
|
||||||
|
|
||||||
|
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_fcd6d"]
|
||||||
|
texture = SubResource("CanvasTexture_3n6aa")
|
||||||
|
0:0/0 = 0
|
||||||
|
0:0/0/terrain_set = 0
|
||||||
|
0:0/0/terrain = 0
|
||||||
|
0:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
0:0/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
0:0/0/terrains_peering_bit/right_side = 0
|
||||||
|
0:0/0/terrains_peering_bit/bottom_right_corner = 0
|
||||||
|
0:0/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
0:0/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
|
0:0/0/terrains_peering_bit/left_side = 0
|
||||||
|
0:0/0/terrains_peering_bit/top_left_corner = 0
|
||||||
|
0:0/0/terrains_peering_bit/top_side = 0
|
||||||
|
0:0/0/terrains_peering_bit/top_right_corner = 0
|
||||||
|
1:1/0 = 0
|
||||||
|
1:1/0/terrain_set = 0
|
||||||
|
1:1/0/terrain = 0
|
||||||
|
1:1/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
1:1/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
1:1/0/terrains_peering_bit/right_side = 0
|
||||||
|
1:1/0/terrains_peering_bit/bottom_right_corner = 0
|
||||||
|
1:1/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
1:1/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
|
1:1/0/terrains_peering_bit/left_side = 0
|
||||||
|
1:1/0/terrains_peering_bit/top_left_corner = 0
|
||||||
|
1:1/0/terrains_peering_bit/top_side = 0
|
||||||
|
1:1/0/terrains_peering_bit/top_right_corner = 0
|
||||||
|
2:1/0 = 0
|
||||||
|
2:1/0/terrain_set = 0
|
||||||
|
2:1/0/terrain = 1
|
||||||
|
2:1/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
2:1/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
2:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||||
|
2:1/0/terrains_peering_bit/right_side = 1
|
||||||
|
2:1/0/terrains_peering_bit/bottom_right_corner = 0
|
||||||
|
2:1/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
2:1/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
|
2:1/0/terrains_peering_bit/left_side = 1
|
||||||
|
2:1/0/terrains_peering_bit/top_left_corner = 1
|
||||||
|
2:1/0/terrains_peering_bit/top_side = 1
|
||||||
|
2:1/0/terrains_peering_bit/top_right_corner = 1
|
||||||
|
2:2/0 = 0
|
||||||
|
2:2/0/terrain_set = 0
|
||||||
|
2:2/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
2:2/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
2:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, 8, 0, 8, 8, -8, 8)
|
||||||
|
2:2/0/terrains_peering_bit/bottom_right_corner = 1
|
||||||
|
2:2/0/terrains_peering_bit/bottom_side = 1
|
||||||
|
2:2/0/terrains_peering_bit/bottom_left_corner = 1
|
||||||
|
1:0/0 = 0
|
||||||
|
1:0/0/terrain_set = 0
|
||||||
|
1:0/0/terrain = 0
|
||||||
|
1:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
1:0/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
1:0/0/terrains_peering_bit/right_side = 0
|
||||||
|
1:0/0/terrains_peering_bit/bottom_right_corner = 0
|
||||||
|
1:0/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
1:0/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
|
1:0/0/terrains_peering_bit/left_side = 0
|
||||||
|
1:0/0/terrains_peering_bit/top_left_corner = 0
|
||||||
|
1:0/0/terrains_peering_bit/top_side = 0
|
||||||
|
1:0/0/terrains_peering_bit/top_right_corner = 0
|
||||||
|
0:1/0 = 0
|
||||||
|
0:1/0/terrain_set = 0
|
||||||
|
0:1/0/terrain = 0
|
||||||
|
0:1/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
0:1/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
0:1/0/terrains_peering_bit/right_side = 0
|
||||||
|
0:1/0/terrains_peering_bit/bottom_right_corner = 0
|
||||||
|
0:1/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
0:1/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
|
0:1/0/terrains_peering_bit/left_side = 0
|
||||||
|
0:1/0/terrains_peering_bit/top_left_corner = 0
|
||||||
|
0:1/0/terrains_peering_bit/top_side = 0
|
||||||
|
0:1/0/terrains_peering_bit/top_right_corner = 0
|
||||||
|
0:2/0 = 0
|
||||||
|
0:2/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
0:2/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
0:3/0 = 0
|
||||||
|
0:3/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
0:3/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
1:3/0 = 0
|
||||||
|
1:3/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
1:3/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
1:2/0 = 0
|
||||||
|
1:2/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
1:2/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
2:0/0 = 0
|
||||||
|
2:0/0/terrain_set = 0
|
||||||
|
2:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
2:0/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
3:0/0 = 0
|
||||||
|
3:0/0/terrain_set = 0
|
||||||
|
3:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
3:0/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
4:0/0 = 0
|
||||||
|
4:0/0/terrain_set = 0
|
||||||
|
4:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
4:0/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
4:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||||
|
5:0/0 = 0
|
||||||
|
5:0/0/terrain_set = 0
|
||||||
|
5:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
5:0/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
5:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||||
|
6:0/0 = 0
|
||||||
|
6:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
6:0/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
6:1/0 = 0
|
||||||
|
6:1/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
6:1/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
6:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||||
|
5:1/0 = 0
|
||||||
|
5:1/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
5:1/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
5:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||||
|
4:1/0 = 0
|
||||||
|
4:1/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
4:1/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
4:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||||
|
3:1/0 = 0
|
||||||
|
3:1/0/terrain_set = 0
|
||||||
|
3:1/0/terrain = 1
|
||||||
|
3:1/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
3:1/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
3:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||||
|
3:1/0/terrains_peering_bit/right_side = 1
|
||||||
|
3:1/0/terrains_peering_bit/bottom_right_corner = 0
|
||||||
|
3:1/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
3:1/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
|
3:1/0/terrains_peering_bit/left_side = 1
|
||||||
|
3:1/0/terrains_peering_bit/top_left_corner = 1
|
||||||
|
3:1/0/terrains_peering_bit/top_side = 1
|
||||||
|
3:1/0/terrains_peering_bit/top_right_corner = 1
|
||||||
|
3:2/0 = 0
|
||||||
|
3:2/0/terrain_set = 0
|
||||||
|
3:2/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
3:2/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
3:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 0, -8, 0)
|
||||||
|
3:2/0/terrains_peering_bit/top_left_corner = 0
|
||||||
|
3:2/0/terrains_peering_bit/top_side = 0
|
||||||
|
3:2/0/terrains_peering_bit/top_right_corner = 0
|
||||||
|
3:3/0 = 0
|
||||||
|
3:3/0/terrain_set = 0
|
||||||
|
3:3/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
3:3/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
3:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(0, -8, 8, -8, 8, 8, 0, 8)
|
||||||
|
3:3/0/terrains_peering_bit/right_side = 0
|
||||||
|
3:3/0/terrains_peering_bit/bottom_right_corner = 0
|
||||||
|
3:3/0/terrains_peering_bit/top_right_corner = 1
|
||||||
|
2:3/0 = 0
|
||||||
|
2:3/0/terrain_set = 0
|
||||||
|
2:3/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
2:3/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
2:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 0, -8, 0, 8, -8, 8)
|
||||||
|
2:3/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
|
2:3/0/terrains_peering_bit/left_side = 0
|
||||||
|
2:3/0/terrains_peering_bit/top_left_corner = 1
|
||||||
|
4:3/0 = 0
|
||||||
|
4:3/0/terrain_set = 0
|
||||||
|
4:3/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
4:3/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
4:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(8, -8, 8, 0, 0, 0, 0, -8)
|
||||||
|
4:3/0/terrains_peering_bit/top_right_corner = 0
|
||||||
|
4:2/0 = 0
|
||||||
|
4:2/0/terrain_set = 0
|
||||||
|
4:2/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
4:2/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
4:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(0, 0, 8, 0, 8, 8, 0, 8)
|
||||||
|
4:2/0/terrains_peering_bit/bottom_right_corner = 1
|
||||||
|
5:2/0 = 0
|
||||||
|
5:2/0/terrain_set = 0
|
||||||
|
5:2/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
5:2/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
5:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, 0, 0, 0, 8, -8, 8)
|
||||||
|
5:2/0/terrains_peering_bit/bottom_left_corner = 1
|
||||||
|
5:3/0 = 0
|
||||||
|
5:3/0/terrain_set = 0
|
||||||
|
5:3/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
5:3/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
5:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 0, -8, 0, 0, -8, 0)
|
||||||
|
5:3/0/terrains_peering_bit/top_left_corner = 0
|
||||||
|
6:3/0 = 0
|
||||||
|
6:3/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
6:3/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
6:2/0 = 0
|
||||||
|
6:2/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
6:2/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
7:2/0 = 0
|
||||||
|
7:2/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
7:2/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
7:3/0 = 0
|
||||||
|
7:3/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
7:3/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
7:0/size_in_atlas = Vector2i(1, 2)
|
||||||
|
7:0/0 = 0
|
||||||
|
7:0/0/texture_origin = Vector2i(0, 8)
|
||||||
|
7:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
7:0/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
7:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -5, 8, -5, 8, 4, 4, 8, -4, 8, -8, 4)
|
||||||
|
0:4/0 = 0
|
||||||
|
0:4/0/terrain_set = 0
|
||||||
|
0:4/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
0:4/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
0:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||||
|
0:4/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
|
0:4/0/terrains_peering_bit/left_side = 0
|
||||||
|
0:4/0/terrains_peering_bit/top_left_corner = 0
|
||||||
|
0:4/0/terrains_peering_bit/top_side = 0
|
||||||
|
0:4/0/terrains_peering_bit/top_right_corner = 0
|
||||||
|
0:5/0 = 0
|
||||||
|
0:5/0/terrain_set = 0
|
||||||
|
0:5/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
0:5/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
0:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||||
|
0:5/0/terrains_peering_bit/bottom_right_corner = 1
|
||||||
|
0:5/0/terrains_peering_bit/bottom_side = 1
|
||||||
|
0:5/0/terrains_peering_bit/bottom_left_corner = 1
|
||||||
|
0:5/0/terrains_peering_bit/left_side = 0
|
||||||
|
0:5/0/terrains_peering_bit/top_left_corner = 0
|
||||||
|
1:5/0 = 0
|
||||||
|
1:5/0/terrain_set = 0
|
||||||
|
1:5/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
1:5/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
1:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||||
|
1:5/0/terrains_peering_bit/right_side = 0
|
||||||
|
1:5/0/terrains_peering_bit/bottom_right_corner = 1
|
||||||
|
1:5/0/terrains_peering_bit/bottom_side = 1
|
||||||
|
1:5/0/terrains_peering_bit/bottom_left_corner = 1
|
||||||
|
1:5/0/terrains_peering_bit/top_right_corner = 0
|
||||||
|
1:4/0 = 0
|
||||||
|
1:4/0/terrain_set = 0
|
||||||
|
1:4/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
1:4/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
1:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||||
|
1:4/0/terrains_peering_bit/right_side = 0
|
||||||
|
1:4/0/terrains_peering_bit/bottom_right_corner = 0
|
||||||
|
1:4/0/terrains_peering_bit/top_left_corner = 0
|
||||||
|
1:4/0/terrains_peering_bit/top_side = 0
|
||||||
|
1:4/0/terrains_peering_bit/top_right_corner = 0
|
||||||
|
2:4/size_in_atlas = Vector2i(1, 3)
|
||||||
|
2:4/0 = 0
|
||||||
|
2:4/0/texture_origin = Vector2i(0, 16)
|
||||||
|
2:4/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
2:4/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
3:4/size_in_atlas = Vector2i(2, 2)
|
||||||
|
3:4/0 = 0
|
||||||
|
3:4/0/texture_origin = Vector2i(8, 9)
|
||||||
|
3:4/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
3:4/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
5:4/size_in_atlas = Vector2i(2, 2)
|
||||||
|
5:4/0 = 0
|
||||||
|
5:4/0/texture_origin = Vector2i(8, 9)
|
||||||
|
5:4/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
5:4/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
7:4/size_in_atlas = Vector2i(1, 2)
|
||||||
|
7:4/0 = 0
|
||||||
|
7:4/0/texture_origin = Vector2i(0, 8)
|
||||||
|
7:4/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
7:4/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
3:6/0 = 0
|
||||||
|
3:6/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
3:6/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
3:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||||
|
4:6/0 = 0
|
||||||
|
4:6/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
4:6/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
4:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||||
|
4:7/0 = 0
|
||||||
|
4:7/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
4:7/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
4:7/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||||
|
3:7/0 = 0
|
||||||
|
3:7/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
3:7/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
3:7/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||||
|
10:1/0 = 0
|
||||||
|
10:1/0/terrain_set = 1
|
||||||
|
10:1/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
10:1/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
11:1/0 = 0
|
||||||
|
11:1/0/terrain_set = 1
|
||||||
|
11:1/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
11:1/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
11:2/0 = 0
|
||||||
|
11:2/0/terrain_set = 1
|
||||||
|
11:2/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
11:2/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
10:2/0 = 0
|
||||||
|
10:2/0/terrain_set = 1
|
||||||
|
10:2/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
10:2/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
8:1/0 = 0
|
||||||
|
8:1/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
8:1/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
8:2/0 = 0
|
||||||
|
8:2/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
8:2/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
9:1/0 = 0
|
||||||
|
9:1/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
9:1/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
9:2/0 = 0
|
||||||
|
9:2/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
9:2/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
9:5/0 = 0
|
||||||
|
9:5/0/terrain_set = 1
|
||||||
|
9:5/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
9:5/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
9:5/0/terrains_peering_bit/bottom_right_corner = 0
|
||||||
|
10:5/0 = 0
|
||||||
|
10:5/0/terrain_set = 1
|
||||||
|
10:5/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
10:5/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
10:5/0/terrains_peering_bit/bottom_right_corner = 0
|
||||||
|
10:5/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
10:5/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
|
11:5/0 = 0
|
||||||
|
11:5/0/terrain_set = 1
|
||||||
|
11:5/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
11:5/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
11:5/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
|
11:6/0 = 0
|
||||||
|
11:6/0/terrain_set = 1
|
||||||
|
11:6/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
11:6/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
11:6/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
|
11:6/0/terrains_peering_bit/left_side = 0
|
||||||
|
11:6/0/terrains_peering_bit/top_left_corner = 0
|
||||||
|
10:6/0 = 0
|
||||||
|
10:6/0/terrain_set = 1
|
||||||
|
10:6/0/terrain = 0
|
||||||
|
10:6/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
10:6/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
10:6/0/terrains_peering_bit/right_side = 0
|
||||||
|
10:6/0/terrains_peering_bit/bottom_right_corner = 0
|
||||||
|
10:6/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
10:6/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
|
10:6/0/terrains_peering_bit/left_side = 0
|
||||||
|
10:6/0/terrains_peering_bit/top_left_corner = 0
|
||||||
|
10:6/0/terrains_peering_bit/top_side = 0
|
||||||
|
10:6/0/terrains_peering_bit/top_right_corner = 0
|
||||||
|
9:6/0 = 0
|
||||||
|
9:6/0/terrain_set = 1
|
||||||
|
9:6/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
9:6/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
9:6/0/terrains_peering_bit/right_side = 0
|
||||||
|
9:6/0/terrains_peering_bit/bottom_right_corner = 0
|
||||||
|
9:6/0/terrains_peering_bit/top_right_corner = 0
|
||||||
|
9:7/0 = 0
|
||||||
|
9:7/0/terrain_set = 1
|
||||||
|
9:7/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
9:7/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
9:7/0/terrains_peering_bit/top_right_corner = 0
|
||||||
|
10:7/0 = 0
|
||||||
|
10:7/0/terrain_set = 1
|
||||||
|
10:7/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
10:7/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
10:7/0/terrains_peering_bit/top_left_corner = 0
|
||||||
|
10:7/0/terrains_peering_bit/top_side = 0
|
||||||
|
10:7/0/terrains_peering_bit/top_right_corner = 0
|
||||||
|
11:7/0 = 0
|
||||||
|
11:7/0/terrain_set = 1
|
||||||
|
11:7/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
11:7/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
11:7/0/terrains_peering_bit/top_left_corner = 0
|
||||||
|
12:5/0 = 0
|
||||||
|
12:5/0/terrain_set = 1
|
||||||
|
12:5/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
12:5/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
12:5/0/terrains_peering_bit/bottom_right_corner = 1
|
||||||
|
13:5/0 = 0
|
||||||
|
13:5/0/terrain_set = 1
|
||||||
|
13:5/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
13:5/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
13:5/0/terrains_peering_bit/bottom_right_corner = 1
|
||||||
|
13:5/0/terrains_peering_bit/bottom_side = 1
|
||||||
|
13:5/0/terrains_peering_bit/bottom_left_corner = 1
|
||||||
|
14:6/0 = 0
|
||||||
|
14:6/0/terrain_set = 1
|
||||||
|
14:6/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
14:6/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
14:6/0/terrains_peering_bit/bottom_left_corner = 1
|
||||||
|
14:6/0/terrains_peering_bit/left_side = 1
|
||||||
|
14:6/0/terrains_peering_bit/top_left_corner = 1
|
||||||
|
13:6/0 = 0
|
||||||
|
13:6/0/terrain_set = 1
|
||||||
|
13:6/0/terrain = 1
|
||||||
|
13:6/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
13:6/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
13:6/0/terrains_peering_bit/right_side = 1
|
||||||
|
13:6/0/terrains_peering_bit/bottom_right_corner = 1
|
||||||
|
13:6/0/terrains_peering_bit/bottom_side = 1
|
||||||
|
13:6/0/terrains_peering_bit/bottom_left_corner = 1
|
||||||
|
13:6/0/terrains_peering_bit/left_side = 1
|
||||||
|
13:6/0/terrains_peering_bit/top_left_corner = 1
|
||||||
|
13:6/0/terrains_peering_bit/top_side = 1
|
||||||
|
13:6/0/terrains_peering_bit/top_right_corner = 1
|
||||||
|
12:6/0 = 0
|
||||||
|
12:6/0/terrain_set = 1
|
||||||
|
12:6/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
12:6/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
12:6/0/terrains_peering_bit/right_side = 1
|
||||||
|
12:6/0/terrains_peering_bit/bottom_right_corner = 1
|
||||||
|
12:6/0/terrains_peering_bit/top_right_corner = 1
|
||||||
|
12:7/0 = 0
|
||||||
|
12:7/0/terrain_set = 1
|
||||||
|
12:7/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
12:7/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
12:7/0/terrains_peering_bit/top_right_corner = 1
|
||||||
|
13:7/0 = 0
|
||||||
|
13:7/0/terrain_set = 1
|
||||||
|
13:7/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
13:7/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
13:7/0/terrains_peering_bit/top_left_corner = 1
|
||||||
|
13:7/0/terrains_peering_bit/top_side = 1
|
||||||
|
13:7/0/terrains_peering_bit/top_right_corner = 1
|
||||||
|
14:7/0 = 0
|
||||||
|
14:7/0/terrain_set = 1
|
||||||
|
14:7/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
14:7/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
14:7/0/terrains_peering_bit/top_left_corner = 1
|
||||||
|
14:5/0 = 0
|
||||||
|
14:5/0/terrain_set = 1
|
||||||
|
14:5/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
14:5/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
14:5/0/terrains_peering_bit/bottom_left_corner = 1
|
||||||
|
5:7/0 = 0
|
||||||
|
5:7/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
5:7/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
5:7/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||||
|
5:6/0 = 0
|
||||||
|
5:6/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
5:6/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
5:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||||
|
6:6/0 = 0
|
||||||
|
6:6/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
6:6/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
6:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||||
|
6:7/0 = 0
|
||||||
|
6:7/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
6:7/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
6:7/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||||
|
7:7/0 = 0
|
||||||
|
7:7/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
7:7/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
7:7/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||||
|
8:7/0 = 0
|
||||||
|
8:7/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
8:7/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
8:7/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||||
|
8:6/0 = 0
|
||||||
|
8:6/0/physics_layer_0/linear_velocity = Vector2(0, 0)
|
||||||
|
8:6/0/physics_layer_0/angular_velocity = 0.0
|
||||||
|
8:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
occlusion_layer_0/light_mask = 1
|
||||||
|
physics_layer_0/collision_layer = 1
|
||||||
|
terrain_set_0/mode = 0
|
||||||
|
terrain_set_0/terrain_0/name = "floor"
|
||||||
|
terrain_set_0/terrain_0/color = Color(0.717647, 0, 0.262745, 1)
|
||||||
|
terrain_set_0/terrain_1/name = "wall"
|
||||||
|
terrain_set_0/terrain_1/color = Color(0, 0.74902, 0.498039, 1)
|
||||||
|
terrain_set_1/mode = 0
|
||||||
|
terrain_set_1/terrain_0/name = "carpet"
|
||||||
|
terrain_set_1/terrain_0/color = Color(0.5, 0.34375, 0.25, 1)
|
||||||
|
terrain_set_1/terrain_1/name = "carpet vertical"
|
||||||
|
terrain_set_1/terrain_1/color = Color(0.5, 0.4375, 0.25, 1)
|
||||||
|
sources/0 = SubResource("TileSetAtlasSource_fcd6d")
|
|
@ -0,0 +1,109 @@
|
||||||
|
/*
|
||||||
|
Shader from Godot Shaders - the free shader library.
|
||||||
|
godotshaders.com/shader/god-rays
|
||||||
|
|
||||||
|
Feel free to use, improve and change this shader according to your needs
|
||||||
|
and consider sharing the modified result on godotshaders.com.
|
||||||
|
*/
|
||||||
|
|
||||||
|
shader_type canvas_item;
|
||||||
|
|
||||||
|
uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap;
|
||||||
|
|
||||||
|
uniform float angle : hint_range(-5, 5) = -0.3;
|
||||||
|
uniform float position = -0.2;
|
||||||
|
uniform float spread : hint_range(0.0, 1.0) = 0.5;
|
||||||
|
uniform float cutoff : hint_range(-1.0, 1.0) = 0.1;
|
||||||
|
uniform float falloff : hint_range(0.0, 1.0) = 0.2;
|
||||||
|
uniform float edge_fade : hint_range(0.0, 1.0) = 0.15;
|
||||||
|
|
||||||
|
uniform float speed = 1.0;
|
||||||
|
uniform float ray1_density = 8.0;
|
||||||
|
uniform float ray2_density = 30.0;
|
||||||
|
uniform float ray2_intensity : hint_range(0.0, 1.0) = 0.3;
|
||||||
|
|
||||||
|
uniform vec4 color : source_color = vec4(1.0, 0.9, 0.65, 0.8);
|
||||||
|
|
||||||
|
uniform bool hdr = false;
|
||||||
|
uniform float seed = 5.0;
|
||||||
|
|
||||||
|
// Random and noise functions from Book of Shader's chapter on Noise.
|
||||||
|
float random(vec2 _uv) {
|
||||||
|
return fract(sin(dot(_uv.xy,
|
||||||
|
vec2(12.9898, 78.233))) *
|
||||||
|
43758.5453123);
|
||||||
|
}
|
||||||
|
|
||||||
|
float noise (in vec2 uv) {
|
||||||
|
vec2 i = floor(uv);
|
||||||
|
vec2 f = fract(uv);
|
||||||
|
|
||||||
|
// Four corners in 2D of a tile
|
||||||
|
float a = random(i);
|
||||||
|
float b = random(i + vec2(1.0, 0.0));
|
||||||
|
float c = random(i + vec2(0.0, 1.0));
|
||||||
|
float d = random(i + vec2(1.0, 1.0));
|
||||||
|
|
||||||
|
|
||||||
|
// Smooth Interpolation
|
||||||
|
|
||||||
|
// Cubic Hermine Curve. Same as SmoothStep()
|
||||||
|
vec2 u = f * f * (3.0-2.0 * f);
|
||||||
|
|
||||||
|
// Mix 4 coorners percentages
|
||||||
|
return mix(a, b, u.x) +
|
||||||
|
(c - a)* u.y * (1.0 - u.x) +
|
||||||
|
(d - b) * u.x * u.y;
|
||||||
|
}
|
||||||
|
|
||||||
|
mat2 rotate(float _angle){
|
||||||
|
return mat2(vec2(cos(_angle), -sin(_angle)),
|
||||||
|
vec2(sin(_angle), cos(_angle)));
|
||||||
|
}
|
||||||
|
|
||||||
|
vec4 screen(vec4 base, vec4 blend){
|
||||||
|
return 1.0 - (1.0 - base) * (1.0 - blend);
|
||||||
|
}
|
||||||
|
|
||||||
|
void fragment()
|
||||||
|
{
|
||||||
|
|
||||||
|
// Rotate, skew and move the UVs
|
||||||
|
vec2 transformed_uv = ( rotate(angle) * (UV - position) ) / ( (UV.y + spread) - (UV.y * spread) );
|
||||||
|
|
||||||
|
// Animate the ray according the the new transformed UVs
|
||||||
|
vec2 ray1 = vec2(transformed_uv.x * ray1_density + sin(TIME * 0.1 * speed) * (ray1_density * 0.2) + seed, 1.0);
|
||||||
|
vec2 ray2 = vec2(transformed_uv.x * ray2_density + sin(TIME * 0.2 * speed) * (ray1_density * 0.2) + seed, 1.0);
|
||||||
|
|
||||||
|
// Cut off the ray's edges
|
||||||
|
float cut = step(cutoff, transformed_uv.x) * step(cutoff, 1.0 - transformed_uv.x);
|
||||||
|
ray1 *= cut;
|
||||||
|
ray2 *= cut;
|
||||||
|
|
||||||
|
// Apply the noise pattern (i.e. create the rays)
|
||||||
|
float rays;
|
||||||
|
|
||||||
|
if (hdr){
|
||||||
|
// This is not really HDR, but check this to not clamp the two merged rays making
|
||||||
|
// their values go over 1.0. Can make for some nice effect
|
||||||
|
rays = noise(ray1) + (noise(ray2) * ray2_intensity);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
rays = clamp(noise(ray1) + (noise(ray2) * ray2_intensity), 0., 1.);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fade out edges
|
||||||
|
rays *= smoothstep(0.0, falloff, (1.0 - UV.y)); // Bottom
|
||||||
|
rays *= smoothstep(0.0 + cutoff, edge_fade + cutoff, transformed_uv.x); // Left
|
||||||
|
rays *= smoothstep(0.0 + cutoff, edge_fade + cutoff, 1.0 - transformed_uv.x); // Right
|
||||||
|
|
||||||
|
// Color to the rays
|
||||||
|
vec3 shine = vec3(rays) * color.rgb;
|
||||||
|
|
||||||
|
// Try different blending modes for a nicer effect. "Screen" is included in the code,
|
||||||
|
// but take a look at https://godotshaders.com/snippet/blending-modes/ for more.
|
||||||
|
// With "Screen" blend mode:
|
||||||
|
shine = screen(texture(SCREEN_TEXTURE, SCREEN_UV), vec4(color)).rgb;
|
||||||
|
|
||||||
|
COLOR = vec4(shine, rays * color.a);
|
||||||
|
}
|