Виртуальный курсор (для управления с геймпада)
This commit is contained in:
parent
d42bd00c3d
commit
bbb66a5273
12 changed files with 135 additions and 8 deletions
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=23 format=3 uid="uid://dhn7yt46fyac8"]
|
||||
[gd_scene load_steps=24 format=3 uid="uid://dhn7yt46fyac8"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://bhulqhxesd5gc" path="res://prefabs/player.tscn" id="1_65a7v"]
|
||||
[ext_resource type="AudioStream" uid="uid://bsy2d0bl3lgg0" path="res://sounds/crank.ogg" id="1_cweq4"]
|
||||
|
@ -11,6 +11,7 @@
|
|||
[ext_resource type="PackedScene" uid="uid://cn0rwyjern2vx" path="res://scenes/level.tscn" id="5_skctj"]
|
||||
[ext_resource type="Script" path="res://scripts/GameCamera.cs" id="6_quua3"]
|
||||
[ext_resource type="Script" path="res://scripts/PointLight2DWorkaround.cs" id="6_slohe"]
|
||||
[ext_resource type="PackedScene" uid="uid://4d6fhm87mn55" path="res://prefabs/virtual_cursor.tscn" id="11_xqdcm"]
|
||||
[ext_resource type="Script" path="res://scripts/WinScreen.cs" id="13_prax6"]
|
||||
[ext_resource type="Theme" uid="uid://daxgxg7c8v0ih" path="res://themes/zx_theme.tres" id="14_g1c0r"]
|
||||
[ext_resource type="Script" path="res://scripts/DeathScreen.cs" id="15_12mhe"]
|
||||
|
@ -22,7 +23,7 @@ point_count = 2
|
|||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_m680d"]
|
||||
shader = ExtResource("5_64d71")
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_kr1ga"]
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_meb87"]
|
||||
viewport_path = NodePath("FlashlightViewport")
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_prnh4"]
|
||||
|
@ -46,6 +47,9 @@ height = 192
|
|||
[node name="Root" type="Node2D"]
|
||||
y_sort_enabled = true
|
||||
|
||||
[node name="VirtualCursor" parent="." instance=ExtResource("11_xqdcm")]
|
||||
position = Vector2(169.203, 958.57)
|
||||
|
||||
[node name="GameManager" type="Node" parent="." node_paths=PackedStringArray("FirstZone", "Player")]
|
||||
script = ExtResource("1_ij566")
|
||||
FirstZone = NodePath("../Zones/PlayZone1")
|
||||
|
@ -235,15 +239,16 @@ texture = ExtResource("3_8o315")
|
|||
[node name="Triangle" type="Polygon2D" parent="FlashlightViewport/CanvasGroup"]
|
||||
polygon = PackedVector2Array(-21, -25, 31, 29, -42, 31)
|
||||
|
||||
[node name="PlayerCamera" type="Camera2D" parent="." node_paths=PackedStringArray("Player")]
|
||||
[node name="PlayerCamera" type="Camera2D" parent="." node_paths=PackedStringArray("Player", "Cursor")]
|
||||
script = ExtResource("6_quua3")
|
||||
Player = NodePath("../Player")
|
||||
CameraBounds = Vector2(30, 20)
|
||||
Cursor = NodePath("../VirtualCursor")
|
||||
|
||||
[node name="PointLight2D" type="PointLight2D" parent="PlayerCamera" node_paths=PackedStringArray("LightViewport")]
|
||||
blend_mode = 2
|
||||
range_item_cull_mask = 2
|
||||
texture = SubResource("ViewportTexture_kr1ga")
|
||||
texture = SubResource("ViewportTexture_meb87")
|
||||
script = ExtResource("6_slohe")
|
||||
LightViewport = NodePath("../../FlashlightViewport")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue