20 lines
No EOL
483 B
C#
20 lines
No EOL
483 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class EntityItemPoisonHeart : EntityItem
|
|
{
|
|
public float damage;
|
|
|
|
public override string Name {
|
|
get {
|
|
return "Poisonous Heart";
|
|
}
|
|
}
|
|
|
|
public override void OnPickup(EntityPlayer player) {
|
|
messageBar.Write("Poisoned! Took " + damage.ToString("0.0") + " damage!", Color.red);
|
|
player.hp -= damage;
|
|
Destroy(gameObject);
|
|
}
|
|
} |