mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-03 16:35:53 +00:00
Cheat Gun
This commit is contained in:
parent
f2e6025b35
commit
cb27f33a6d
21 changed files with 620 additions and 436 deletions
|
|
@ -59,8 +59,8 @@ public partial class PlayerMovement : CharacterBody2D, IDestructible
|
|||
|
||||
private InventoryManager _inventoryManager;
|
||||
|
||||
[Export] public Sprite2D HitboxSprite { get; set; }
|
||||
|
||||
[Export] public Sprite2D HitboxSprite { get; set; }
|
||||
[Export] public BulletOwner BulletGroup { get; set; } = BulletOwner.Player;
|
||||
private bool _isStrafing { get; set; }
|
||||
|
||||
private bool _canMove = true;
|
||||
|
|
@ -179,6 +179,16 @@ public partial class PlayerMovement : CharacterBody2D, IDestructible
|
|||
}
|
||||
}*/
|
||||
|
||||
// public void ItemAdded(LootItem item, int amount)
|
||||
// {
|
||||
// switch (item.Item)
|
||||
// {
|
||||
// case ItemTypes.Weapon:
|
||||
// AddWeapon(item.WeaponData);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
public void AddWeapon(Weapon weapon)
|
||||
{
|
||||
EquippedWeapons.Add(weapon);
|
||||
|
|
@ -443,7 +453,7 @@ public partial class PlayerMovement : CharacterBody2D, IDestructible
|
|||
private void _on_damage_hit_box_area_entered(Area2D area)
|
||||
{
|
||||
if (!_canMove) return;
|
||||
if (area is Bullet bullet && bullet.BulletOwner != BulletOwner.Player)
|
||||
if (area is Bullet bullet && bullet.BulletOwner != BulletGroup)
|
||||
{
|
||||
this.Hit(bullet.Damage, bullet.DamageType);
|
||||
bullet.QueueFree();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue