Final Game Jam version

This commit is contained in:
Exobyt 2025-09-06 23:19:31 +02:00
parent 35ce267482
commit 104a1e4297
141 changed files with 4485 additions and 206 deletions

View file

@ -18,6 +18,7 @@ var selectedPlayer: Player = self
var character: Character
var bot: bool = false
var botLogic: Bot = null
signal dead(player: Player)
signal hit(player: Player)
@ -39,7 +40,7 @@ func damage(amount: int) -> void:
else:
health -= amount
for i in range(0,amount):
character.removeShot()
character.drinkShot()
func heal(amount: int) -> void:
if health + amount > maxHealth:
@ -81,18 +82,27 @@ func useItem(_item: Item):
print("no bullet")
func loadBullet(_bullet: Bullet):
gun.loadBullet(_bullet)
itemInventory.erase(_bullet)
if gun.magazin.size() < gun.magazineSize:
gun.loadBullet(_bullet)
itemInventory.erase(_bullet)
else:
print("magazine Full Full")
func shootAtSelectedPlayer():
var randomBullet = gun.getRandomBullet()
if randomBullet is StandardBullet or randomBullet is LuckyBullet:
var bulletDamage = randomBullet.getDamage()
if bulletDamage > 0:
character.shootGun(true)
selectedPlayer.damage(bulletDamage)
else:
character.shootGun(false)
#character.emitShootGunFinished()
#character.gunEmpty()
print("Missed")
else:
character.shootGun(false)
#character.gunEmpty()
print("Empty")
# -- Gun --
@ -108,3 +118,9 @@ func setCharacter(_character: Character) -> void:
func getItemAmount() -> int:
return itemInventory.size()
func isBot() -> bool:
return botLogic != null
func setBotLogic(_botLogic: Bot) -> void:
botLogic = _botLogic