2019-04-28 15:30:43 +00:00
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
public class EntityItemPoisonHeart : EntityItem
|
|
|
|
|
{
|
|
|
|
|
public int damage;
|
2019-04-28 16:00:11 +00:00
|
|
|
|
|
2019-04-28 15:30:43 +00:00
|
|
|
|
public override string Name {
|
|
|
|
|
get {
|
|
|
|
|
return "Poisonous Heart";
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-04-28 16:00:11 +00:00
|
|
|
|
|
2019-04-28 15:30:43 +00:00
|
|
|
|
public override void OnPickup(EntityPlayer player) {
|
2019-04-29 08:39:48 +00:00
|
|
|
|
messageBar.Write("Picked up: " + Name, Color.orange);
|
2019-04-28 16:00:11 +00:00
|
|
|
|
player.hp -= damage;
|
2019-04-28 15:30:43 +00:00
|
|
|
|
Destroy(gameObject);
|
|
|
|
|
}
|
|
|
|
|
}
|