This commit is contained in:
Sagi Dayan 2020-11-28 13:19:54 -05:00
parent d73393a6d2
commit e09bc4c02e
5 changed files with 130 additions and 25 deletions

View file

@ -233,9 +233,9 @@ points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
0/z_index = 0 0/z_index = 0
[node name="SolidsTileMap" type="TileMap"] [node name="SolidsTileMap" type="TileMap"]
light_mask = 8
tile_set = SubResource( 35 ) tile_set = SubResource( 35 )
cell_size = Vector2( 16, 16 ) cell_size = Vector2( 16, 16 )
collision_layer = 9 collision_layer = 9
collision_mask = 0 collision_mask = 0
occluder_light_mask = 8
format = 1 format = 1

View file

@ -23,7 +23,9 @@ var _level_resources := {
var _levels = [ var _levels = [
[_level_resources.pre_game, _level_resources.zones[1][0], _level_resources.zones[1][1]], [_level_resources.pre_game, _level_resources.zones[1][0], _level_resources.zones[1][1]],
] ]
# var _levels = [
# [_level_resources.zones[1][1]],
# ]
export var _current_zone_level: = Vector2(0,0) export var _current_zone_level: = Vector2(0,0)

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=11 format=2] [gd_scene load_steps=15 format=2]
[ext_resource path="res://src/GameWorld/Levels/Area1/Area12.gd" type="Script" id=1] [ext_resource path="res://src/GameWorld/Levels/Area1/Area12.gd" type="Script" id=1]
[ext_resource path="res://assets/Items/torch_ligt_texture.png" type="Texture" id=2] [ext_resource path="res://assets/Items/torch_ligt_texture.png" type="Texture" id=2]
@ -10,33 +10,89 @@
[ext_resource path="res://assets/Levels/Test/bg_0.png" type="Texture" id=12] [ext_resource path="res://assets/Levels/Test/bg_0.png" type="Texture" id=12]
[ext_resource path="res://assets/Tiles/FakeSolidsTileMap.tscn" type="PackedScene" id=19] [ext_resource path="res://assets/Tiles/FakeSolidsTileMap.tscn" type="PackedScene" id=19]
[sub_resource type="Animation" id=1] [sub_resource type="Animation" id=2]
resource_name = "idle" resource_name = "idle"
length = 10.0 length = 10.0
loop = true loop = true
tracks/0/type = "value" tracks/0/type = "value"
tracks/0/path = NodePath("Light2D:energy") tracks/0/path = NodePath(".:position")
tracks/0/interp = 1 tracks/0/interp = 1
tracks/0/loop_wrap = true tracks/0/loop_wrap = true
tracks/0/imported = false tracks/0/imported = false
tracks/0/enabled = true tracks/0/enabled = true
tracks/0/keys = { tracks/0/keys = {
"times": PoolRealArray( 0, 5 ), "times": PoolRealArray( 0, 2.1, 4.1, 4.9, 5.1, 7.3, 8.6 ),
"transitions": PoolRealArray( 1, 1 ), "transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1 ),
"update": 0, "update": 0,
"values": [ 1.69, 1.07 ] "values": [ Vector2( -64.5, 30.75 ), Vector2( -50, 22.5 ), Vector2( -43.25, 29 ), Vector2( -36.5, 29.75 ), Vector2( -35.25, 16 ), Vector2( -50.75, 20.75 ), Vector2( -83.75, 22 ) ]
} }
tracks/1/type = "value"
tracks/1/path = NodePath("Light2D:position") [sub_resource type="Animation" id=3]
tracks/1/interp = 1 resource_name = "idle"
tracks/1/loop_wrap = true length = 10.0
tracks/1/imported = false loop = true
tracks/1/enabled = true tracks/0/type = "value"
tracks/1/keys = { tracks/0/path = NodePath(".:position")
"times": PoolRealArray( 0, 5 ), tracks/0/interp = 1
"transitions": PoolRealArray( 1, 1 ), tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0.5, 1.4, 2.5, 3.9, 5.4, 7.1, 9 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1 ),
"update": 0, "update": 0,
"values": [ Vector2( -27.75, 25 ), Vector2( -44.5, 26.5 ) ] "values": [ Vector2( -50.75, 20.75 ), Vector2( -35.25, 16 ), Vector2( -64.5, 30.75 ), Vector2( -43.25, 29 ), Vector2( -36.5, 29.75 ), Vector2( -50, 22.5 ), Vector2( -83.75, 22 ) ]
}
[sub_resource type="Animation" id=4]
resource_name = "idle"
length = 10.0
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath(".:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 1.2, 2.9, 4.6, 4.9, 6.9, 8.3 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1 ),
"update": 0,
"values": [ Vector2( -64.5, 30.75 ), Vector2( -43.25, 29 ), Vector2( -50, 22.5 ), Vector2( -35.25, 16 ), Vector2( -36.5, 29.75 ), Vector2( -83.75, 22 ), Vector2( -50.75, 20.75 ) ]
}
[sub_resource type="Animation" id=5]
resource_name = "idle"
length = 10.0
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath(".:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 2.1, 4.1, 4.9, 5.1, 7.3, 8.6 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1 ),
"update": 0,
"values": [ Vector2( -64.5, 30.75 ), Vector2( -50, 22.5 ), Vector2( -43.25, 29 ), Vector2( -36.5, 29.75 ), Vector2( -35.25, 16 ), Vector2( -50.75, 20.75 ), Vector2( -83.75, 22 ) ]
}
[sub_resource type="Animation" id=6]
resource_name = "idle"
length = 10.0
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath(".:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 2.1, 4.1, 4.9, 5.1, 7.3, 8.6 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1 ),
"update": 0,
"values": [ Vector2( -64.5, 30.75 ), Vector2( -50, 22.5 ), Vector2( -43.25, 29 ), Vector2( -36.5, 29.75 ), Vector2( -35.25, 16 ), Vector2( -50.75, 20.75 ), Vector2( -83.75, 22 ) ]
} }
[node name="Area12" type="Node2D"] [node name="Area12" type="Node2D"]
@ -63,16 +119,61 @@ scale = Vector2( 2, 2 )
texture = ExtResource( 12 ) texture = ExtResource( 12 )
[node name="Light2D" type="Light2D" parent="BG/Sprite"] [node name="Light2D" type="Light2D" parent="BG/Sprite"]
position = Vector2( -29.425, 25.15 ) position = Vector2( -83.75, 22 )
texture = ExtResource( 2 ) texture = ExtResource( 2 )
texture_scale = 5.0 texture_scale = 0.05
color = Color( 0.227451, 0.419608, 1, 1 ) energy = 5.0
energy = 1.628
range_item_cull_mask = 2048 range_item_cull_mask = 2048
[node name="AnimationPlayer" type="AnimationPlayer" parent="BG/Sprite"] [node name="AnimationPlayer" type="AnimationPlayer" parent="BG/Sprite/Light2D"]
autoplay = "idle" autoplay = "idle"
anims/idle = SubResource( 1 ) anims/idle = SubResource( 2 )
[node name="Light2D2" type="Light2D" parent="BG/Sprite"]
position = Vector2( -83.75, 22 )
texture = ExtResource( 2 )
texture_scale = 0.05
energy = 5.0
range_item_cull_mask = 2048
[node name="AnimationPlayer" type="AnimationPlayer" parent="BG/Sprite/Light2D2"]
autoplay = "idle"
anims/idle = SubResource( 3 )
[node name="Light2D3" type="Light2D" parent="BG/Sprite"]
position = Vector2( -53.1765, 22.5147 )
texture = ExtResource( 2 )
texture_scale = 0.05
energy = 5.0
range_item_cull_mask = 2048
[node name="AnimationPlayer" type="AnimationPlayer" parent="BG/Sprite/Light2D3"]
autoplay = "idle"
anims/idle = SubResource( 4 )
[node name="Light2D4" type="Light2D" parent="BG/Sprite"]
visible = false
position = Vector2( -83.75, 22 )
texture = ExtResource( 2 )
texture_scale = 0.05
energy = 5.0
range_item_cull_mask = 2048
[node name="AnimationPlayer" type="AnimationPlayer" parent="BG/Sprite/Light2D4"]
autoplay = "idle"
anims/idle = SubResource( 5 )
[node name="Light2D5" type="Light2D" parent="BG/Sprite"]
visible = false
position = Vector2( -83.75, 22 )
texture = ExtResource( 2 )
texture_scale = 0.05
energy = 5.0
range_item_cull_mask = 2048
[node name="AnimationPlayer" type="AnimationPlayer" parent="BG/Sprite/Light2D5"]
autoplay = "idle"
anims/idle = SubResource( 6 )
[node name="Sprite2" type="Sprite" parent="BG"] [node name="Sprite2" type="Sprite" parent="BG"]
modulate = Color( 0.266667, 0.360784, 0.411765, 1 ) modulate = Color( 0.266667, 0.360784, 0.411765, 1 )

View file

@ -82,7 +82,7 @@ tracks/0/keys = {
light_mask = 8 light_mask = 8
position = Vector2( 0, -12 ) position = Vector2( 0, -12 )
frames = SubResource( 13 ) frames = SubResource( 13 )
frame = 11 frame = 3
playing = true playing = true
[node name="Light2D" type="Light2D" parent="AnimatedSprite"] [node name="Light2D" type="Light2D" parent="AnimatedSprite"]

View file

@ -3,11 +3,13 @@
[ext_resource path="res://src/Singletons/Stage.gd" type="Script" id=1] [ext_resource path="res://src/Singletons/Stage.gd" type="Script" id=1]
[node name="Stage" type="CanvasLayer"] [node name="Stage" type="CanvasLayer"]
layer = 0
script = ExtResource( 1 ) script = ExtResource( 1 )
[node name="Tween" type="Tween" parent="."] [node name="Tween" type="Tween" parent="."]
[node name="ColorRect" type="ColorRect" parent="."] [node name="ColorRect" type="ColorRect" parent="."]
light_mask = 8
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
color = Color( 0, 0, 0, 1 ) color = Color( 0, 0, 0, 1 )