never let me cook again
This commit is contained in:
parent
63e5e950de
commit
13bb58ea03
6 changed files with 56 additions and 4 deletions
|
|
@ -70,10 +70,20 @@ public class Enemy : Entity
|
|||
protected override void OnKillEffects()
|
||||
{
|
||||
Destroy(gameObject);
|
||||
foreach (UpgradeDrop drop in possibleDrops)
|
||||
{
|
||||
DropUpgrade(drop);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void DropUpgrade()
|
||||
protected virtual void DropUpgrade(UpgradeDrop drop)
|
||||
{
|
||||
float random;
|
||||
float random = Random.Range(0, 100);
|
||||
{
|
||||
if (random < drop.chance) //just so it matches up with the number. 80 chance means 80 percent? idk but less than 80 lol
|
||||
{
|
||||
// drop the item
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue