2019-04-29 08:39:48 +00:00
|
|
|
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() {
|
|
|
|
Destroy(player.GetComponent<PlayerAttack>());
|
2019-04-29 12:35:35 +00:00
|
|
|
player.gameObject.AddComponent<PlayerAttackMelee>();
|
2019-04-29 08:39:48 +00:00
|
|
|
PlayerAttackMelee pam = player.GetComponent<PlayerAttackMelee>();
|
|
|
|
pam.damage = this.damage;
|
|
|
|
}
|
|
|
|
}
|