Rollback place brick feature

This commit is contained in:
2024-08-08 23:23:31 +08:00
parent e5be2bdc7c
commit b5819a249c
9 changed files with 127 additions and 27 deletions

28
Scenes/Brick.tscn Normal file
View File

@ -0,0 +1,28 @@
[gd_scene load_steps=4 format=3 uid="uid://nu34biv4xo5k"]
[ext_resource type="Texture2D" uid="uid://c2qpm7mcrvq57" path="res://Sprites/Brick.png" id="1_tqbee"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_5wmf4"]
size = Vector2(51.2, 51.2)
[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_r3565"]
properties/0/path = NodePath(".:position")
properties/0/spawn = true
properties/0/replication_mode = 1
[node name="Brick" type="StaticBody2D"]
[node name="Sprite2D" type="Sprite2D" parent="."]
position = Vector2(2.08165e-12, 2.08165e-12)
scale = Vector2(0.05, 0.05)
texture = ExtResource("1_tqbee")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("RectangleShape2D_5wmf4")
[node name="DecayTimer" type="Timer" parent="."]
one_shot = true
autostart = true
[node name="MultiplayerSynchronizer" type="MultiplayerSynchronizer" parent="."]
replication_config = SubResource("SceneReplicationConfig_r3565")

View File

@ -1,8 +1,9 @@
[gd_scene load_steps=10 format=3 uid="uid://b3gx0bl43lku3"]
[gd_scene load_steps=11 format=3 uid="uid://b3gx0bl43lku3"]
[ext_resource type="Script" path="res://Scripts/Player.cs" id="1_0btyt"]
[ext_resource type="Texture2D" uid="uid://c4als6t3k4myc" path="res://Sprites/Player.png" id="1_cqpqa"]
[ext_resource type="PackedScene" uid="uid://ds40mib6ur8yf" path="res://Scenes/Bullet.tscn" id="2_nmop0"]
[ext_resource type="PackedScene" uid="uid://nu34biv4xo5k" path="res://Scenes/Brick.tscn" id="3_6sbto"]
[ext_resource type="Script" path="res://Scripts/Logic/PlayerInput.cs" id="3_tvoua"]
[ext_resource type="Script" path="res://Scripts/Effects/CameraShake.cs" id="4_fwngj"]
@ -56,6 +57,8 @@ script = ExtResource("1_0btyt")
PlayerCamera = NodePath("Camera2D")
PlayerInput = NodePath("InputSynchronizer")
BulletScene = ExtResource("2_nmop0")
TileScene = ExtResource("3_6sbto")
TileSize = 50.0
[node name="Overlay" type="VBoxContainer" parent="."]
offset_left = -90.0

View File

@ -25,6 +25,6 @@ World = NodePath("../../World")
script = ExtResource("3_xwguj")
PlayerScene = ExtResource("1_vby0g")
[node name="PlayerSpawner" type="MultiplayerSpawner" parent="."]
_spawnable_scenes = PackedStringArray("res://Scenes/Player.tscn")
[node name="WorldSpawner" type="MultiplayerSpawner" parent="."]
_spawnable_scenes = PackedStringArray("res://Scenes/Player.tscn", "res://Scenes/Brick.tscn")
spawn_path = NodePath("../World")

View File

@ -1,7 +1,13 @@
[gd_scene load_steps=2 format=3 uid="uid://c7w5sgq0bshk0"]
[gd_scene load_steps=4 format=3 uid="uid://c7w5sgq0bshk0"]
[ext_resource type="Script" path="res://Scripts/UI/HUD.cs" id="1_2iqqk"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_bl2bd"]
bg_color = Color(0.243137, 0.243137, 0.243137, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_it2a4"]
bg_color = Color(0.545098, 0.545098, 0.545098, 1)
[node name="Hud" type="Control"]
layout_mode = 3
anchors_preset = 15
@ -72,3 +78,20 @@ rounded = true
allow_greater = true
allow_lesser = true
show_percentage = false
[node name="BottomBox" type="VBoxContainer" parent="."]
layout_mode = 0
offset_top = 608.0
offset_right = 1152.0
offset_bottom = 648.0
alignment = 2
[node name="ProgressBar" type="ProgressBar" parent="BottomBox"]
custom_minimum_size = Vector2(2.08165e-12, 4)
layout_mode = 2
theme_override_styles/background = SubResource("StyleBoxFlat_bl2bd")
theme_override_styles/fill = SubResource("StyleBoxFlat_it2a4")
value = 50.0
allow_greater = true
allow_lesser = true
show_percentage = false