Final Game Jam version
This commit is contained in:
parent
35ce267482
commit
104a1e4297
141 changed files with 4485 additions and 206 deletions
38
scripts/bot/bot.gd
Normal file
38
scripts/bot/bot.gd
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
class_name Bot extends Node
|
||||
|
||||
var difficulty: GLOBALS.BOTDIFFICULTY
|
||||
|
||||
func _init(_difficulty: GLOBALS.BOTDIFFICULTY) -> void:
|
||||
difficulty = _difficulty
|
||||
|
||||
|
||||
func chooseItems(itemList: Array[Item], magazineSize) -> Array[Item]:
|
||||
print("Start BOT Choose Item")
|
||||
var availableItems = itemList.duplicate()
|
||||
var choosenItems: Array[Item] = []
|
||||
match difficulty:
|
||||
GLOBALS.BOTDIFFICULTY.EASY:
|
||||
randomize()
|
||||
var rng = RandomNumberGenerator.new()
|
||||
for i in range(0, rng.randi_range(0, availableItems.size())):
|
||||
if i > magazineSize:
|
||||
break
|
||||
var item = availableItems.pick_random()
|
||||
choosenItems.append(item)
|
||||
availableItems.erase(item)
|
||||
|
||||
return choosenItems
|
||||
GLOBALS.BOTDIFFICULTY.MEDIUM:
|
||||
return choosenItems
|
||||
GLOBALS.BOTDIFFICULTY.HARD:
|
||||
return choosenItems
|
||||
return choosenItems
|
||||
|
||||
func choosePlayer():
|
||||
match difficulty:
|
||||
GLOBALS.BOTDIFFICULTY.EASY:
|
||||
pass
|
||||
GLOBALS.BOTDIFFICULTY.MEDIUM:
|
||||
pass
|
||||
GLOBALS.BOTDIFFICULTY.HARD:
|
||||
pass
|
||||
1
scripts/bot/bot.gd.uid
Normal file
1
scripts/bot/bot.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dq0vmadrtwwrp
|
||||
Loading…
Add table
Add a link
Reference in a new issue