mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-09 04:25:54 +00:00
Cheat Gun
This commit is contained in:
parent
f2e6025b35
commit
cb27f33a6d
21 changed files with 620 additions and 436 deletions
|
|
@ -17,6 +17,8 @@ public partial class Barrel : Area2D, IDestructible
|
|||
[Export] public PackedScene ExplosionParticles { get; set; }
|
||||
[Export] public BulletResource ExplosionData { get; set; }
|
||||
|
||||
[Export] public BulletOwner BulletGroup { get; set; } = BulletOwner.None;
|
||||
|
||||
private GameManager _gameManager;
|
||||
|
||||
private float _currentHealth = 0f;
|
||||
|
|
|
|||
|
|
@ -48,10 +48,10 @@ func smooth_damp(current: float, target: float, current_velocity: float, smooth_
|
|||
return [output, current_velocity]
|
||||
|
||||
func _unhandled_input(_event: InputEvent) -> void:
|
||||
if Input.is_key_pressed(KEY_1):
|
||||
if Input.is_action_just_pressed("debug_camera_1"):
|
||||
pixel_snap = not pixel_snap
|
||||
print("Camera pixel snap: ", pixel_snap)
|
||||
if Input.is_key_pressed(KEY_2):
|
||||
if Input.is_action_just_pressed("debug_camera_2"):
|
||||
enable_smoothing = not enable_smoothing
|
||||
print("Camera smoothing: ", enable_smoothing)
|
||||
|
||||
|
|
|
|||
7
Scenes/HUD/Items/ying_yang_gun_huditem.tscn
Normal file
7
Scenes/HUD/Items/ying_yang_gun_huditem.tscn
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://pemr2lrv3ylk"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://61kfxc7k3do" path="res://Sprites/Items/Ying_Yang_Gun.png" id="1_l8amd"]
|
||||
|
||||
[node name="YingYangGun" type="TextureRect"]
|
||||
texture = ExtResource("1_l8amd")
|
||||
stretch_mode = 2
|
||||
19
Scenes/Items/Cheat_Gun_Pickup.tscn
Normal file
19
Scenes/Items/Cheat_Gun_Pickup.tscn
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://4q82gggqax87"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Interactables/ItemPickup.cs" id="1_vx8ix"]
|
||||
[ext_resource type="Resource" uid="uid://cfq121rs3bsu8" path="res://Resources/Items/Cheat_Gun_Item.tres" id="2_si1ac"]
|
||||
[ext_resource type="Texture2D" uid="uid://61kfxc7k3do" path="res://Sprites/Items/Ying_Yang_Gun.png" id="4_pj6iu"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_jtwy2"]
|
||||
|
||||
[node name="CheaetGun" type="Area2D" groups=["Interactable"]]
|
||||
collision_layer = 4
|
||||
collision_mask = 2
|
||||
script = ExtResource("1_vx8ix")
|
||||
LootTable = [ExtResource("2_si1ac")]
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture = ExtResource("4_pj6iu")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CircleShape2D_jtwy2")
|
||||
19
Scenes/Items/Ice_Shotgun_Pickup.tscn
Normal file
19
Scenes/Items/Ice_Shotgun_Pickup.tscn
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://ddwcib46ttlrp"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Interactables/ItemPickup.cs" id="1_gpoff"]
|
||||
[ext_resource type="Resource" uid="uid://dau0s8ob7qnpc" path="res://Resources/Items/IceShotgun.tres" id="2_l5f4t"]
|
||||
[ext_resource type="Texture2D" uid="uid://b46usr10jhmev" path="res://Sprites/Items/Ice_Shotgun.png" id="3_w7kfy"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_jtwy2"]
|
||||
|
||||
[node name="IceShotgun" type="Area2D" groups=["Interactable"]]
|
||||
collision_layer = 4
|
||||
collision_mask = 2
|
||||
script = ExtResource("1_gpoff")
|
||||
LootTable = [ExtResource("2_l5f4t")]
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture = ExtResource("3_w7kfy")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CircleShape2D_jtwy2")
|
||||
|
|
@ -6,7 +6,9 @@
|
|||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_jtwy2"]
|
||||
|
||||
[node name="IcicleGun" type="Area2D"]
|
||||
[node name="IcicleGun" type="Area2D" groups=["Interactable"]]
|
||||
collision_layer = 4
|
||||
collision_mask = 2
|
||||
script = ExtResource("1_rdvi1")
|
||||
LootTable = [ExtResource("2_6qt07")]
|
||||
|
||||
|
|
|
|||
|
|
@ -7,11 +7,10 @@
|
|||
radius = 4.0
|
||||
|
||||
[node name="Bullet" type="Area2D" groups=["bullets"]]
|
||||
collision_layer = 128
|
||||
collision_mask = 71
|
||||
collision_layer = 136
|
||||
collision_mask = 87
|
||||
script = ExtResource("1_w5w28")
|
||||
Speed = 200.0
|
||||
Owner = 2
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ collision_layer = 8
|
|||
collision_mask = 85
|
||||
script = ExtResource("1_jvxw3")
|
||||
Speed = 200.0
|
||||
Owner = 1
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue