21 lines
No EOL
581 B
C#
21 lines
No EOL
581 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class EntityItemShopSword : EntityItemShop {
|
|
|
|
public float damage = 3f;
|
|
|
|
public override string Name {
|
|
get {
|
|
return "Sword (" + damage.ToString() + " dmg)";
|
|
}
|
|
}
|
|
|
|
protected override void OnPurchase(EntityPlayer player) {
|
|
Destroy(player.GetComponent<PlayerAttack>());
|
|
player.gameObject.AddComponent<PlayerAttackMelee>();
|
|
PlayerAttackMelee pam = player.GetComponent<PlayerAttackMelee>();
|
|
pam.damage = this.damage;
|
|
}
|
|
} |