Flashlight and basic character controls

This commit is contained in:
Иван Кузьменко 2023-08-14 23:46:21 +03:00
parent 70d322e276
commit 3832a05c1b
16 changed files with 258 additions and 4 deletions

View file

@ -1,5 +1,49 @@
[gd_scene format=3 uid="uid://dhn7yt46fyac8"]
[gd_scene load_steps=6 format=3 uid="uid://dhn7yt46fyac8"]
[ext_resource type="PackedScene" uid="uid://bhulqhxesd5gc" path="res://prefabs/player.tscn" id="1_65a7v"]
[ext_resource type="Texture2D" uid="uid://py6qiu3rm7cu" path="res://sprites/brickwall.png" id="2_edqdh"]
[ext_resource type="Texture2D" uid="uid://dlbl6d4yghvht" path="res://sprites/mask.png" id="3_8o315"]
[ext_resource type="Material" uid="uid://xuvxq5hy1dt" path="res://shaders/light_shader_material.tres" id="4_ro05e"]
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_wg1ao"]
light_mode = 2
[node name="Root" type="Node2D"]
[node name="DarkCamera2D" type="Camera2D" parent="."]
[node name="Player" parent="." node_paths=PackedStringArray("FlashlightUI", "FlashlightWorld") instance=ExtResource("1_65a7v")]
position = Vector2(19, 4)
FlashlightUI = NodePath("../CanvasLayer/FlashlightUI")
FlashlightWorld = NodePath("../Camera2D/PointLight2D")
[node name="TestWall" type="Sprite2D" parent="."]
light_mask = 2
material = SubResource("CanvasItemMaterial_wg1ao")
position = Vector2(-108, -74)
texture = ExtResource("2_edqdh")
[node name="CanvasLayer" type="CanvasLayer" parent="."]
[node name="FlashlightUI" type="Sprite2D" parent="CanvasLayer"]
clip_children = 1
texture = ExtResource("3_8o315")
[node name="InvertRect" type="ColorRect" parent="CanvasLayer/FlashlightUI"]
material = ExtResource("4_ro05e")
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -32.0
offset_top = -32.0
offset_right = -32.0
offset_bottom = -32.0
grow_horizontal = 2
grow_vertical = 2
metadata/_edit_use_anchors_ = true
[node name="Camera2D" type="Camera2D" parent="."]
[node name="PointLight2D" type="PointLight2D" parent="Camera2D"]
energy = 16.0
blend_mode = 2
range_item_cull_mask = 2
texture = ExtResource("3_8o315")